Back to Stories

papercraft: Turning Prompts Into Pop-Up Paper Worlds

papercraft
Featured Project

papercraft

JavaScript★ 2,728

Agent skill to build games, interactive scenes, web pages and animations in a handcrafted pop-up papercraft style

papercraft is an agent skill for building games, scenes, pages and clips with a pop-up paper aesthetic, using bundled structure, motion and capture tools.

A
@admin
Dec 4, 2026
5 min read0 views
papercraft: Turning Prompts Into Pop-Up Paper Worlds

papercraft is an agent skill for building games, interactive scenes, web pages, animations and videos in one handcrafted pop-up papercraft style, for any subject. Printed cardstock pieces sit on a printed ground, fold up on hinges, and carry soft layered shadows coloured by the world. A tilt-shift macro lens looks down into the model. Calm hinge motion and soft paper sounds finish the read. Primary language: JavaScript. License: MIT. Repo shows 2,728 stars and is not archived.

What the skill actually carries

The README says the skill teaches the method and carries hard-won numbers from a shipped three.js pop-up game. Those numbers cover what makes a frame read as a photographed paper model: matte paper, every print a small layered paper collage with contrasting accents, a thin dark cut edge with a pale highlight on the lit side, soft shadows tinted by the world, a dense world of chunky pieces, and a tilt-shift macro lens.

It also covers how to build any piece from a set of structure types you can extend: slotted crosses, layered flats, folded boxes and prisms, domes, printed water, plus built decks, bridges and stairs for anything walked on. Motion, sound, and a character whose cards never cut into each other are part of the model, alongside a measure-and-critique loop.

  • Material read: matte paper, layered print, thin dark cut edge, pale highlight on lit side
  • Structure types: slotted crosses, layered flats, folded boxes and prisms, domes, printed water
  • Walkable pieces: decks, bridges, stairs built for the character
  • Motion and sound: how paper moves, lives, and sounds
  • Critique loop: measure, then revise

Setup and intended workflow

Install runs through `npx skills add xikhar/papercraft`, or by copying `skills/papercraft/` into the agent's skills folder. The README states it works with any agent that supports Agent Skills and lists Claude Code, Codex, Cursor, Gemini CLI, and OpenCode as examples. Then the workflow starts with a plain ask for something paper, such as a bakery landing page that feels like a pop-up storybook or a three.js harbour town that folds up out of the ground.

Direction comes from the prompt plus references. A shot of a paper model can be the look target itself. Photos, sketches, or a moodboard supply theme and designs, which the agent rebuilds in paper. The README says an image generator runs only when asked, and everything can be made in code. The agent designs and writes its own subject's pieces; bundled code is plumbing plus worked examples from one countryside world.

  • `npx skills add xikhar/papercraft` or copy `skills/papercraft/` into skills folder
  • Ask for the paper version of the thing you want
  • Point at references: model shot, photos, sketches, moodboard
  • Image generation only on request; code can make everything

What lives in the folder

`SKILL.md` holds the material model, direction from references, paper spec, routing, workflow, and checks. `references/` loads on demand: gallery, structures, look, palettes, mechanisms, motion, worlds, procedural art, formats, image-gen, sound, paper UI, three.js, 2D web, engines, process.

`assets/lib/` is the plumbing, imported as is. `paperkit-2d.js` covers paper sheets, cut outlines, layered print, drawing-to-cut, and 2D decks. `paperkit-3d.js` covers paper material, cards with thickness, hinges, the cross family, fan pairs, box folds, prism folds on any plan, platforms, PCSS soft shadows, and macro lens. `paper-motion.js` brings a latched paper spring, wind sway, fixed clock, and walk field. `paper-sound.js` renders procedural paper foley offline. `paper-life.js` adds weather, flyers, smoke, cloud shadows, and creatures with behaviours.

`assets/examples/` holds worked examples to read, not parts to assemble: `countryside.js` and `built-ground.js`. `assets/templates/` ships `popup-3d` (three.js) and `popup-2d` (Canvas 2D) harnesses with an example scene to replace, plus `popup-3d/structures.html` showing every structure type in plain placeholders. `assets/gallery/` holds five worlds from the source game: forest, desert, snow, spring, autumn, each paired with its prompt. `assets/lights.json` carries light presets by light condition: key, fill, shadow colour, haze.

  • `SKILL.md`: material model, paper spec, routing, workflow, checks
  • `assets/lib/`: paperkit-2d, paperkit-3d, paper-motion, paper-sound, paper-life
  • `assets/templates/`: `popup-3d`, `popup-2d`, `structures.html`
  • `scripts/`: `capture.py`, `measure.py`, `ab_sheet.py`, `paper_textures.py`

Frames, capture, and review

The README states the same world renders in any frame: 16:9 film, 9:16 Reel, square or 4:5 post, 4K master, ultrawide still, or phone page. Lens stays on the frame's short side. A vertical frame comes closer and keeps the subject clear of the platform's captions. Prints and blur follow the resolution.

`capture.py` renders stills and MP4 clips at standard sizes (`--size reel`, `square`, `4k`, ...). For a local look, serve `skills/papercraft/assets/` over http with `npx serve skills/papercraft/assets` or `python -m http.server -d skills/papercraft/assets 8000`, then open `/templates/popup-3d/` or `/templates/popup-2d/`. Both walk the hero with WASD / arrows; `?still` gives the fixed overview. `?size=1080x1920` or `?aspect=9:16` shows another format.

For review frames, `python skills/papercraft/scripts/capture.py <project folder> overview "walk=x,z;x,z"` renders headless via Playwright and reports build time, slowest prints, whether the hero's cards cut into each other, and any page error. `--size reel "clip:video=8,30"` renders a vertical clip and encodes the MP4.

  • Formats: 16:9, 9:16, square, 4:5, 4K, ultrawide, phone page
  • Templates walk hero with WASD / arrows; `?still` fixes overview
  • `capture.py` reports build time, slowest prints, card cuts, page errors

Gallery as quality bar

Five worlds from the source game ship as gallery entries, each with the prompt that made it, in `references/gallery.md`. The README calls them the range and the quality bar, never content to copy. Bundled examples stay read-only reference: the agent writes pieces for the subject you name.

  • Five worlds: forest, desert, snow, spring, autumn
  • Each entry paired with its prompt
  • Bar and range, not copy source

Conclusion

papercraft turns one prompt plus chosen references into a paper world, then renders that world at any frame size. Install with `npx skills add xikhar/papercraft` or copy `skills/papercraft/`, ask for the paper version of the thing, point at references, and let the skill's material model, structure types, and plumbing do the build. Review through `capture.py` before you ship the clip.

Sources and project page