/animation-skills:sketch-to-simfrom animation-skills
Turns a pencil sketch of a simple machine into a physics-simulated 3D animation video with Rapier physics engine, including interactive sandbox. For trebuchets, catapults, domino runs, marble runs, and Rube Goldberg machines.
Ships in animation-skills. 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.
A film has one shape: a pencil sketch on a desk is read (parts labelled in orange handwriting, cleaned up into ink, measured), then lifts off the paper as white cut-outs that fill in as wood, then runs. The first run usually fails in an instructive way, a tweak rewinds it and changes one parameter, the second run works, a slow replay shows the key moment with measured speeds, and a "Build it yourself" panel lets you play with the parameters. Everything is physically simulated; nothing is keyframed except the camera.
Run every command from this skill's directory.
node scripts/setup.mjs
Installs three, Rapier and playwright-core into this directory, finds or downloads Chromium, checks ffmpeg, and renders a smoke frame of the example. Rendering uses the GPU (--use-angle=metal on macOS); on a machine without one it still works, slowly.
1. Get the machine. If there is a sketch or photo, read it: list the parts, how they connect, what moves, and every dimension written on it. If there is no sketch, design the machine from the request. Either way, write down the chain of cause and effect in one line per stage ("ball rolls down ramp; hits first domino; ...") before any code. Each stage becomes a trigger.
2. Write machine.js in a project folder outside any repo. Copy the closer of the two examples (examples/rube-goldberg/ for chains of triggers, examples/trebuchet/ for a held lever that is released) and read references/spec.md. Parts are boxes, beams, balls, wheels and convex polygons in side view (x right, y up from the pencil ground line, metres); hinge() joins bodies; parameters may move parts but not resize them.
3. Make the physics true before drawing anything. This is where the time goes, and it is fast:
node scripts/tune.mjs <project>/machine.js # one run with default parameters
node scripts/tune.mjs <project>/machine.js --scan gap=0.03:0.08:0.005
node scripts/tune.mjs <project>/machine.js gap=0.04 --speed ball2@seesaw
Each run reports which triggers fired and when. Tune until the story's failure and success both happen for real, with a margin either side. references/physics.md lists the failure modes met so far and their fixes (a hinged body frozen by a plane lock, a ball that bulldozes light dominoes, a lever that needs a cup, a bell struck from the wrong side). Never fake an outcome in the story; change the machine until the physics does it.
4. Write the story and the sandbox in the same file: what READ labels and where, dimension lines, the chapters (READ, LIFT, a failing run, TWEAK, the working run, REPLAY, DONE), notes tied to triggers, and the sandbox's stats and scripted session. references/story.md has the format and timing rules.
5. Look at stills, then render.
node scripts/capture.mjs <project>/machine.js <project>/sheet.png --stills 1,8,15,22,30,40,50,60 --dpr 1
node scripts/capture.mjs <project>/machine.js <project>/film.mp4 --video --fps 60 --dpr 2
node scripts/sound.mjs <project>/machine.js <project>/film.wav
ffmpeg -i <project>/film.mp4 -i <project>/film.wav -af loudnorm=I=-19:TP=-1.5 -c:v copy -c:a aac -b:a 192k -shortest <project>/final.mp4
The stills command prints each chapter's start time, which is what to pass to --stills and --at. Check every chapter against references/style.md before the full render; a full 80 second film at 60fps takes about four minutes on an M1 Pro.
6. Hand over the MP4, a stills sheet, and the live page: node scripts/serve.mjs <project>/machine.js prints a local URL where the tour plays in real time and the sandbox's sliders, Run and Reset work.
The physics decides what happens. If the story needs a miss, find the parameter value that really misses; if a displayed number (a speed, a time) is not what the simulation measured, the number changes, not the simulation. Say so to the requester when their reference shows numbers the physics cannot reproduce.
Keep the machine in the plane of the drawing: every part is a side-view profile extruded to a depth, and motion is planar. It is what makes a pencil sketch a faithful blueprint, and it keeps Rapier stable.
Parameters move parts, never resize them, so the model and the sketch stay one object.
references/spec.md: parts, bodies, hinges, materials, parameters, triggers, start and holds.references/story.md: READ labels and dims, chapters, notes and their timing, cameras, the sandbox and its script.references/physics.md: how the engine simulates, the tuning loop, and the failure modes with fixes.references/style.md: the look to match and the quality bar to check before handing over.examples/rube-goldberg/machine.js: a finished machine: ramp, dominoes, a dropped ball, a seesaw with a cup, a service bell.examples/trebuchet/machine.js: a counterweight trebuchet against a block tower, with a LOAD chapter that cocks the arm, a short throw at 0.48 kg and a hit at 0.68 kg. Copy it for any machine with a held, released lever.engine/fonts/OFL-caveat.txt (opens in a new tab)engine/fonts/OFL-geist.txt (opens in a new tab)engine/fonts/OFL-geistmono.txt (opens in a new tab)engine/fonts/OFL-gochihand.txt (opens in a new tab)engine/fonts/caveat.woff2 (opens in a new tab)engine/fonts/geist-mono-variable.woff2 (opens in a new tab)engine/fonts/geist-variable.woff2 (opens in a new tab)engine/fonts/gochi-hand.woff2 (opens in a new tab)engine/index.html (opens in a new tab)engine/src/main.js (opens in a new tab)engine/src/model.js (opens in a new tab)engine/src/physics.js (opens in a new tab)engine/src/sandbox.js (opens in a new tab)engine/src/sketch.js (opens in a new tab)engine/src/spec.js (opens in a new tab)engine/src/story.js (opens in a new tab)engine/src/textures.js (opens in a new tab)engine/src/ui.js (opens in a new tab)examples/rube-goldberg/machine.js (opens in a new tab)examples/trebuchet/machine.js (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
3 skills in this plugin
/horizon-reelMake short launch videos (8-20s, 1920x1080 MP4 plus a GIF) in the collage "horizon" style of Anthropic's Claude model-launch films. The video cuts fast through dome-shaped horizons made from public-domain museum photos, microscope slides, NASA planet limbs and hand-drawn canvas shots (chalk, crayon, ink scribble, compass lines, paper cutouts), with film grain and a serif line of copy riding each curve. It signs off on a glowing planet-limb card with your brand lockup. Use this whenever someone wants a launch video, announcement reel, teaser, day 0 video, sizzle clip or animated social clip for a model, product or feature launch, especially when they share a reference video and say "make one like this", mention the Claude or Anthropic launch video, or want something more cinematic than a static card./lab-explainerMake a short 3D explainer film in which an apparatus on a dark lab bench demonstrates a formula live. Controls move on screen, the model responds, and every number, highlight and sentence is computed from the real equation. Glowing overlays (rays, beams, planes, angle arcs) show the mechanism, and it renders frame-exact to a 1080p60 MP4 with depth of field and bloom, in the style of the "plane of focus" camera-lens demo. Use this whenever someone wants an interactive-style 3D explainer, an explorable-explanation video, a physics, optics or engineering concept animated with real numbers (focus and aperture, depth of field, refraction, lenses, gears, levers, pendulums, springs, waves, circuits), a "how does X work" product explainer with an exploded view, or shares a video like that and says "make one like this", even if they never say "formula".npx claudepluginhub misbahsy/claude-horizon-animation --plugin animation-skillsOther plugins' skills for the same job