/chanmeng-svg-animation-studio:chanmeng-svg-product-cardfrom chanmeng-svg-animation-studio
Creates animated SVG product cards for GitHub READMEs. Redraws a product's real interface as vectors with CSS keyframe animation, outlined text, and a reduced-motion still frame. Use for project demos, profile cards, or fixing broken animated SVGs on GitHub.
Ships in chanmeng-svg-animation-studio. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
A card earns its place when the motion carries information: code is typed and a plan compiles, an agent drafts and fixes in passes, a phone scrolls and a log reacts. An animated name with drifting confetti is a business card. So the work is mostly reading the product and finding what it does that can be shown happening; the SVG mechanics are solved by the kit.
<skill-dir> below is the folder holding this file: ${CLAUDE_SKILL_DIR} where the
host substitutes it, and the folder you loaded this file from where that still reads
as a literal ${...}. Never take it from a shell environment variable: a shell can
carry another plugin's value.
Read references/field-guide.md sections 1 to 5 now, and the technique you need from
section 6 when you reach it. Read references/kit-api.md when you write the builder.
Then, from the product's own repository and site:
getComputedStyle on the live page when
it asks for system fonts.If the product is not in reach, ask for the repository or the live URL before drawing: a card guessed from a description cannot be true to the product.
Now decide two things and state them in one line each before writing code:
node <skill-dir>/scripts/init-kit.mjs --dest=scripts/cards --id=<card-id>
node <dest>/lib/doctor.mjs # what is missing; --fix installs it
doctor starts the browser once, because found is not started: an agent sandbox can
block an installed browser. With --fix it installs opentype.js, playwright-core
and, when no browser starts, Playwright's Chromium.
The kit is copied into the project on purpose: a card is rebuilt long after this skill
was used, by someone who may not have it. Pick a --dest that suits the project.
Fonts come first: the builder will not run until they exist. It needs the keys
display, sans, sansBold and mono for the panel; add more for the stage.
npm i -D @fontsource/<family> ships one file
per weight in its files/ folder. Take the .woff; the kit cannot read .woff2.Once the fonts are in, <dest>/<card-id>.mjs runs as a card that passes the gates.
Keep it passing as you replace it, in this order: THEME, COPY, then the stage.
<dest>/assets/, and refetch only behind a flag. Ask
before the first fetch if the call has an effect.panel() refuses a fifth panel item or a sub-line
that does not fit, because this is the mistake that cost a full redraw of twelve
cards.Run these in order. A card is not done because one frame looks right.
node <dest>/<card-id>.mjs
node <dest>/lib/check-card.mjs <card>.svg
node <dest>/lib/capture-frames.mjs <card>.svg --at=<one time inside each scene, and the end of the last> --out=<scratch dir>
node <dest>/lib/qa-loop.mjs <card>.svg --out=<scratch dir>
The kit's scripts share exit codes: 0 passed, 1 a real failure, 2 usage,
3 environment (no playwright-core or no browser that starts: run doctor.mjs,
it is not the card's fault).
check-card errors are real failures. capture-frames exits non-zero when the image
does not decode, or the reduced-motion picture still moves. Its timed frames are exact,
so a tight transition can be checked to the tenth of a second. Keep the last time
before the loop's dip (tl.dip(), the final 0.4 s), or you capture the fade.
qa-loop measures the whole loop at ten frames a second: a seam that snaps (FAIL), a
first frame nearly blank, a hard cut, a dead stretch (WARN: a held scene can be on
purpose; say why at handover). It writes <card>-sheet.png, the loop in tiles with the
start again as the last tile: one image that shows the rhythm of every scene.
Then look at the captures. Open every one and check: text clipped by a window or overlapping a neighbour; a scene that reads as dead; the panel and stage in both the light and dark files; the reduced-motion still being the frame you chose. Nothing else catches these. If you could not view the images, say so; do not report the card as verified.
When the card is in a pushed README, open the live page and confirm the image decoded and is playing. Only the real host proves it.
The .svg, the builder, and the <img> line, with the alt set to the SVG's
<title>: one sentence saying what happens on the stage, the part a screen reader
cannot get from the outlines.
<img src="<path>/<card-id>.svg" width="100%" alt="<the SVG's title>">
Each input the builder reads from outside the project, and what happens when it is missing (field guide section 9).
Anything you could not source or verify, plainly. A chip invented from memory has shipped before; say which element has no evidence rather than keeping it quiet.
| Symptom | Cause |
|---|---|
| Blank or wrong text on GitHub | Live <text>. Use glyphs.text, or outlineTextElements for embedded SVG |
| Static on GitHub, moves locally | Script or SMIL. Everything moves through CSS keyframes |
| Blank first seconds | A positive delay. Use tl.shift(start), which never waits |
| Typing cover shows over a neighbour | Clip the row to its container |
| Reduced-motion still is empty | Elements authored in their start state. Author the finished frame |
Build throws no glyph | Pass a fallback font with the same units-per-em |
Field guide section 11 lists the mistakes that have already been made once.
assets/card-template.mjs (opens in a new tab)kit/capture-frames.mjs (opens in a new tab)kit/check-card.mjs (opens in a new tab)kit/doctor.mjs (opens in a new tab)kit/drawing.cjs (opens in a new tab)kit/film-stills.mjs (opens in a new tab)kit/index.cjs (opens in a new tab)kit/media.cjs (opens in a new tab)kit/qa-loop.mjs (opens in a new tab)kit/shell.cjs (opens in a new tab)kit/text.cjs (opens in a new tab)kit/timeline.cjs (opens in a new tab)references/field-guide.md (opens in a new tab)references/kit-api.md (opens in a new tab)scripts/init-kit.mjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub chanmeng666/chanmeng-svg-animation-studio --plugin chanmeng-svg-animation-studio