DEV Community

Cover image for pixel-spec: A Free Claude Code Skill That Makes Retro Pixel Explainer Videos in Code
Haider Farooq
Haider Farooq

Posted on Originally published at haiderfarooq.dev

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

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, and this post is about how it works and where it still falls short.

The 70-pound computer that helped land Apollo 11, made with pixel-spec
Watch the video on haiderfarooq.dev. 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.

This is the third 3D skill on the same engine. cel-story tells cartoon stories, maker-bench 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 for cut-paper reels and khan-explainer for blackboard lessons.

Where it came from

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:

  1. A hero, lit like a product photo. One 3D object per shot, built from simple shapes, with soft key, rim and fill lights that follow the camera, clean reflections and a soft shadow on the background. It floats, turns or comes apart in an exploded view.
  2. Pixel-art backgrounds. A dithered night sky with blinking stars and a pixel moon, sliding stripes, a blueprint grid, cream graph paper, solid panels and a pixel moon surface with the Earth in the sky. They are drawn small and scaled up without smoothing, so every pixel stays a hard square.
  3. Retro UI. Windows with a title bar and an X, live numbers, bars, an oscilloscope trace and a job list. Big pixel numbers that count up, tags, typed titles and terminal lines, labels with leader lines to points on the 3D object, a gauge, two spec cards with VS between them, and a pixel hand that moves and clicks.
  4. Captions with a key word. Bold captions follow the voice, and the key word of each line pops into an orange box the moment it is said.
  5. A sound to match. An original chiptune loop, plus small blips when windows and tags pop, all made by code at render time.
  6. A real piece to prove it. The worked example in the repo is the video above: the Apollo Guidance Computer, 12 lines of script, 12 shots.

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.

Contact sheet of all 12 shots from the pixel-spec demo: a gold computer box over a pixel night sky with a pixel moon and a 70 LB tag, the box on green stripes with DESIGNED AT MIT, a crystal can next to a CLOCK.EXE window reading 1.024 MHz, an exploded view on a blueprint grid counting words of RAM, a rope memory module with two spec cards and VS, magnetic rings with copper wire on red, a wire through one ring and around another on cream paper, a keypad with a DSKY.EXE window and a pixel hand, the keypad on red with PROGRAM ALARM, the box with a load gauge and a JOBS.EXE list, a pixel lander on a pixel moon surface, and the box and keypad with a SPECS.EXE window and 4 KB.
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.

One shot per spoken line

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' });
};
Enter fullscreen mode Exit fullscreen mode

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.

The voice is the clock

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.

What carried over, and what is new

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:

  1. Pixel art stays pixel art. Backgrounds are drawn small and scaled up without smoothing, then the 3D render goes on top. A pixel stays a hard square, even in a 1080x1920 frame.
  2. Pixel fonts at whole sizes. Pixel fonts only look crisp at whole multiples of their grid, so the kit rounds the sizes for you.
  3. Short text in small windows. A spec card 37 units wide fits about six big digits, so the skill tells Claude to keep window text short.
  4. One unit for both formats. UI sizes are in 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.

The stack, and why it costs nothing

  • three.js builds and lights the hero. A room environment gives it clean reflections, and a shadow catcher puts a soft shadow on the background.
  • A 2D canvas paints the pixel background behind the 3D render and the windows, numbers and captions in front of it, so the text stays sharp.
  • Playwright and headless Chromium render it on the GPU. On my Windows laptop with Intel Iris Xe graphics that is 18 to 25 ms a frame, so the video above exports in under a minute.
  • 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.2.
  • The music is not a file. An original chiptune loop and the UI blips are synthesized by code at render time, with no samples.
  • The fonts are Press Start 2P, Silkscreen and VT323 for the pixel text and Montserrat for the captions, all under the SIL Open Font License and bundled with the skill.

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.

Vertical and wide from the same piece

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.

Seven frames from the vertical cut of the pixel-spec demo: the gold computer box under a pixel moon with a 70 LB tag, an exploded view with 2,048 words of RAM, a rope module with two spec cards and VS, a wire through one ring and around another marked 1 and 0, the keypad with a DSKY.EXE window and a pixel hand, the keypad on red with 1202 and 1201 tags, and a pixel lander on the moon under THE EAGLE HAS LANDED.
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 story in the demo

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.

Install

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
Enter fullscreen mode Exit fullscreen mode

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.

Where it falls short

  • The 3D objects are simple shapes. Every hero is built in code from basic shapes like boxes, cylinders and rings. That suits a gold box with bolts. It will not pass for a photo of a real product.
  • It needs a GPU to be fast. Software WebGL works and the frames come out right, but it is much slower.
  • It is tested on Windows only. On a Mac, headless Chrome may fall back to software rendering. doctor tells you which one you got.
  • The voice is a free model. Kokoro is clear, but it is not a human narrator.

Two more styles in a day

pixel-spec was built alongside maker-bench, on top of the cel-story 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 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. The vertical cut is on YouTube as a Short. And if you just want the skill, it is on GitHub, MIT licensed. Go explain a machine.

FAQ

Is pixel-spec really free?

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.

How long does a render take?

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.

Does it work on Windows and Mac?

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.

What can it make a video about?

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.

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

Top comments (0)