# pixel-spec: A Free Claude Code Skill That Makes Retro Pixel Explainer Videos in Code

> Source: <https://dev.to/haiderfarooq3/pixel-spec-a-free-claude-code-skill-that-makes-retro-pixel-explainer-videos-in-code-40ep>
> Published: 2026-12-03 22:36:30+00:00

**Key takeaway:** A Claude Code skill can turn each spoken script line into a three.js shot function with studio lighting, camera push and word-timed UI, rendering a 12-shot retro explainer in under a minute in headless Chromium at zero cost.

*Nobody animated this video. I sent Claude a reference reel and asked for the style as a free skill. It built a pixel-retro spec engine in three.js: a 3D object lit like a product photo, pixel-art skies, retro windows, an exploded view, captions where the key word pops into an orange box. Here is how it works and what it still can't do.*

Nobody animated the video below. There is no 3D artist behind it, no downloaded 3D models and no video AI. Claude wrote every shot as code: the gold computer, the pixel moon, the retro windows, the numbers that count up, the orange box that jumps to each key word. The whole thing exports in under a minute on my laptop and costs nothing. The skill that made it is called [pixel-spec](https://github.com/haiderfarooq3/pixel-spec), and this post is about how it works and where it still falls short.

*Watch the video on [haiderfarooq.dev](https://haiderfarooq.dev/blog/pixel-spec-retro-explainer-videos-in-code). 12 shots from 12 spoken lines. The voice is Kokoro, free and local. Every frame is code rendered in headless Chromium. The vertical cut is on YouTube as a [Short](https://www.youtube.com/shorts/kPQ42btJ1Pg).*

This is the third 3D skill on the same engine. [cel-story](https://haiderfarooq.dev/blog/cel-story-3d-story-videos-in-code) tells cartoon stories, [maker-bench](https://haiderfarooq.dev/blog/maker-bench-3d-explainer-videos-in-code) explains how things work on a cutting mat, and pixel-spec explains one machine at a time, spec by spec, in a retro pixel look. The two flat ones came first: [paper-reel](https://haiderfarooq.dev/blog/paper-reel-explainer-reels-in-code) for cut-paper reels and [khan-explainer](https://haiderfarooq.dev/blog/claude-code-skills-for-content) for blackboard lessons.

I sent Claude a reference reel in this style and asked for it as a free skill I could run on my own machine. Claude studied the frames and wrote the look down as code, on top of the cel-story engine from earlier the same day. Here is roughly what the look came to:

It does not copy anyone's product or channel. The skill file tells Claude to build its own simple version of an object, and not to copy a real product's design, logo, face or name, or a channel's fonts or music. The computer and the keypad in the video are simplified models built in code, not copies of the real drawings.

*All 12 shots of the wide cut, the way the skill's still command renders them: the middle frame of each shot with its time and name. The skill tells Claude to look at a sheet like this, in both formats, before it exports anything.*

The script is 12 lines, and here each line is exactly one shot. A shot is a function. The skill file says every shot needs a background, studio light, a hero that moves, a camera that never locks, UI that lands on the spoken word, and a layout for both formats. This is the clock shot:

```
// crystalModel() = a crystal can built from simple shapes; lay(S, tall, wide) picks a value per format
scenes.clock = (S) => { // "Its clock ticked about a million times a second."
  S.bg('dark', {});
  S.studio({ shadow: 'wall', key: 2.6 });
  const xtal = crystalModel(); S.add(xtal, { at: [0, 0.1, 0], rot: [8, -28, 6] }); S.float(xtal, { spin: 0.38, amp: 0.05 });
  S.cam.push({ look: [0, -0.1, 0], from: lay(S, 7.2, 6.0), to: lay(S, 6.4, 5.3) }).shift(lay(S, 0, -0.2), lay(S, 0.16, 0.04));
  S.win({ title: 'CLOCK.EXE', x: lay(S, 0.5, 0.66), y: lay(S, 0.22, 0.42), w: lay(S, 74, 62), theme: 'dark', at: 0.05, rows: [
    { text: '1.024 MHz', size: 7, color: C.orange },
    { wave: (x, t) => (Math.floor(x * 14 + t * 18) % 2 ? 1 : -1), h: 9, color: C.cyan },
    { kv: ['TICKS / SEC', (t) => Math.round(1024000 * EASE.out(clamp((t - S.at('million')) / 0.8))).toLocaleString('en-US')], size: 4.2 },
  ] });
  S.label(xtal, 'CRYSTAL', { sub: '2.048 MHz / 2', x: lay(S, 0.08, 0.08), y: lay(S, 0.45, 0.8), at: 0.5, align: 'left' });
};
```

A crystal can floats and turns on a dark background while the camera pushes in. A CLOCK.EXE window shows 1.024 MHz over a square wave, and its counter runs up to 1,024,000 ticks a second the moment the narrator says "million". A leader line ties the crystal to its label: 2.048 MHz, divided by two. Every element takes a spoken word or a time for `at`, so nothing is timed by hand.

Same pipeline as cel-story and maker-bench. Kokoro, a small open voice model, reads each line to a WAV file on your machine. Then whisper.cpp listens and writes down when every word starts and ends, one line at a time. The windows, tags, counters and the orange caption box all hang off those times.

Each line in the script lists its key words. The alarm line has three: "alarms", "1202" and "1201". The captions show the digits, and Kokoro reads a spelled-out version, "Twelve oh two. Twelve oh one.", because it can misread a bare number. On this video whisper.cpp heard 121 of 125 words. The skill tells Claude to read that line and reword anything the voice mangled.

The renderer, the word timing and the command-line tool come from cel-story, and the voice tools from paper-reel. The old rules carried over too: fresh materials for every shot, anything that follows the camera updated after the camera moves, and seeded randomness with no clock. The new rules are about keeping pixels sharp:

`u`, 1% of the short side of the frame, so a window is the same size in a Short and in a wide video.
Then the check step. `check` renders frames twice, each time in a fresh page, and compares them. It also tests every caption, window, number, tag, title, label and gauge against the safe zone of a Short and for overlaps. The two VS cards share a group, so they are allowed to touch.

There is no API key anywhere in this and nothing to pay. There is also no video model. Every frame is built from code and drawn by your own graphics card. A frame depends only on its time in the video, so it comes out the same every time you render it.

One piece renders as a 1080x1920 Short or a 1920x1080 video. The Apollo piece uses a one-line helper, `lay(S, tall, wide)`, to pick a position per format. In the tall cut the UI sits above or below the hero. In the wide cut the hero takes one side and the UI the other, so the two spec cards in the rope shot sit beside the module instead of under it.

*The same video in 9:16, from the same script and the same story file. Here the UI stacks above and below the hero.*

The demo is about the Apollo Guidance Computer, a box of about 70 pounds that helped land the first people on the Moon. It was designed at MIT. Its clock ticked about a million times a second: 1.024 MHz, from a 2.048 MHz crystal. Its working memory held 2,048 words, about 4 KB. Its programs lived in 36,864 words of rope memory, woven by hand, mostly by women near Boston. A wire through a tiny magnetic ring was a 1, and a wire around it was a 0. The crew talked to it on a keypad, typing a verb and a noun. During the Apollo 11 landing it flashed the 1202 and 1201 alarms. It was overloaded, so it dropped its low-priority jobs and kept the landing going. Minutes later, Eagle touched down.

The skill file asks Claude to check every claim against two reliable sources and keep the list at the top of the story file. This one used NASA's Computers in Spaceflight, the NASA Apollo Lunar Surface Journal, the Smithsonian National Air and Space Museum and MIT News, among others.

```
git clone https://github.com/haiderfarooq3/pixel-spec ~/.claude/skills/pixel-spec
cd ~/.claude/skills/pixel-spec && npm install && npx playwright install chromium
pip install kokoro-onnx soundfile
node ~/.claude/skills/pixel-spec/bin/pixel-spec.mjs doctor
```

You also need ffmpeg, whisper.cpp with its base English model, and the two Kokoro model files. The README has the links. `doctor` checks every piece, prints the fix for anything missing, and tells you whether WebGL is running on your GPU or in software. Then ask Claude Code for a video: "make a pixel-spec short about the first pocket calculator". It writes and checks the script, makes the voice, builds the object, 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.

`doctor` tells you which one you got.
pixel-spec was built alongside [maker-bench](https://haiderfarooq.dev/blog/maker-bench-3d-explainer-videos-in-code), on top of the [cel-story](https://haiderfarooq.dev/blog/cel-story-3d-story-videos-in-code) engine from earlier the same day. That is why two more styles took hours, not days. The engine already renders the same frame every time and times every word, so a new style is mostly a look: a background, a way to light the hero, some UI and a few rules.

If you want to see the other formats I make this way, the [content catalogue](https://haiderfarooq.dev/content) has one finished example of each, and this video is in it now. If you want a pipeline like this built for your product, start at the [contact page](https://haiderfarooq.dev/contact). The vertical cut is on YouTube as a [Short](https://www.youtube.com/shorts/kPQ42btJ1Pg). And if you just want the skill, [it is on GitHub](https://github.com/haiderfarooq3/pixel-spec), MIT licensed. Go explain a machine.

Yes. three.js builds and lights the object, headless Chromium renders it, 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 chiptune music is generated by code at render time, and the four bundled fonts are under the SIL Open Font License.

18 to 25 ms a frame on a Windows laptop with Intel Iris Xe graphics. The 46-second demo in this post exports in 45 to 50 seconds per format, a sheet of all 12 shots renders in about 3 seconds, and the check takes about 5 seconds. Making the voice and timing the words is a separate step you only run when the script changes.

It is tested on Windows 11, where Chromium renders on the GPU through Direct3D. On macOS, Chromium uses Metal, but headless WebGL may fall back to software rendering, which gives the right frames more slowly. Run the doctor command and it tells you which one you got.

A thing you can show one object at a time: a gadget, a machine, a historic computer. Claude builds its own simple version of the object from basic shapes in code. The skill file tells it not to copy a real product's design, logo, face or name.

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`.

No. It is an independent MIT-licensed project. Claude is a trademark of Anthropic. pixel-spec uses three.js, Playwright, Kokoro, whisper.cpp and ffmpeg, all open source, and bundles Press Start 2P, Silkscreen, VT323 and Montserrat under the SIL Open Font License. The credits are in `NOTICE.md`.

*Originally published at [haiderfarooq.dev](https://haiderfarooq.dev/blog/pixel-spec-retro-explainer-videos-in-code).*
