Agent skill

D3 Visualization

by benchflow-ai in benchflow-ai/skillsbench

Build deterministic, verifiable data visualizations with D3.js (v6).

Apache-2.0Auto-check passedData & Analytics

Install D3 Visualization

skills CLI
$ npx skills add benchflow-ai/skillsbench --skill d3-visualization -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install benchflow-ai/skillsbench d3-visualization --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/benchflow-ai/skillsbench.git skills-src && mkdir -p .claude/skills && cp -r skills-src/tasks/data-to-d3/environment/skills/d3-visualization .claude/skills/d3-visualization && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
d3-visualization
GitHub stars
1.8k
Token cost
~1.5k tokens
SKILL.md length
528 words
Files
5 (incl. scripts)
Skills in repo
180
Repo updated
First seen
Licence
Apache-2.0

At a glance

Build deterministic, verifiable data visualizations with D3.js (v6).

  • Works in 3 steps: dist/chart.html — standalone HTML that… → dist/chart.svg — exported SVG (stable… → (Optional) dist/chart.png — if the task…
  • Tasks require charts
  • SKILL.md covers When to use, Inputs you should expect, Outputs you should produce and Determinism rules…, plus 2 more sections
  • Runs JavaScript scripts from its folder

What it does

D3 Visualization is an agent skill from benchflow-ai/skillsbench. Build deterministic, verifiable data visualizations with D3.js (v6). Generate standalone HTML/SVG (and optional PNG) from local data files without external network dependencies. Use when tasks require charts, plots, axes/scales, legends, tooltips, or data-driven SVG output.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts (for example `scripts/bubble_chart_example.js`, `scripts/check_tooltip.js` and `scripts/interactive_table_example.js`).

It sits in Data & Analytics, covering Data visualization, HTML artifacts and Accessibility. It works with D3.js. The repository describes itself as: SkillsBench evaluates how well skills work and how effective agents are at using them. The licence is Apache-2.0.

When your agent uses it

  • Tasks require charts
  • Data-driven SVG output

Example prompts

  • “/d3-visualization”

Requirements

  • Node.js

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. dist/chart.html — standalone HTML that renders the visualization
  2. dist/chart.svg — exported SVG (stable and diff-friendly)
  3. (Optional) dist/chart.png — if the task explicitly needs a raster image

What it can do on your machine

Read from SKILL.md and the folder at commit 9a1f4dd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 4 files in scripts/ (JavaScript), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

D3 Visualization loads about 1.5k tokens when it runs. Until then it costs about 73 tokens; SKILL.md has 528 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~73
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from benchflow-ai/skillsbench at commit 9a1f4dd, republished under its Apache-2.0 licence (© benchflow-ai). 528 words, ~1,543 tokens.

Download SKILL.mdSave it as .claude/skills/d3-visualization/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
d3-visualization
description
Build deterministic, verifiable data visualizations with D3.js (v6). Generate standalone HTML/SVG (and optional PNG) from local data files without external network dependencies. Use when tasks require charts, plots, axes/scales, legends, tooltips, or data-driven SVG output.

D3.js Visualization Skill

Use this skill to turn structured data (CSV/TSV/JSON) into clean, reproducible visualizations using D3.js. The goal is to produce stable outputs that can be verified by diffing files or hashing.

When to use

Activate this skill when the user asks for any of the following:

  • “Make a chart/plot/graph/visualization”
  • bar/line/scatter/area/histogram/box/violin/heatmap
  • timelines, small multiples, faceting
  • axis ticks, scales, legends, tooltips
  • data-driven SVG output for a report or web page
  • converting data to a static SVG or HTML visualization

If the user only needs a quick table or summary, don’t use D3—use a spreadsheet or plain markdown instead.


Inputs you should expect

  • One or more local data files: *.csv, *.tsv, *.json
  • A chart intent:
    • chart type (or you infer the best type)
    • x/y fields and aggregation rules
    • sorting/filtering rules
    • dimensions (width/height) and margins
    • color rules (categorical / sequential)
    • any labeling requirements (title, axis labels, units)
  • Output constraints:
    • “static only”, “no animation”, “must be deterministic”, “offline”, etc.

If details are missing, make reasonable defaults and document them in comments near the top of the output file.


Outputs you should produce

Prefer producing all of the following when feasible:

  1. dist/chart.html — standalone HTML that renders the visualization
  2. dist/chart.svg — exported SVG (stable and diff-friendly)
  3. (Optional) dist/chart.png — if the task explicitly needs a raster image

Always keep outputs in a predictable folder (default: dist/), unless the task specifies paths.


Determinism rules (non-negotiable)

To keep results stable across runs and machines:

Data determinism
  • Sort input rows deterministically before binding to marks (e.g., by x then by category).
  • Use stable grouping order (explicit Array.from(grouped.keys()).sort()).
  • Avoid locale-dependent formatting unless fixed (use d3.format, d3.timeFormat with explicit formats).
Rendering determinism
  • No randomness: do not use Math.random() or d3-random.
  • No transitions/animations by default (transitions can introduce timing variance).
  • Fixed width, height, margin, viewBox.
  • Use explicit tick counts only when needed; otherwise rely on D3 defaults but keep domains fixed.
  • Avoid layout algorithms with non-deterministic iteration unless you control seeds/iterations (e.g., force simulation). If a force layout is required:
    • fix the tick count,
    • fix initial positions deterministically (e.g., sorted nodes placed on a grid),
    • run exactly N ticks and stop.
Show full SKILL.md (178 more words)Show less
Offline + dependency determinism
  • Do not load D3 from a CDN.
  • Pin D3 to a specific version (default: d3@7.9.0).
  • Prefer vendoring a minified D3 bundle (e.g., vendor/d3.v7.9.0.min.js) or bundling with a lockfile.
File determinism
  • Stable SVG output:
    • Avoid auto-generated IDs that may change.
    • If you must use IDs (clipPath, gradients), derive them from stable strings (e.g., "clip-plot").
  • Use LF line endings.
  • Keep numeric precision consistent (e.g., round to 2–4 decimals if needed).

If the task doesn't specify an existing structure, use:

dist/
  chart.html        # standalone HTML with inline or linked JS/CSS
  chart.svg         # exported SVG (optional but nice)
  chart.png         # rasterized (optional)
vendor/
  d3.v7.9.0.min.js  # pinned D3 library

Interactive features (tooltips, click handlers, hover effects)

When the task requires interactivity (e.g., tooltips on hover, click to highlight):

  1. Create a tooltip element in HTML:
html
<div id="tooltip" class="tooltip"></div>
  1. Style with CSS using .visible class for show/hide:
css
.tooltip {
    position: absolute;
    padding: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    pointer-events: none;  /* Prevent mouse interference */
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1000;
}

.tooltip.visible {
    opacity: 1;  /* Show when .visible class is added */
}
  1. Add event handlers to SVG elements:
javascript
svg.selectAll('circle')
    .on('mouseover', function(event, d) {
        d3.select('#tooltip')
            .classed('visible', true)  // Add .visible class
            .html(`<strong>${d.name}</strong><br/>${d.value}`)
            .style('left', (event.pageX + 10) + 'px')
            .style('top', (event.pageY - 10) + 'px');
    })
    .on('mouseout', function() {
        d3.select('#tooltip').classed('visible', false);  // Remove .visible class
    });

Key points:

  • Use opacity: 0 by default (not display: none) for smooth transitions
  • Use .classed('visible', true/false) to toggle visibility
  • pointer-events: none prevents tooltip from blocking mouse events
  • Position tooltip relative to mouse with event.pageX/pageY
Click handlers for selection/highlighting
javascript
// Add 'selected' class on click
svg.selectAll('.bar')
    .on('click', function(event, d) {
        // Remove previous selection
        d3.selectAll('.bar').classed('selected', false);
        // Add to clicked element
        d3.select(this).classed('selected', true);
    });

CSS for highlighting:

css
.bar.selected {
    stroke: #000;
    stroke-width: 3px;
}
Conditional interactivity

Sometimes only certain elements should be interactive:

javascript
.on('mouseover', function(event, d) {
    // Example: Don't show tooltip for certain categories
    if (d.category === 'excluded') {
        return;  // Exit early, no tooltip
    }
    // Show tooltip for others
    showTooltip(event, d);
})

© benchflow-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts) in tasks/data-to-d3/environment/skills/d3-visualization of benchflow-ai/skillsbench.

  • SKILL.md
  • scripts/bubble_chart_example.js
  • scripts/check_tooltip.js
  • scripts/interactive_table_example.js
  • scripts/tooltip_handler.js

Open the folder on GitHubat commit 9a1f4dd

Compare with similar skills

D3 Visualization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

D3 Visualization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
D3 Visualization this skillbenchflow-ai/skillsbench1.8k—~1.5kAutomated safety check: PassApache-2.0
Tufte Data Vizcaylent/tufte-data-viz222—~3.5kAutomated safety check: PassMIT
Mvizmatsonj/mviz226—~11kAutomated safety check: PassNone
Cs448b Visualizationsundial-org/skills152—~684Automated safety check: PassNone
Data VisualizationOwl-Listener/designer-skills2.9k1 repos~513Automated safety check: PassMIT
Matlab Build Chartmatlab/matlab-agentic-toolkit1.1k—~3.5kAutomated safety check: NotesCustom licence

Similar skills

  • Tufte Data Viz

    caylent/tufte-data-viz

    A skill your agent uses when creating, reviewing, or styling charts, graphs, dashboards, sparklines, or any data visualization.

    222 GitHub stars~3.5k tokensUpdated 7 mo ago
    Data & AnalyticsAuto-check passed
  • Mviz

    matsonj/mviz

    A chart & report builder for AI. An agent skill from matsonj/mviz.

    226 GitHub stars~11k tokensUpdated 4 mo ago
    Data & AnalyticsAuto-check passed
  • Cs448b Visualization

    sundial-org/skills

    Data visualization design based on Stanford CS448B. An agent skill from sundial-org/skills.

    152 GitHub stars~684 tokensUpdated 2 mo ago
    Data & AnalyticsAuto-check passed
  • Data Visualization

    Owl-Listener/designer-skills

    Select chart types and design data encodings — marks, axes, labels, and accessible chart styling.

    2.9k GitHub starsUsed in 1 repo~513 tokens
    Data & AnalyticsAuto-check passed
  • Matlab Build Chart

    matlab/matlab-agentic-toolkit

    Create and customize MATLAB charts and plots. An agent skill from matlab/matlab-agentic-toolkit.

    1.1k GitHub stars~3.5k tokensUpdated 7 days ago
    Data & AnalyticsAuto-check: notes
  • D3 Viz

    calesthio/OpenMontage

    Creating interactive data visualisations using d3.js. An agent skill from calesthio/OpenMontage.

    65k GitHub starsUsed in 3 repos~5.4k tokens
    Data & AnalyticsAuto-check passed

More from benchflow-ai/skillsbench

All 180 skills in this repo
  • Lean4 Memories

    benchflow-ai/skillsbench

    This skill should be used when working on Lean 4 formalization projects to maintain persistent memory of successful proof patterns, failed approaches, project conventions, and user preferences…

    1.8k GitHub stars~3.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Senior Data Engineer

    benchflow-ai/skillsbench

    World-class data engineering skill for building scalable data pipelines, ETL/ELT systems, real-time streaming, and data infrastructure.

    1.8k GitHub stars~5.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Ac Branch Pi Model

    benchflow-ai/skillsbench

    AC branch pi-model power flow equations (P/Q and |S|) with transformer tap ratio and phase shift, matching acopf-math-model.md and MATPOWER branch fields.

    1.8k GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Civ6lib

    benchflow-ai/skillsbench

    Civilization 6 district mechanics library. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Dc Power Flow

    benchflow-ai/skillsbench

    DC power flow analysis for power systems. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~717 tokensUpdated 2 mo ago
    Auto-check passed
  • Energy Calculator

    benchflow-ai/skillsbench

    Calculate per-second RMS energy from audio files. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~437 tokensUpdated 2 mo ago
    Auto-check passed

Works with

Questions about D3 Visualization

What does D3 Visualization do?

Build deterministic, verifiable data visualizations with D3.js (v6). D3 Visualization is an agent skill from benchflow-ai/skillsbench.js (v6).

When should I use D3 Visualization?

D3 Visualization fits situations like: tasks require charts; data-driven SVG output.

How do I install D3 Visualization in Claude Code?

Run `npx skills add benchflow-ai/skillsbench --skill d3-visualization -a claude-code`. Or copy the skill folder (tasks/data-to-d3/environment/skills/d3-visualization in benchflow-ai/skillsbench) into .claude/skills/d3-visualization in your project. Claude Code loads it when a task matches its description.

How do I install D3 Visualization in Codex?

Run `npx skills add benchflow-ai/skillsbench --skill d3-visualization -a codex`. Or copy the skill folder (tasks/data-to-d3/environment/skills/d3-visualization in benchflow-ai/skillsbench) into .agents/skills/d3-visualization in your project. Codex loads it when a task matches its description.

Can I use D3 Visualization in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add benchflow-ai/skillsbench --skill d3-visualization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/d3-visualization, .gemini/skills/d3-visualization, .github/skills/d3-visualization and .opencode/skills/d3-visualization in your project.

What does D3 Visualization need to run?

Going by SKILL.md and its folder, D3 Visualization needs JavaScript for the scripts in its folder. Our summary lists: Node.js.

Does D3 Visualization access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is D3 Visualization safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does D3 Visualization use?

D3 Visualization is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does D3 Visualization use?

About 1.5k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to D3 Visualization?

Skills that share tags, products or a category with D3 Visualization: Tufte Data Viz (caylent/tufte-data-viz, 222 stars), Mviz (matsonj/mviz, 226 stars), Cs448b Visualization (sundial-org/skills, 152 stars) and Data Visualization (Owl-Listener/designer-skills, 2.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains D3 Visualization?

benchflow-ai (a GitHub organization) maintains it in benchflow-ai/skillsbench, which has 1,832 GitHub stars. The repository holds 180 skills in this directory. The repository was last updated on July 23, 2026.

Source: benchflow-ai/skillsbench on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.