calesthio/2d-character-rig-animation
Production guidance for reusable layered 2D character rigs in browser-rendered and video media. Use for SVG hierarchies, pivots and constraints, FK/IK planning, pose and facial libraries, acting, cycles, deterministic handoff, crop variants, and rig QA; not for character concept continuity, 3D armatures, or motion-capture solving.
npx skills add https://github.com/calesthio/generative-media-skills --skill 2d-character-rig-animation
Use this skill after the character design and approved model/reference sheets exist. Its job is to turn that design into a reusable performance system whose parts stay connected, poses remain on-model, facial states read clearly, and animation can be reproduced across shots and runtimes.
The rig may be SVG, layered vector art, raster cutouts, a bone-and-mesh puppet, or a hybrid. Runtime APIs differ; the production contract does not.
This skill owns:
It does not own:
Technical references were checked 2026-07-12. Runtime-specific transform, clipping, mesh-deformation, IK, and export behavior is volatile; verify the selected renderer and version before committing the rig architecture.
Collect or create:
If the approved design cannot separate or deform without visible damage, return to design with a specific production constraint. Do not quietly alter anatomy, costume, logo placement, disability representation, or signature features.
Split the character where independent motion, occlusion, deformation, replacement, or attachment requires it. Too few parts limit acting; too many parts produce seams, draw-order problems, and maintenance cost.
Typical roles:
character-root
+- shadow
+- rear-accessories
+- pelvis
| +- torso-chain
| | +- chest
| | | +- neck
| | | | `- head
| | | +- arm-left
| | | `- arm-right
| | `- clothing-overlap
| +- leg-left
| `- leg-right
+- front-accessories
`- fx-and-contact-guides
The face can use nested controls for brows, lids, pupils, mouth replacements/deformation, cheeks, and optional head-turn features.
Production heuristics:
Documented fact: SVG establishes viewports and user coordinate systems. viewBox maps a specified rectangle into the viewport, and transforms can be applied to elements and groups. Nested group transforms compose through the hierarchy.
For SVG rigs:
viewBox and document character scale/origin;Use a neutral root pose with known local transforms. Store pivots numerically in the rig manifest even when the runtime can infer transform origins, because browser and export behavior can differ.
Best for graphic, mechanical, paper-puppet, or limited-animation styles. Rotate/translate/scale whole parts around joints. Protect seams with overlap art and occlusion layers.
Best for discrete hand shapes, mouth poses, eye shapes, perspective turns, and props. Define mutually exclusive groups and transition rules. A replacement is not a tween unless an actual in-between design exists.
Best where bending a rigid piece would create an obvious elbow, torso, cloth, tail, or facial defect. Define control influences and limits, then test extreme poses. Keep deformation local; excessive influence creates rubbery volume loss.
Often appropriate: rigid forearm plus replacement hands, deforming torso, replacement mouths, and layered hair chains. Choose per visual requirement rather than forcing the whole character into one technique.
Every control should have:
Use forward kinematics when rotations should flow from parent to child and arcs are artist-directed: spine, head, tail, hair, loose gestures. Use inverse kinematics when an endpoint must stay attached: planted foot, hand on a desk, prop grip. A hybrid arm/leg rig may switch modes only with an explicit match procedure so the limb does not pop.
IK requirements:
Never let the solver choose an arbitrary elbow/knee direction at a singularity.
Create poses that represent performance intent, not only technical extremes:
Each pose record should include body controls, face state, hand/prop state, view variant, hold suitability, and approved transitions. Pose libraries accelerate work only when they preserve character-specific acting; generic emoji poses are not a performance system.
Separate controls for:
Viseme count should match the style, language, shot size, and schedule. Do not prescribe a universal inventory. Group phonemes that look similar at the target resolution, but preserve closures and distinctive shapes needed for intelligibility. Record which languages the set has actually been tested against.
Dialogue direction:
Do not infer emotion or personality solely from an automatic transcript. Use the approved performance direction.
Plan each beat with:
Production heuristics from animation craft:
For a cycle, define exact first/last compatibility, contact phases, root travel, and whether it is in-place or translating.
Walk-cycle QA:
For object contact, decide which system owns the attachment. A prop should not be independently animated while also parented to a hand unless the offset is intentional and documented.
Deliver animation as explicit time-addressable state. A renderer may request frames backward or out of order.
Recommended shot record:
{
"shot_id": "explain-step-two",
"fps": 30,
"start_frame": 0,
"end_frame": 179,
"rig_version": "presenter-rig-03",
"view": "three-quarter-right",
"tracks": {
"root.position": [[0, [0, 0]], [72, [8, -3]], [179, [0, 0]]],
"arm_right.rotation": [[42, 4], [64, 28], [110, 28], [142, 6]],
"mouth.pose": [[51, "M"], [55, "AH"], [60, "rest"]]
}
}
This is an example schema, not a repository requirement.
Handoff rules:
Do not blindly scale one performance into every canvas.
Test the rig before shot production with a standard suite:
10. every delivery crop and repeated clean render.
Classify defects:
Record frame, control values, cause, fix, and retest. Do not repair shot after shot when the root cause belongs in the rig.
Documented fact: WCAG 2.2 SC 2.3.1 limits flashes to no more than three in any one-second period unless below general/red flash thresholds. Blinks, eye closures, and ordinary pose changes are not automatically flashes, but high-contrast full-field eyelid, background, FX, or emissive changes can be.
Also review repetitive shaking, rapid zooming, spinning, and large-field movement. Interactive character surfaces should support reduced-motion preferences and controls where applicable. Prerecorded output may need a separately rendered calmer version.
SVG IDs and ARIA labels do not make every internal rig part meaningful to assistive technology. For interactive delivery, expose the semantic character/action at the appropriate container level and hide purely decorative implementation parts when appropriate. For video, provide captions, transcript, and description of essential visual-only action.
Track separately:
A rig license does not grant character rights, and character rights do not automatically grant performer likeness or voice rights. Preserve attribution and restrictions in the delivery ledger. Escalate branded mascots, licensed characters, real-person likenesses, minors, culturally sensitive designs, and synthetic replicas for appropriate approval.
Deliver:
This is a complete example, not a mandatory formula.
Intent: build a reusable flat-vector dog mascot for a browser campaign with idle, walk, sit, alert, and tail-wag loops.
Constraints: side and three-quarter approved views; 30 fps output; no mesh deformation in legs; tail may use a three-segment chain; collar logo must never mirror; loops must work in 1:1 and 9:16.
Rig plan: root at pelvis; torso/chest/head FK chain; separate near/far legs with two-bone controls and foot targets; three tail groups; ear chains; eye replacements; mouth closed/open/pant states; collar/logo separate in fixed draw order.
Animation plan: four-pose walk structure with planted foot targets and matching root travel; idle uses subtle chest breath and staggered ear/tail overlap; alert pose leads with head and ears, then chest; sit is a keyed action, not an IK collapse.
QA: overlay ground-contact frames; test tail/body collision; inspect near/far leg draw order; check first/last loop state; verify collar logo orientation in every view; render isolated frames backward.
Expected result: stable silhouette, no sliding feet, no gaps at hips/shoulders, readable states at mobile size, and reusable loops with documented speed ranges.
Likely failures: far leg crosses in front, tail opens a seam, root travel disagrees with stride, eye replacements pop, logo mirrors in the alternate view.
Variation: for a paper-cut style, expose joint pins deliberately and remove hidden overlap art only after the visual treatment is approved.
This is a complete example, not a mandatory formula.
Intent: animate a seated presenter for a 45-second technical explainer with dialogue, two pointing gestures, a tablet contact, and 16:9/9:16 outputs.
Constraints: approved three-quarter view; upper-body priority; exact narration timestamps; six-language localization planned; hands must contact tablet and diagram; restrained enterprise tone.
Rig plan: pelvis/root and three torso controls; neck/head; eye aim; independent lids/brows; tested language-appropriate viseme set; FK/IK arms with match controls; replacement hands; tablet attachment target; limited lower-body controls; front/back forearm draw-order switch.
Performance plan: establish listening pose; anticipate first point with gaze, then hand; pin fingertip to diagram while torso settles; return through a clear intermediate pose; use asymmetric brow/gaze on the contrast line; hold the final open-hand summary pose. Localized dialogue reuses acting beats but retimes mouth and selected gestures rather than time-stretching the whole performance blindly.
QA: arm reach and IK bend, hand/tablet attachment, mouth closure and corners, eye convergence, brow clipping, draw-order switches, caption clearance, vertical gesture replacement, and frame-accurate repeated render.
Expected result: character appears to think and present rather than cycle through controls; contact is stable; localization can revise speech timing without rebuilding the rig.
Likely failures: elbow flips near extension, hand slides on tablet, every syllable triggers head motion, visemes are unsuitable for a target language, vertical crop removes the pointing hand.
Variation: if deterministic exactness outweighs reusable deformation, replace the two hero gestures with approved pose-to-pose hand/arm drawings while retaining the facial rig.
Official and authoritative sources checked 2026-07-12:
viewBox: https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/viewBoxTake calesthio/2d-character-rig-animation from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.