Communitygithub.com

stagecraft

Builds cinematic, story-driven presentations as one self-contained HTML file, with live WebGL worlds, kinetic type, choreographed transitions, a generative music score paced to the motion, speaker notes and an automated visual eval loop. Use for a pitch or investor deck, a keynote or talk, a portfolio or website showcase that plays on its own, a product launch, a case study or data story, or a podcast episode turned into a moving magazine piece synced to its audio. Also exports any deck to MP4 for social video. Triggers include "make a deck that feels like a film", "cinematic presentation", "animated pitch", "interactive slides", "turn this podcast into something people watch", "a showcase for my site", "WebGL deck", "/stagecraft". Not for ordinary office slides that people will edit by hand (use a slides tool), static one-page documents, or decks that must be PowerPoint files.

What is stagecraft?

stagecraft is a Claude Code agent skill that builds cinematic, story-driven presentations as one self-contained HTML file, with live WebGL worlds, kinetic type, choreographed transitions, a generative music score paced to the motion, speaker notes and an automated visual eval loop. Use for a pitch or investor deck, a keynote or talk, a portfolio or website showcase that plays on its own, a product launch, a case study or data story, or a podcast episode turned into a moving magazine piece synced to its audio. Also exports any deck to MP4 for social video. Triggers include "make a deck that feels like a film", "cinematic presentation", "animated pitch", "interactive slides", "turn this podcast into something people watch", "a showcase for my site", "WebGL deck", "/stagecraft". Not for ordinary office slides that people will edit by hand (use a slides tool), static one-page documents, or decks that must be PowerPoint files.

Works with✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mahtabsoin/stagecraft/tree/HEAD/skills/stagecraft

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

What does stagecraft do?

Most decks are documents read out loud. A Stagecraft deck is a place: a small real-time program where each idea gets one beat, the world behind the words moves on the GPU, and the text stays crisp HTML that a script can measure. It ships as one HTML file that works offline anywhere.

The craft is in four layers, in this order: story, copy, design, motion. Code is the last 30%. Then the eval loop checks the work like a picky designer would.

Files

PathWhat it isRead when
references/story.mdarcs (pitch, talk, showcase, podcast, case study, data story), beat sheetsalways, first
references/copy.mdon-screen words, speaker notes, voice, banned phrases, no invented factsbefore writing any words
references/taste.mdthe design rules and the generic-AI tells to avoidbefore styling
references/motion.mdtiming, easing, choreographybefore animating
references/music.mdthe generative score: chords, beds, pacingwhen scoring
references/recipes.mdthe scene recipes, transitions, custom scenes, performancewhen choosing scenes
references/engine.mdthe API: deck, scene, ctx, s, text, drivers, headless APIwhen writing code
references/evals.mdwhat the eval measures and the visual rubricevery build
references/podcast.mdpodcast episode to visual piece, audio syncpodcast jobs
references/technology.mdplain-language explainer of how it workswhen someone asks "how"
template/the engine and a working 9-scene showcase deckcopy it to start
scripts/eval.mjsheadless render, measure, report, contact sheetsevery build
scripts/record.mjsMP4 export, optional audio trackvideo delivery

Workflow

1. Understand the job

Ask, or infer from context, and state your reading: who is in the room (or on the page), what they should believe or do afterwards, how it is driven (a speaker clicking, a site playing it, a reader scrolling, an audio track), how long, and where it ships. Get the real facts: numbers with sources, quotes verbatim, product screenshots. If a fact is missing, write [NUMBER: source needed] and say so. Never invent one.

2. Story and beat sheet (no code yet)

Pick the arc from story.md. Write the one sentence the deck exists to say. Write the beat sheet: scene, beat, on-screen words, what the audience sees, what the room should feel (the music cue), speaker note. One idea per beat. Show the beat sheet to the person before building if they are present; it is the cheapest place to change course.

3. Set up the project

cp -r <skill>/template my-deck && rm -rf my-deck/node_modules my-deck/dist
cp -r <skill>/scripts my-deck/tools
cd my-deck && npm install

Chrome or Chromium must be installed for the eval and recording (set CHROME_PATH if it is not found). ffmpeg is needed for contact sheets and video.

4. Theme

Edit src/theme.js: paper, ink, night, one accent (plus accentInk, a darker accent that passes contrast on paper), fonts. Start from the default unless the brand demands otherwise; derive from the brand's real colours, never a generic gradient. Follow taste.md.

5. Build the scenes

Rewrite src/main.js from the beat sheet using recipes (recipes.md). Use the showcase deck already in it as a worked example, then replace it entirely. Write a custom scene only when no recipe fits. Put product screens and images in src/img/ and import them; the build inlines them. Score each scene with a score cue from music.md: usually just chords, since recipes set the beds.

6. Eval loop (do not skip)

npm run eval          # build, then render, measure and write eval/

Fix every error. Then open eval/contact.png and eval/squint.png with your image tool and look. Write eval/critique.md against the rubric in evals.md, fix the worst three things, and run it again. Minimum two rounds. Ship only with zero errors.

7. Deliver

  • Claude: publish dist/index.html as an artifact (an HTML page, published from the file) so it opens with a link. Present mode by default; tell the person the keys: arrows or click to advance, N for notes, F for fullscreen.
  • Website: host index.html and embed it with ?mode=auto (plays and loops) or ?mode=scroll (scroll-driven). An iframe works.
  • Video: npm run record or node tools/record.mjs dist/index.html --out deck.mp4 --fps 30. The score is rendered into the video, in sync; --audio track.mp3 uses your own track, --silent none. Rendering is CPU-bound, about 2 to 5 frames a second; draft at --fps 12.
  • Live talk: run it from the file in Chrome, fullscreen, on the actual laptop beforehand.

Finish with: what was built, the eval result (score, errors, warnings left and why), how to open and drive it, and one real next step.

Non-negotiables

  • One idea per beat. If a beat needs "and", split it.
  • No invented numbers, quotes, logos or customers. Placeholders are visible and named.
  • No em dashes or en dashes in on-screen copy or notes. No banned phrases (copy.md).
  • Text is always DOM text through ctx.text, never baked into the canvas.
  • Scenes are pure functions of time: no animation state outside s. This is what makes seeking, eval and video exact.
  • One signature transition, at most four kinds per deck.
  • Respect prefers-reduced-motion (the engine does; custom scenes check s.calm).
  • Zero eval errors before delivery.

When the task is smaller

  • "Make one slide like this": still copy the template; a deck can have one scene.
  • Edit an existing Stagecraft deck: work in its project, change main.js, rerun the eval.
  • No WebGL target (email, print): record to MP4, or export contact-sheet frames as images. The deck itself needs a browser.

Related Skills