d3-visualization
Build deterministic, verifiable data visualizations with D3.js (v6). Generate standalone HTML/SVG (and optional PNG) from local data files without external network dependencies
Install / Use
npx skills add benchflow-ai/skillsbench --skill d3-visualizationInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Data & AnalyticsSupported Platforms
Tags
Our assessment of d3-visualization
d3-visualization scores 92/100 on our quality scale, 127th of 491 Data & Analytics skills we index (top 26%).
Its SKILL.md is 6.0 KB long, well organised into 14 sections with 7 code examples: a thorough specification that gives an agent plenty to work with.
With 1,813 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so d3-visualization is actively maintained.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-10-02. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
d3-visualization compared with similar skills
All 4 of these similar skills score higher than d3-visualization; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| d3-visualization (this skill)by benchflow-ai | 92 | 1.8k | 2mo ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 9d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 9d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 11d ago | SKILL.md |
| ui-ux-pro-maxby nextlevelbuilder | 100 | 130.2k | 11d ago | SKILL.md |
Frequently asked questions
- How do I install d3-visualization?
- Run
npx skills add benchflow-ai/skillsbench --skill d3-visualization. The install tabs above show the steps for each supported agent. - Which AI agents does d3-visualization work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is d3-visualization safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is Apache-2.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is d3-visualization still maintained?
- The repository was last updated about 2 months ago, so d3-visualization is actively maintained.
Skill content
View source on GitHubname: 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:
dist/chart.html— standalone HTML that renders the visualizationdist/chart.svg— exported SVG (stable and diff-friendly)- (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.timeFormatwith explicit formats).
Rendering determinism
- No randomness: do not use
Math.random()ord3-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.
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).
Recommended project layout
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):
Tooltip pattern (recommended)
- Create a tooltip element in HTML:
<div id="tooltip" class="tooltip"></div>
- Style with CSS using
.visibleclass for show/hide:
.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 */
}
- Add event handlers to SVG elements:
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: 0by default (notdisplay: none) for smooth transitions - Use
.classed('visible', true/false)to toggle visibility pointer-events: noneprevents tooltip from blocking mouse events- Position tooltip relative to mouse with
event.pageX/pageY
Click handlers for selection/highlighting
// 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:
.bar.selected {
stroke: #000;
stroke-width: 3px;
}
Conditional interactivity
Sometimes only certain elements should be interactive:
.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);
})
Related Skills
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
ui-ux-pro-max
130.2kUI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing, or fixing interfaces, including pages, components, design systems, accessibility, interaction, responsive layout, typography, color, charts, and stack-specific UI implementation.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
