
diagram-animation
This skill should be used when the user asks to "animate this diagram", "build a flowchart that reveals step by step", "animate an architecture/sequence diagram", "make a chart animate in", "grow the bars / draw the line / count up the number", "show data flowing along a connector", or "turn a static diagram into a guided reveal". Covers SVG, Framer Motion, D3, and Remotion.
- Installs
- 1.5K
- Last 24h
- +52
- Trending rank
- #3267
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/iart-ai/explainer-video-skills --skill diagram-animation- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads diagram-animation automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Diagram & Data Animation
Make structure and data legible by revealing it over time — one idea per beat. Build progressive node/edge reveals, flowing connectors, and animated charts (bars grow, lines draw, numbers count up) for web or video.
When to use
- Architecture, flow, or sequence diagrams that build step by step.
- Animated charts: bars grow, lines draw on, numbers count up.
- "How it works" walkthroughs and process explainers.
- Showing data or signal flowing along connectors.
Core principle: progressive disclosure
Never show everything at once. Reveal in this order: nodes → edges → labels. Highlight the active element and dim the rest (focus + context). Pace to comprehension, not flash — hold each step 0.5–1.5s so it lands. Keep a consistent visual grammar: color means meaning, and that mapping never changes mid-piece.
Quick reference
| Goal | Mechanism | Easing |
|---|---|---|
| Node appear | scale 0.8→1 + opacity, transform-origin:center | back.out(1.5) / easeOut |
| Edge connect | stroke-dashoffset len→0 | easeInOut, 0.4–0.7s |
| Flowing data | animate stroke-dashoffset looping + traveling dot | linear, infinite |
| Bar grow | scaleY 0→1, transform-origin:bottom | easeOut, stagger 0.06s |
| Line chart | path stroke-dashoffset len→0 | easeInOut, 0.8–1.2s |
| Count-up | interpolate value with eased t | easeOutCubic |
| Highlight | active full-opacity, others opacity:.35 | 0.3s |
Progressive node/edge reveal (SVG + GSAP)
<svg viewBox="0 0 400 200" id="flow">
<g class="node" opacity="0"><circle cx="60" cy="100" r="28" fill="#0A84FF"/></g>
<g class="node" opacity="0"><circle cx="200" cy="100" r="28" fill="#0A84FF"/></g>
<g class="node" opacity="0"><circle cx="340" cy="100" r="28" fill="#0A84FF"/></g>
<path class="edge" d="M88 100 H172" stroke="#888" stroke-width="3" fill="none" pathLength="1"/>
<path class="edge" d="M228 100 H312" stroke="#888" stroke-width="3" fill="none" pathLength="1"/>
</svg>
<script type="module">
import gsap from "https://cdn.jsdelivr.net/npm/gsap/+esm";
gsap.set(".edge", { strokeDasharray: 1, strokeDashoffset: 1 });
const tl = gsap.timeline({ defaults: { ease: "power2.out" } });
tl.to(".node", { opacity: 1, scale: 1, transformOrigin: "center",
duration: .45, stagger: .35, ease: "back.out(1.6)", startAt: { scale: .8 } })
.to(".edge", { strokeDashoffset: 0, duration: .5, stagger: .35 }, "-=0.9");
</script>
pathLength="1" lets one dash value drive any edge length. Reveal nodes first, then draw edges between the now-visible nodes.
Flowing connector (marching dash + traveling dot)
.flow-line { stroke-dasharray: 8 8; animation: march 0.6s linear infinite; }
@keyframes march { to { stroke-dashoffset: -16; } } /* = sum of dash pattern */
@media (prefers-reduced-motion: reduce){ .flow-line { animation: none; } }
Traveling dot along the path (offset-path, no JS):
.packet { offset-path: path("M88 100 H312"); animation: travel 1.4s linear infinite; }
@keyframes travel { to { offset-distance: 100%; } }
Charts
Bar grow (scaleY from the baseline):
.bar { transform: scaleY(0); transform-origin: bottom; }
.bar.in { transform: scaleY(1); transition: transform .6s cubic-bezier(.22,1,.36,1); }
/* stagger via inline transition-delay per bar */
Line chart draw-on (the whole series path strokes in):
const len = pathEl.getTotalLength();
pathEl.style.strokeDasharray = len;
pathEl.style.strokeDashoffset = len;
pathEl.getBoundingClientRect(); // force reflow
pathEl.style.transition = "stroke-dashoffset 1s ease-in-out";
pathEl.style.strokeDashoffset = "0";
Count-up with eased interpolation (rAF):
function countUp(el, to, dur = 1200) {
const t0 = performance.now();
const fmt = new Intl.NumberFormat();
(function tick(now){
const k = Math.min(1, (now - t0) / dur);
const e = 1 - Math.pow(1 - k, 3); // easeOutCubic
el.textContent = fmt.format(Math.round(to * e));
if (k < 1) requestAnimationFrame(tick);
})(t0);
}
Build-tool choice
- Inline animated SVG + GSAP/CSS: best for bespoke diagrams and full control on the web.
- Framer Motion (React): declarative reveals via
variants+staggerChildren; pairs with Visx/Recharts for charts. - D3 + transitions: data-bound charts;
.transition().duration().attr()for grow/draw,tweenfor count-up. - Mermaid / Excalidraw: author the diagram structure fast, render to SVG, then animate the SVG.
- Remotion (React): data-driven, deterministic renders for video output and repeatable exports.
Output checklist
- Reveal order is nodes → edges → labels; nothing dumps in all at once.
- Each step holds long enough to read (0.5–1.5s).
- Color grammar is consistent and meaningful.
- Active element highlighted, context dimmed.
prefers-reduced-motionpath shows the final composed diagram without looping motion.
Deliver & verify (standalone HTML)
Packaged helper (
scripts/):scripts/seek-shot.sh anim.html 0 1.5 3freezes the?t=Nharness and screenshots each moment;scripts/contact-sheet.sh sheet.png frame-*.pngtiles them for one-glance review. Seescripts/README.md.
For a self-contained diagram (reveal, flowing connector, animated chart) the deliverable is one HTML file that opens directly in a browser — no build step, no render pipeline. A single file is the right tier for web motion. (If the diagram is part of a rendered video, build it as a Remotion composition instead and verify via remotion still — see remotion-video.)
Output contract:
- One
.htmlfile: SVG inline; Framer Motion / D3 / anime / GSAP from CDN; the animation in one inline<script>(one driver). - A way to freeze an exact moment for screenshots, matched to how the diagram animates:
- GSAP / JS timeline: build one master
tl, then?t=N→tl.pause(); tl.seek(N). - SVG SMIL:
svg.pauseAnimations(); svg.setCurrentTime(N). - CSS keyframes: drive reveal order with
animationDelay; freeze by pausing/seeking the equivalent JS timeline.
- GSAP / JS timeline: build one master
<script>
// ... build your master timeline as `tl` ...
const t = new URLSearchParams(location.search).get("t");
if (t !== null) { tl.pause(); tl.seek(parseFloat(t)); } // frozen at t seconds
window.__ready = true; // ready signal for headless wait
console.log("duration", tl.duration());
</script>
Verify loop — render → freeze → screenshot → check:
- Open the file at start / mid / end:
…/diagram.html?t=0,?t=<dur/2>,?t=<dur>(readtl.duration()from the console). - Headless-screenshot each frozen frame:
npx playwright screenshot --wait-for-timeout=500 "file://$PWD/diagram.html?t=1.2" frame-mid.png - Check fidelity — the step-by-step reveal appears in order (nodes → edges → labels, each step present at its frame), connectors point at the right nodes, count-ups land on the EXACT values — and artifacts (clipped labels, off-canvas nodes, FOUC before fonts, jank at seams).
Before you finish:
- Opens standalone in a browser — no console errors, no missing CDN.
- One driver/master timeline; the freeze (
?t=N/setCurrentTime) lands on a deterministic still. - Screenshotted at start / mid / end — reveal order correct, connectors land on the right nodes, numbers exact.
prefers-reduced-motionshows the final composed diagram without looping motion.- Color grammar consistent; active element highlighted, context dimmed; nothing dumps in all at once.
Reference files
references/diagram-and-chart-recipes.md— fuller runnable code: staged node/edge reveal with labels, flowing-dash + traveling-dot connectors, bar/line/count-up chart recipes, sequence-diagram and architecture build patterns, and D3 / Framer Motion / Remotion implementations with easing notes.
FAQ
What does the diagram-animation skill do?
This skill should be used when the user asks to "animate this diagram", "build a flowchart that reveals step by step", "animate an architecture/sequence diagram", "make a chart animate in", "grow the bars / draw the line / count up the number", "show data flowing along a connector", or "turn a static diagram into a guided reveal". Covers SVG, Framer Motion, D3, and Remotion.
How do I install diagram-animation?
Run npx skills add https://github.com/iart-ai/explainer-video-skills --skill diagram-animation in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/diagram-animation/ (personal) or .claude/skills/diagram-animation/ (project).
Which AI agents can use diagram-animation?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is diagram-animation safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains diagram-animation?
It is published by iart-ai in iart-ai/explainer-video-skills. It has 1,520 recorded installs.
More from iart-ai/explainer-video-skills
explainer-video
iart-ai/explainer-video-skills
This skill should be used when the user asks to "make an explainer video", "turn this into a short explainer", "write a script and storyboard for a product video", "produce a how-it-works/onboarding video", "sync narration and captions", or "build a 30–90s animated explainer". Covers script→storyboard→scene build→narration/caption sync→edit→polish.
whiteboard-animation
iart-ai/explainer-video-skills
This skill should be used when the user asks to "make a whiteboard animation", "draw-on explainer", "VideoScribe style", "hand-drawn explainer video", "animate a sketch being drawn", "do a doodle/scribe video", "show a hand drawing the illustration", or "animate handwriting appearing on a whiteboard". Covers SVG stroke draw-on, a marker hand that follows the path tip, staggered reveal, erase/wipe transitions, and narrated export.
isometric-animation
iart-ai/explainer-video-skills
This skill should be used when the user asks to "make an isometric animation", "build a 2.5D isometric scene", "create an isometric infographic", "animate an exploded diagram", "do an isometric city/stack build", "show stacked layers in iso", "extrude blocks with depth", or "add a gentle camera drift to an iso scene". Covers CSS 3D transforms, SVG iso planes, and Three.js OrthographicCamera for true 3D iso — no build step.
wrapped-video
iart-ai/explainer-video-skills
This skill should be used when the user asks to "make a Spotify Wrapped style video", "build a year in review / year-in-review video", "create a personalized data video", "generate a recap video", "build a wrapped video generator", "turn a data table into shareable videos", or "make per-user stat videos". Covers the data row → one shareable video pattern, the Wrapped scene grammar (big-number reveals, top-X lists, superlatives), animated data counters, vertical 9:16 framing, and batch-rendering many personalized videos from one template.
Popular docs & writing skills
grill-with-docs
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
lark-markdown
open.feishu.cn
飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。
writing-beats
mattpocock/skills
Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.
writing-shape
mattpocock/skills
Writing, exploit: shape raw material into an article, paragraph by paragraph.
writing-fragments
mattpocock/skills
Writing, explore: mine raw fragments, no structure yet.
writing-for-agents
mattpocock/skills
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.