d3
Skill1 starsChanged 3 months agoMITView on GitHub
Build, review, debug, migrate, or plan D3.js visualizations with current docs (d3@7.9.x and modular d3-*). Use for d3-array, d3-scale, d3-scale-chromatic, d3-shape, d3-selection, d3-axis, d3-transition, d3-ease, d3-timer, d3-brush, d3-drag, d3-zoom, d3-force, d3-hierarchy, d3-geo, d3-delaunay, d3-chord, d3-contour, d3-quadtree, d3-fetch, d3-dsv, d3-format, d3-time, d3-time-format, d3-color, d3-interpolate, d3-path, d3-polygon, d3-random, d3-dispatch, data join, scaleLinear/band/time/ordinal, line/area/arc/stack, geoPath, forceSimulation, and D3 in React/Svelte (declarative math vs refs+effects).
In this repository81 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agents-mdSkill
- base-uiSkill
- better-authSkill
- brainstormSkill
- bullmqSkill
- bunSkill
- clickhouseSkill
- clone-to-tempSkill
- compound-uiSkill
- copywritingSkill
- create-durable-planSkill
- date-fnsSkill
- decimal-jsSkill
- deduplicateSkill
- design-engineerSkill
- designSkill
- drizzle-ormSkill
- effectSkill
- elysia-architectureSkill
- elysiaSkill
- evlogSkill
- feedsmithSkill
- grokSkill
- handoffSkill
- heyapiSkill
- impitSkill
- intlayerSkill
- jsdocSkill
- kafkaSkill
- kill-legacySkill
- legend-stateSkill
- loopSkill
- mantine-hooksSkill
- mobbinSkill
- motionSkill
- oxfmtSkill
- oxlintSkill
- permixSkill
- plain-languageSkill
- playwrightSkill
- react-boundariesSkill
- react-emailSkill
- reactSkill
- reorganizeSkill
- researchSkill
- schema-dtsSkill
- sentrySkill
- seoSkill
- setup-competitors-mdSkill
- setup-copywriting-mdSkill
- setup-icp-mdSkill
- setup-project-mdSkill
- simplify-layoutSkill
- storybookSkill
- subagentsSkill
- tailwindSkill
- tailwind-variantsSkill
- takumiSkill
- tanstack-chartsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill when work touches D3.js (d3 or modular d3-*) — data prep, scales, shapes, selections/joins, axes, transitions, …
- Very specific: line 10
Treat d3@7.9.x as the current umbrella line (getting started, API index).
- Very specific: line 27
Prefer the smallest module set that answers the job.
- Very specific: line 30
Prefer modern selection.data(data, key).join(...) over verbose enter/update/exit unless you need custom exit animations.
- Very specific: line 32
Prefer d3-delaunay (Delaunay.from) over deprecated d3-voronoi.
- Very specific: line 36
Do not use d3.nest (removed).
- Distinctive: line 41
Prefer the repo's existing checks.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
D3
Use this skill when work touches D3.js (d3 or modular d3-*) — data prep, scales, shapes, selections/joins, axes, transitions, brush/drag/zoom, force, hierarchy, geo, delaunay, or framework interop.
Treat d3@7.9.x as the current umbrella line (getting started, API index). Prefer official d3js.org module pages and npm-resolved majors over memory. D3 is a toolbox of ~30 modules, not a chart library — compose encodings yourself (or choose a higher-level chart stack when bespoke D3 is unnecessary).
Workflow
- Confirm the local surface before changing code:
- Umbrella
d3version vs modulard3-*installs; TypeScript via@types/d3/@types/d3-*(DefinitelyTyped). - Whether the task needs DOM modules (selection, transition, axis-via-call, brush, drag, zoom) or pure math (array, scale, shape, interpolate, format, …).
- Rendering target: SVG, Canvas (
generator.context), or declarative JSX path/cx/cyattributes.
- Umbrella
- Refresh package evidence and docs URLs from source-map.md.
- For install strategy, data prep, scales, chromatic schemes, color, and interpolate, use setup-data-scales.md.
- For line/area/arc/pie/stack/symbol/link, path, polygon, axis, contour/density, and quadtree, use shapes-geometry.md.
- For hierarchy, force, chord, geo, and delaunay/voronoi, use layouts-geo.md.
- For selection/join, brush, drag, zoom, and dispatch — including React/Svelte DOM conflict rules — use selection-interaction.md.
- For transitions/ease/timer, framework guidance, production/SSR/canvas, v6→v7 notes, and AI traps, use animation-frameworks.md.
Implementation Judgment
- Prefer the smallest module set that answers the job. Prototyping:
bun add d3. Production React charts often need onlyd3-scale+d3-shape+d3-array(plus selection/axis when calling DOM APIs). - Invert continuous y ranges (
[innerHeight, marginTop]). SVGygrows downward. - Pure math in JSX is fine (scale, array, shape path strings, format). DOM mutators need refs + effects in React: selection,
selection.call(axis), transition, brush, drag, zoom (official React guidance). - Prefer modern
selection.data(data, key).join(...)over verbose enter/update/exit unless you need custom exit animations. - Pass the native event to listeners (D3 6+); there is no
d3.event. - Prefer
d3-delaunay(Delaunay.from) over deprecatedd3-voronoi. - Hierarchy layouts that encode value need
.sum()(and usually.sort()) beforetreemap/pack/partition. - Force simulations mutate
node.x/node.yeach tick — drive renders from"tick"(or React state), andstop()when unmounting. - Band bars use
.bandwidth(); categorical lines/scatter often usescalePoint. Sort data beforecurveMonotoneX. - Do not use
d3.nest(removed); usegroup/rollup/groups/rollups. - Unique SVG
ids for clips/gradients/markers when multiple charts share a document.
Verification
Prefer the repo's existing checks. For meaningful D3 changes, include the relevant subset:
- Package/version check for
d3@7or aligned modular majors;@types/d3when TypeScript. - Typecheck for accessors, scale domains, and join key types.
- Deterministic SVG/Canvas assertions with fixed width/height (mock timers for transitions; stop force sims in tests).
- Interaction tests for brush domain filter, zoom transform, and drag when those APIs change.
- Bundle audit when adding geo, force, hierarchy, contour, or the full umbrella.
- Migration scan for
d3.event,d3.nest,d3.voronoi, and React 16-era patterns if upgrading from older D3.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

