Blog · December 3, 2026 · 9 min read
toon-pov: A Free Claude Code Skill That Makes 2D Cartoon Story Videos in Code
Nobody animated this video. I sent Claude a reference clip and asked for the style as a free skill. It built a 2D cartoon engine on a canvas: painted characters whose faces react on the spoken word, a cabin by lamplight, a storm at sea, a river at golden hour, captions that appear word by word. Here is how it works, what broke on the way, and what it still can't do.
Nobody animated the video below. There is no illustrator behind it, no stock art and no image or video AI. Claude wrote every shot as code: the farmer who reads the news by lamplight, the storm at sea, the river at golden hour, the merchant who grins behind his counter, the captions that appear word by word. The vertical cut exports in about 90 seconds on my laptop and costs nothing. The skill that made it is called toon-pov, and this post is about how it was built and where it still falls short.
This is my sixth 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 goes back to flat 2D, but paints it like a cartoon film: people with big faces that act, light that sets the mood, and a camera that moves through layered sets.
Where it came from
I sent Claude a short reference clip, a 2D cartoon POV story, and asked for the style as a free skill with no paid APIs. Claude studied it frame by frame and wrote the look down as code. It split the work three ways. First it wrote the engine: the layer stack, the camera, the paint finish and the captions. Then two more Claude agents built the characters and the sets at the same time, each in their own files, while the first one wrote the demo script, checked the facts and made the voice. Here is roughly what the look came to:
- 01One painted finish. A single paint function gives every shape the same look: a soft gradient lit from the key light, a cel shadow with a soft edge on the far side, a rim of light from behind, and a dark, warm ink line that is thin in wide shots and bold in close-ups.
- 02Faces that act. Big eyes with a coloured iris, a dark ring and two highlights, thick brows, a nose with a highlight and a mouth that changes shape. Eyes blink on their own and look where they are told. 21 expressions blend into each other and can start on a spoken word: shock, awe with a sparkle in the eye, tired, sick with a green tint, smug, a laugh.
- 03Hands that read. Big cartoon hands with fingers and 20 poses, from hands on hips and a shrug to a reach toward the camera. A character can hold anything you draw: a newspaper, a gold pan, a shovel. First-person shots get POV hands that come in from the bottom of the frame.
- 04A cast. Four builds, ten outfits (from an 1840s farmer, miner and merchant to a hoodie, a dress and a blouse), eight hair styles and six kinds of beard, in front, three-quarter and side views, standing, sitting or crouching. A crowd helper fills a mining camp with dozens of small figures digging, panning and walking.
- 05Light that tells the story. Looks for day, morning, golden hour, dusk, night, lamp light, fridge glow and storms set the light direction, the shadow colour, the rim light, a glow and a colour grade, so a story can move from a blue night to a golden morning.
- 06Sets, props and effects. Eight painted sets built from layers at different depths: a cabin, a river, a stormy sea, a mining camp, a general store, a kitchen, a bedroom and a soft backdrop for close-ups. 34 props and 15 effects, from an oil lamp with a flickering flame to rain, lightning, dust in a light shaft and a lens flare.
- 07A real story to prove it. The worked example in the repo is the video above: the Gold Rush in 13 spoken lines and 24 shots.
It does not copy anyone's characters or artwork. The look is a generic 2D cartoon style, drawn from scratch in code, and the skill file tells Claude not to clone anyone's signature characters, logos or fonts. The caption font is Montserrat, under the SIL Open Font License.

One shot per spoken line
The script is 13 lines. Each line gets a shot, cut just before the voice starts it, and a line can be cut again on a word: split('hook', 'December', 1, 'paper') starts a new shot, POV hands holding the newspaper, the moment the narrator says "December". That is how 13 lines became 24 shots, a new one about every two seconds.
A shot is a function. Every shot picks a look, a set, a subject that acts and a camera that moves. Expressions, poses, turns and glances all take a spoken word as their start time. This is the shot where the story turns:
const SAM = { outfit: 'merchant1840', hair: 'sidepart', hairColor: 'black', beard: 'merchant', nose: 'long', jaw: 'narrow', eyes: 'dark', skin: 'fair', seed: 'sam' };
// faceCam() = a one-line helper in the story that frames a face about a third of the way down the frame
scenes.turn = (S) => { // "But one man got rich without digging."
S.look('lamp');
const A = S.set('store', { prices: false });
const sam = S.char({ ...SAM, x: A.keeper.x, y: A.keeper.y, turn: 0.75, expr: 'neutral' });
sam.turn(0.25, 'got', 0.45).expr('smug', 'rich', 0.3).look(0.1, 0, 'rich', 0.2).head({ tilt: -4 }, 'rich', 0.4);
const v = faceCam(S, sam, 110, { at: 0.36 });
S.cam.push({ x: v.x, y: v.y, from: 125, to: 100 });
};A general store by lamplight. Sam Brannan stands behind the counter, turned to the side. On the word "got" he turns to face us. On "rich" a smug smile spreads, his eyes find the camera and his head tips to one side, while the camera pushes in. S.set('store') paints the room and hands back where the shopkeeper stands, where a customer stands and where the counter top is, so people and props land in the right place. Nobody types a timestamp.
The voice is the clock
Same pipeline as cel-story. Kokoro, a small open voice model, reads each line to a WAV file on your machine, and whisper.cpp writes down when every word starts and ends, one line at a time. The cuts, the expressions, the callouts and the captions all hang off those times. Captions show up to four words at a time. In the vertical cut they sit in the middle of the frame, and each word appears as it is spoken.
Numbers and letters need one trick. The script keeps digits for the captions and a spoken version for the voice: the caption says "1848" while Kokoro says "eighteen forty-eight", and "POV" is spelled "P.O.V." so Kokoro reads the letters. On this video whisper.cpp heard 123 of 124 words. The one it missed was the name Brannan, which it wrote as Brannon.
Three things that broke
Three problems had to be fixed on the way. Each one is now handled by the engine, so the next story doesn't hit it again:
- 01The check said the frames didn't match.
checkrenders the same frames in two fresh pages and compares the pixels. Reading pixels back from a canvas many times makes Chrome print a warning, and here the same frame then came out a few levels different out of 255, so the check failed on frames that looked identical. Now the check and the export copy each frame to a separate canvas and read the copy. The demo matches within 0.019 out of 255. - 02Standing up crashed the character. The farmer starts the cabin shot sitting at the table and stands up on the word "gold". Each body pose is a short list of numbers, and the standing pose was missing one that the starting pose had, so the blend between them produced a number that wasn't a number and the canvas refused to draw. Now every pose lists every value.
- 03Night made the lamps grey. The night looks tint the whole frame dark blue, and that tint turned the warm lamp light and the campfire grey-blue too. The glow pass also lifted the dark corners and flattened night rooms. Now lamps, fires and screens can be drawn after the tint, so they keep their colour, and the night looks use less glow.
check also tests every caption and callout against the safe zone of a Short, clear of the bottom fifth and the buttons on the right. On this video it passed 183 samples in each format.
The stack, and why it costs nothing
- A 2D canvas draws every frame: the sets, the characters, the light and the captions. Each set paints its still parts once per shot, covering everything the camera will see, so most frames only redraw what moves.
- Playwright and headless Chromium render it. On my Windows laptop with Intel Iris Xe graphics, three render pages together average about 46 ms a frame, so the vertical cut of the demo, 1,367 frames, exports in about 90 seconds.
- Kokoro is the voice. It is a small open model that runs locally and costs nothing.
- whisper.cpp times every word, also locally.
- ffmpeg encodes the MP4 and mixes the audio to about -14 LUFS. This one measured -14.6.
- The music is not a file. A soft score is synthesized by code at render time, with no samples, and ducked under the voice.
There is no API key anywhere in this and nothing to pay. There is also no image or video model. Every frame is shapes and gradients drawn by code. A frame depends only on its time in the video, with seeded randomness and no clock, so it comes out the same every time you render it.
Vertical and wide from the same piece
One piece renders as a 1080x1920 Short or a 1920x1080 video. The camera is set by how much of the scene fits from top to bottom, in centimetres, so the same shot shows a narrow slice in the vertical cut and most of the room in the wide one. The rule in the skill file is to keep the subject inside the narrow view and let the set fill the wide one. A few shots pick a different camera distance for each format, and the newspaper shot also moves the hands lower and the "1848" to one side in the wide cut, so they don't cover the headline.

The story in the demo
The demo is a POV story about the California Gold Rush. On December 5, 1848, President James K. Polk confirmed in his message to Congress that there was gold in California. You read the news, borrow money for a ticket west and spend about five months at sea, around the tip of South America. About 300,000 people had the same idea. You crouch in a river all day swirling a pan: the heavy gold sinks and the sand washes away, and most days you find a few flakes. Meanwhile Sam Brannan bought up every pick, shovel and pan he could find. He paid 20 cents for a pan, sold it for $15 and became California's first millionaire. In a gold rush, the smart money sells the shovels.
The skill file asks Claude to check every claim against two reliable sources and keep the list. This one used the Library of Congress, Britannica, PBS American Experience, the Bill of Rights Institute and Wikipedia, and the list ships with the example in the repo.
Install
git clone https://github.com/haiderfarooq3/toon-pov ~/.claude/skills/toon-pov
cd ~/.claude/skills/toon-pov && npm install && npx playwright install chromium
pip install kokoro-onnx soundfile
node ~/.claude/skills/toon-pov/bin/toon-pov.mjs doctorYou also need ffmpeg, whisper.cpp with its base English model, and the two Kokoro model files. The README says where they go. doctor checks every piece and prints the fix for anything missing. Then ask Claude Code for a video: "make a toon-pov POV short about the first day of the Pony Express". It writes and checks the script, makes the voice, writes the shots, looks at the stills, 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.
Where it falls short
- Side views are rough. A character turned fully sideways doesn't look right yet. Front and three-quarter views work best.
- Walking is stiff. People walk and run, but their arms barely swing.
- Hair is simple up close. In an extreme close-up, the fringe is a row of flat wedges.
- The sea is stripes. Waves are bands of colour, not painted foam.
- It is slower than the 3D skills. About 46 ms a frame here, against about 25 for cel-story on the same laptop.
- It is tested on Windows only. macOS should work, but I haven't tried it.
- The voice is a free model. Kokoro is clear, but it is not a human narrator.
Four styles in one day
toon-pov is the fourth new style in one day, after cel-story, maker-bench and pixel-spec. It took one evening because the plumbing already existed: the voice, the word timing, the still sheets, the check and the export all came over from cel-story. The new work was the look, and a look is the part a reference clip can teach.
If you want to see the other formats I make this way, the content catalogue has one finished example of each, and this story is in it now. If you want a video like this for your product, start at the contact page. The vertical cut is on YouTube as a Short. And if you just want the skill, it is on GitHub, MIT licensed. Go make your viewer the main character.
Questions people asked
- Is toon-pov really free?
- Yes. Every frame is drawn on a 2D canvas in headless Chromium, Kokoro speaks the script, whisper.cpp times the words and ffmpeg encodes the video. All of it is open source and runs on your own computer. There are no API keys, no accounts and no usage limits. The music is generated by code at render time, and the caption font, Montserrat, is under the SIL Open Font License.
- How long does a render take?
- About 46 ms a frame on a Windows laptop with Intel Iris Xe graphics, with three render pages working at once. The vertical cut of the 46-second demo in this post, 1,367 frames, exported in about 90 seconds, and a sheet of all 24 shots renders in about 4 seconds. Making the voice and timing the words is a separate step you only run when the script changes.
- What kind of videos is it for?
- Short stories told to the viewer as "you": history ("POV: it's December 1848..."), "life of a ..." stories, before-and-after stories and short story ads for a product. It ships with 1840s sets (a cabin, a river, a stormy sea, a mining camp, a general store), modern ones (a kitchen and a bedroom) and a soft backdrop for close-ups. Anything else, Claude paints in code from basic shapes.
- Does it work on Windows and Mac?
- It is tested on Windows 11. It only needs Node, Chromium and ffmpeg, plus the voice and timing tools, 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.
- 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. toon-pov uses Playwright, Kokoro, whisper.cpp and ffmpeg, all open source, and bundles the Montserrat font 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.