Blog · December 4, 2026 · 7 min read
physics-reel: A Free Claude Code Skill That Makes Satisfying Physics Shorts in Code
Nobody animated these Shorts. A double pendulum welds on every block it touches, a triangle chips its corners until it rolls like a wheel, and each weld or chip plays the next note of a public-domain tune. Claude wrote the physics, the drawing and the sound as code for a free skill. Here is how it works and what it can't do yet.
Nobody animated the two videos below. A double pendulum swings through floating blocks, and every block it touches welds on where it hit and plays the next note of Jingle Bells. A triangle tumbles down a ramp and chips off its sharp corners, one note of Deck the Halls per chip, until it rolls like a wheel. Both are real physics simulations written as code, and the sound comes out of the simulation too. A 37-second Short exports in under a minute on my laptop and costs nothing. The skill that made them is called physics-reel, and this post is about how it works and where it still falls short.
This is my eighth content skill. khan-explainer draws blackboard lessons and paper-reel cuts paper shapes for short reels. cel-story, maker-bench and pixel-spec build 3D sets in three.js, toon-pov paints 2D cartoon stories and silver-reel turns a story into an old newsreel. All seven start from a script and a narrator. physics-reel has neither. The video is the simulation.
Where it came from
Satisfying physics clips are a genre of their own in Shorts feeds: balls bouncing inside shapes, things that stick, break or speed up, a number that climbs until something gives. They work without a single spoken word. There is a line of text at the top, a number that climbs and a payoff you wait for. That genre was the inspiration. Claude wrote the physics, the drawing and the sound for this project, and the looks are original, with no footage, images, logos or names from any channel. A physics-reel video is made of these parts:
- 01A hook, a counter and a payoff. Two lines at the top set up the run: "EVERY BLOCK IT TOUCHES / STICKS FOREVER" or "HOW MANY CORNERS BREAK / BEFORE IT ROLLS?". A live counter climbs with fixed-width digits, so it never jitters. At the climax a banner gives the final count: "360 SIDES LATER / IT'S A WHEEL!"
- 02Real physics. Each simulation runs at a fixed timestep with seeded random numbers, and nothing is animated by hand. The same preset and seed give the same video, frame for frame and sound for sound.
- 03Sound from the run. Every weld, chip or hit triggers a synthesized sound, and the main events play the next note of a public-domain tune, so the melody comes out at the speed of the physics.
- 04A climax and a clean end. A riser builds into the climax, then come a low boom, a bright chord in the tune's key and the banner, and a few seconds later the video fades out.
- 05One JSON file per look. The palette, the hook, the counter, the banner, the tune, the sounds and the physics settings all live in one preset. Copy it, change it, and you have a new video.
The melodies were written out note by note from compositions in the public domain, and the fonts are Lilita One and Rubik, both under the SIL Open Font License.

The physics
Each kind of video is one simulation file. pendulum-weld is a double pendulum: two rigid arms, simulated with the Lagrange equations and solved with RK4 at 240 steps a second. When a block welds on, its mass and inertia join that arm and the momentum is kept, so the swing changes as the arms get heavier. An energy keeper then holds the energy per unit mass so the swing stays lively. Blocks float in over time and drift inward if they wait too long, so every run ends. In the Short, the last of the 102 blocks welds on at 33.3 seconds.
triangle-wheel is one convex shape on a ramp, with its exact area, centre of mass and inertia, solved with impulses for bounce and friction at 300 steps a second. A corner that lands hard enough for how sharp it is breaks off. The corner is cut at the average side length, the chip flies away with its own motion, and the shape settles a little toward round. The side count is steered along a curve toward the climax, but no corner breaks without a real impact. In the Short the 360th side comes at 32.0 seconds.
Four more presets use the same engine. In speed-lines a ball runs down a long winding track packed with thin lines, and every line it breaks makes it faster, so the count climbs faster and faster until it smashes the end wall at 10,000 lines, 32.6 seconds in. In hex-jaws two jointed arms spin inside a turning hexagon and snap shut into a cage, and every ball caught inside comes back as three. Six balls become 904, then the hexagon bursts at 29.4 seconds and 3,616 pour out. That one moves thousands of balls at about 27 ms a frame.
maze-flood is the calm one. A funnel pours water into a diamond-shaped maze on a fine grid. Each bit of water falls, runs along whatever holds it up to the nearest drop, and fills every dead end from the bottom up, so U-bends level out and trapped air stays trapped. The maze is full at 31.6 seconds, then the gate opens and it drains. In merge-drop little characters drop into a round flask, and two of the same size that touch merge into the next, bigger one. Every face is drawn in code: eyes, mouths, sunglasses, heart and star eyes and the crown. The crowned final form arrives at 30.8 seconds, after 64 merges.
A look is a short JSON file. This is the core of the triangle preset:
{
"name": "triangle-wheel",
"kind": "triangle-wheel",
"seed": 3,
"hook": { "lines": ["HOW MANY CORNERS BREAK", "BEFORE IT ROLLS?"], "colors": ["#ffffff", "#5ff2b8"] },
"counter": { "label": "SIDES", "y": 0.265 },
"end": { "banner": ["{n} SIDES LATER", "IT'S A WHEEL!"] },
"palette": { "body": "#3fd6a0", "ramp": "#464c7e", "rampTop": "#c3c8f2" },
"sim": { "slope": 30, "size": 320, "maxSides": 360, "climaxAt": 31, "relax": 0.3 },
"audio": { "melody": { "tune": "deck-the-halls", "on": "chip", "instrument": "glock", "max": 7 } }
}{n} in the banner becomes the final count. climaxAt asks for the climax at about 31 seconds, and in this run the 360th side came at 32.0. relax is how much the shape settles toward round after each break. "on": "chip" plays one note of Deck the Halls per chip on a synthesized glockenspiel, and "max": 7 caps it at seven notes a second when the chips come fast near the end.
The tune plays at the speed of the physics
There are no music files in physics-reel. The skill has nine public-domain melodies written out note by note in a JavaScript file, and the preset decides when the next note plays. pendulum-weld plays one note of Jingle Bells per weld, so the tune moves forward at whatever pace the pendulum catches blocks. triangle-wheel does the same with Deck the Halls, one note per chip, and merge-drop with Rondo alla Turca, one note per merge. speed-lines and hex-jaws work the other way round: the tune plays on its own, and its tempo follows the ball's speed or the ball count. maze-flood plays Pachelbel's Canon slowly, with the sound of water under it.
Under the tune, each kind of event gets its own sound: ticks, pops, thuds, crunches, chips or splashes. A sound can take its loudness from the event, like how hard a corner hit the ramp, and can walk up a musical scale. Noise beds follow the motion, and a riser builds into the climax before the boom and the final chord. All of it is synthesized at render time in about 300 lines of JavaScript, with reverb, and no samples or recordings. The skill file only allows tunes that are traditional or whose composer died more than 100 years ago, so it never uses modern songs or film, TV, game or anime themes.
Same seed, same video
The page runs each simulation twice. The first run plans the video: how long it is, when the climax comes and every sound event. The second run draws the frames. Both use a fixed timestep and seeded random numbers, and effects like sparks and chips take their own random stream, so they never change the physics. plan skips the drawing and answers in a few milliseconds, which makes it cheap to try 20 seeds and keep one whose climax lands between 25 and 45 seconds.
PR="node ~/.claude/skills/physics-reel/bin/physics-reel.mjs"
$PR plan triangle-wheel --seeds 1-20 # length, climax and final count for 20 seeds, no drawing
$PR still triangle-wheel auto sheet.png # 8 frames on one sheet
$PR check triangle-wheel # text: PASS, deterministic: true
$PR export triangle-wheel wheel.mp4 # the Short, then verifycheck tests the hook, the counter and the banner against the safe zone of a Short: clear of the top 7.5%, the bottom 20% and the column of buttons on the right of the lower half. Then it runs the whole simulation again in a fresh page and compares every event and three frames. Both Shorts in this post passed with text PASS and deterministic true. export renders 1080x1920 at 30 frames a second with two workers, mixes the sound from the run's events, brings it to -14 LUFS with a two-pass loudnorm and runs a verify step on the file. The pendulum Short came out at 37.5 seconds and -13.9 LUFS, the triangle at 36.5 seconds and -14.0, and the four newer Shorts at 34 to 37 seconds and -14.0 to -14.3.

The stack, and why it costs nothing
- Plain JavaScript physics, written for this project: an RK4 solver for the pendulum, impulses for the tumbling shape, verlet balls with a spatial hash for the hexagon, verlet circles of eight sizes for the merge flask, and water moved cell by cell on a fine grid for the maze.
- A 2D canvas in headless Chromium, driven by Playwright, draws every frame, on the GPU when there is one, with a cheap two-level bloom for the neon looks.
- Synthesized sound. The bells, plucks, ticks and pops, the noise beds, the riser and the final chord are synthesized from the run's events at render time, with reverb. There are no samples, recordings or MIDI files.
- ffmpeg encodes the H.264 video with AAC sound and brings the mix to about -14 LUFS.
- Two fonts, Lilita One and Rubik, both under the SIL Open Font License, ship with the skill.
- Speed. On my Windows 11 laptop with Intel Iris Xe graphics it draws a frame in about 19 to 28 ms with two workers, so a 37-second Short exports in 40 to 55 seconds, sound and encode included. If only the sound needs to change,
export --audio-onlyre-mixes it onto the finished render in a few seconds.
There is no API key anywhere in this and nothing to pay. There is no image, video or music model either. Every frame and every sound comes from code.
Make your own look
A new video is a copied preset with a few changes. Change the hook, the colours, the tune or the physics, plan a few seeds and export:
$PR new looks/ruby-wheel.json --from triangle-wheel
# edit hook, palette, audio.melody.tune, sim.slope ... then
$PR plan looks/ruby-wheel.json --seeds 1-20 # pick a seed with the climax at 25-45 s
$PR export looks/ruby-wheel.json ruby-wheel.mp4A new kind of simulation is one more file in engine/sims/ that steps the physics, draws a frame and reports its count, its events and a checksum. The skill file tells Claude to read the pendulum file first.
Install
git clone https://github.com/haiderfarooq3/physics-reel ~/.claude/skills/physics-reel
cd ~/.claude/skills/physics-reel && npm install && npx playwright install chromium
node ~/.claude/skills/physics-reel/bin/physics-reel.mjs doctorYou also need ffmpeg with ffprobe on your PATH. doctor checks Node, ffmpeg, Playwright and Chromium, the fonts and whether the GPU is used, and prints the fix for anything missing. Then ask Claude Code for a video: "make a physics-reel short where a triangle turns into a wheel". It picks or copies a preset, plans the seeds, looks at a still sheet, runs the check and exports. Claude can't hear the mix, so the skill tells it to say so and ask you to listen once, and it never posts anything without your go-ahead.
Where it falls short
- Six simulations so far. A 3D ball-grid wave, a sheet of balls rippling over a platform, is next on the roadmap.
- Vertical only. Every layout is 9:16 for now. Wide 16:9 layouts are on the roadmap too.
- Claude can't hear it. The mix is checked by loudness and a verify step, not by ear, so the skill asks you to listen once.
- Quick tests and real runs can differ. A
tunecommand runs a simulation in Node to try settings fast, but the browser run is the one that makes the video, and its numbers can come out slightly different. - Only old tunes. Every melody is public domain, so you won't get a modern song out of it.
- It has only run on Windows. macOS should work the same way, but I haven't tried it.
Eight styles
physics-reel is the eighth style, and the first one with no script and no voice. A new kind of video is one simulation file and one preset, and the planning, the check, the sound and the export come with it. The ninth, melody-bounce, makes guess-the-song Shorts the other way round: the tune comes first, and the walls and steps are planned to fit it.
If you want to see the other formats I make this way, the content catalogue has one finished example of each, and the welding pendulum is in it now. If you want a video like this for your product, start at the contact page. The two Shorts are on YouTube: the welding pendulum, public from December 5, 2026, and the triangle that turns into a wheel, public from December 6, 2026. And if you just want the skill, it is on GitHub, MIT licensed.
Questions people asked
- Is physics-reel really free?
- Yes. The physics, the drawing and the sound are code written for the project. Headless Chromium, driven by Playwright, runs the simulation and draws the frames, and ffmpeg encodes the video. All of it runs on your own computer. There are no API keys, no accounts and no usage limits. There are no samples or recordings either: every sound is synthesized at render time, the melodies are public domain, and the two fonts are under the SIL Open Font License.
- How long does a render take?
- On a Windows laptop with Intel Iris Xe graphics, about 19 to 28 ms a frame with two render workers. A 37-second Short exports in 40 to 55 seconds, sound and encode included. Planning a run takes a few milliseconds because nothing is drawn, so trying 20 seeds to find a good climax is quick.
- Does it need a voice or a script?
- No. There is no narrator. The only words on screen are two lines at the top, a live counter and a banner at the climax that gives the final count. The sound comes from the simulation itself: every weld, chip or hit triggers a sound, and the main events play the next note of a tune.
- Which music can it play?
- Nine public-domain melodies written out note by note: Jingle Bells, Deck the Halls, In the Hall of the Mountain King, The Entertainer, Ode to Joy, Rondo alla Turca, Twinkle Twinkle, Greensleeves and Pachelbel's Canon. A preset plays one note per event, or lets the tune run with a tempo that follows the motion, such as the ball's speed. The skill file only allows traditional tunes or ones whose composer died more than 100 years ago, and never modern songs or film, TV, game or anime themes.
- Does it work on Windows and Mac?
- It is tested on Windows 11. It only needs Node, Chromium (through Playwright) and ffmpeg, so macOS should work the same way, but I have not tested it there yet. Run the doctor command and it tells you what is missing and whether the GPU is used.
- Can I use it from Codex, Gemini CLI or another agent instead of Claude Code?
- Yes. The skill is one markdown file plus a small Node command-line tool. Any coding agent that can read a markdown file and run a shell command can follow it. Claude Code picks it up automatically from ~/.claude/skills; for other agents, point them at SKILL.md.
- Is it affiliated with Anthropic?
- No. It is an independent MIT-licensed project. Claude is a trademark of Anthropic. physics-reel uses Playwright and ffmpeg, both open source, and bundles the Lilita One and Rubik fonts under the SIL Open Font License. The credits are in NOTICE.md.
Haider Farooq is an AI engineer and data scientist based in Lahore, Pakistan — core engineer on TryCook.ai, developer at Aligno, and creator of MarkSafe.net. He builds agentic AI systems, RAG pipelines, and automation for teams worldwide. Work with him.
RELATED WORK