/animation:learn-style <rotoscope work dir> <pack dir> [--cuts T,T,..] [--credit TEXT] [--negative SUMMARY.json ...]from animation
Measures a rotoscoped clip into a style pack with knob values, statistic bands, and adversarial controls. Use when extracting or matching animation styles.
Ships in animation. 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.
Turn a rotoscoped clip into a style pack: the numbers that make the style what it is, and a check
that tells whether a new film shares them. The pack holds statistics only; never copy traced
geometry, source frames or the clip into it. Read
reference/statistics.md first: what each statistic measures, how a
band is set, which statistics separate the woodcut style from a filtered near miss and from other
styles, and what the check still cannot separate.
Run each script as python3 ${CLAUDE_PLUGIN_ROOT}/scripts/pydeps.py run --data-dir "${CLAUDE_PLUGIN_DATA}" -- <script> ..., alone as its own Bash call: no cd, no --help run first, and no other command chained to it; this page gives each script's arguments.
Never probe the host Python, numpy or cv2, never run pydeps.py install, and never list, create or read anything under ${CLAUDE_PLUGIN_DATA} yourself: pydeps.py run finds the packages, and when it exits 2 it prints the repair line, which you report (/animation:setup checks the requirements). Input is a
rotoscope work directory (d/dNNN.json traces and src/dNNN.png drawings). The scripts are
${CLAUDE_PLUGIN_ROOT}/skills/learn-style/scripts/learn.py,
${CLAUDE_PLUGIN_ROOT}/skills/learn-style/scripts/controls.py and the shared
${CLAUDE_PLUGIN_ROOT}/scripts/inkstats.py.
styles/<name>/ in the plugin, tool-neutral:
| File | Written by | Holds |
|---|---|---|
style.json | learn.py, then you | palette (ink, paper, tone ramp), knobs (the seven-knob schema), stats (p10/p50/p90), timing, ref (the source's values), bands, check, measured_only, heldout (how each band was set and how it tested), brush, credit, rotoscope_fits |
STYLE.md | you | the style in words for a reader: credit, knob table with each value marked measured or judgment and pointing at its style.json key, how to author in it, the validation result |
learn.py measures everything but credit, brush and the movement, camera and
backgrounds knobs, which it keeps from an existing style.json; fill those knobs from viewing
the source and mark them "basis": "judgment". check is learn.py's CHECK, the statistics
shown to separate, less any content-class row the source defines in fewer than two parts;
measured_only lists the subject-sensitive statistics the check prints but never judges. The
numbers live in style.json only; STYLE.md and other docs point at its keys. Read a pack's style.json with the Read tool by absolute path, never with python3 -c, cat, jq or ls in a shell.
controls.py measure <out> --near <a near-miss film> --other <films in other styles> --source <the clip> --replica <rotoscope work dir> measures a filtered family of the near miss
(blur, noise, stripes, dry brush, contour warp), synthetic flat polygons, the other styles, and
the same-style positives, alternating the controls between a calibration and an evaluation half.learn.py <work> <pack dir> --cuts <the clip's shot starts> --credit "<who made the source, its URL, date>" --negative <out>/calibration/*.json. Bands come from film-sized
excerpts of the source, split by shot, with half the splits held out; the calibration controls
cap each band's widening so they keep failing.controls.py check <out> <pack dir> must show every control failing (margin
above 0) and the source and replica passing, with the evaluation half held out. Then
controls.py selftest <pack dir> --near <the near-miss film> (the pack argument is required)
must exit 0. Put the table in reference/statistics.md. A control that passes goes under "what
the check cannot say"; never narrow a band until it fails.style.json and write STYLE.md.palette.ink as every ink.js call's color (the engine's INK default is not the pack's).
Render it at the source's size with ${CLAUDE_PLUGIN_ROOT}/scripts/render.py <scene.js> <frames dir> --fps <the pack's knobs.frame_rate.base_fps> --encode mp4 --playwright-core '${user_config.playwright_core}' (it serves the scene's folder and scripts/), and run
inkstats.py <frames dir>.mp4 --cuts <shot starts> --pack <pack dir>. A produce production
passes its shots.json as --cuts. It exits 0 only when every checked row and the palette
pass. Each row prints its distance to source (0 is the source value, 1 the band edge on either side); the
film's distance ranks passing scenes and its margin names the row nearest failing.--region X,Y,W,H --t T0-T1 next to source prop boxes, then
read every drawing at 1:1 (tile frames so no image is over the long-edge limit
${CLAUDE_PLUGIN_ROOT}/skills/rotoscope/reference/method.md, Reviewing images, records; never
downscale, never a GIF) beside source crops. A pass on the numbers with a crop that does not
read as the style is a fail; say which mark is wrong.brush and the result into STYLE.md,
including where the scene still falls short.Repeat 5-7 until the check passes and the crops read as the style. Tune the scene against the
check, never the check against the scene. inkstats.py with no pack (--json for the full
summary) measures any film, which is how to compare two films.
/animation:produce <production dir>
It takes a style pack this skill wrote and makes the film: boards for approval, then shots, render, and review.
grain and period are measured only: on the woodcut source they follow codec residue and the
pixel grid, and a flat black through h264 lands in grain's band. flat rejects texture laid
over all the black, and rough and offstep do not move under blur, noise, stripes or dry brush.
controls.py selftest <pack dir> [--near <film>] exits 1 if the review's blur-and-stripes filter
(and, with --near, the warped, retimed ATTACK) gets a synthetic or near-miss film through;
rerun it with --near after changing a statistic.straight and sliver follow the subject, so they are checked only inside the content classes
border and caption (straight_border, sliver_caption, ...) and printed as measured only over
the whole frame. boil is measured on the border and caption. A scene without a frame line or a
caption panel in the top quarter leaves those rows n/a; draw both, as the source does.w50 and pw50 come from a distance transform and move in 2 px steps; every woodcut source
excerpt has pw50 8, so neither is checked.offstep: hold a few drawings for 2 or 4 frames.soft needs a soften pass after drawing, since a two-tone canvas render has almost no edge ramp.
Chromium's ctx.filter = 'blur()' does nothing below a floor
(${CLAUDE_PLUGIN_ROOT}/skills/rotoscope/reference/method.md, Rendering, holds the dated
record); soften in JS instead.What SKILL.md sets; muted values are Claude Code's defaults
4 skills in this plugin
/produceProduce an animated film or short from a brief and style packs: approval boards, shot list, rendered frames, delivered file, and pack review. Use when: 'produce this film', 'animate this brief', 'storyboard then render'. Not for copying a reference clip: /animation:rotoscope; not for measuring a new style: /animation:learn-style./rotoscopeCopy a reference animation clip drawing by drawing: decode drawings, trace vectors, render via ink.js, measure replica against source, fit overrides. Use when asked to replicate or match a video frame by frame: 'rotoscope this', 'trace this clip', 'copy this animation one to one'. Not for films: /animation:produce; style: /animation:learn-style./setupnpx claudepluginhub melodic-software/claude-code-plugins --plugin animationOther plugins' skills for the same job