product-video-as-code
AGENTS.md7 starsChanged 16 days agoMITView on GitHub
Instructions for any coding agent working in this repository. This repo is a pipeline for making software videos: product demos, feature launches, explainers, walkthroughs, tutorials, release notes, onboarding and social cuts. Slides are HTML, timing is derived from the narration audio, and ffmpeg renders the MP4. SKILL.md is the full brief and is worth reading in full before you start. It is written in Anthropic's Claude Skill format, but it is plain Markdown and applies to any agent. Audio first,…
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- product-videoSkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 43
Every script supports --help.
- Distinctive: line 75
Pin animations to narration beats: If the voice names the third item at 4.2s, the third element appears at 4.2s.
- Very specific: line 78
Never run two renders against the same parts directory: Check first: pgrep -f render.py.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Instructions for any coding agent working in this repository.
This repo is a pipeline for making software videos: product demos, feature launches, explainers, walkthroughs, tutorials, release notes, onboarding and social cuts. Slides are HTML, timing is derived from the narration audio, and ffmpeg renders the MP4.
SKILL.md is the full brief and is worth reading in full before you start. It is
written in Anthropic's Claude Skill format, but it is plain Markdown and applies
to any agent.
The one rule that matters
Audio first, then timing, then picture.
Generate the narration before deciding how long anything is on screen. Measure each clip, derive scene durations from those measurements, then render. Do not guess durations and do not write narration to fit a fixed storyboard; both cause the visuals to drift out of sync with the voice.
Commands
# setup (once)
pip install -r requirements.txt && playwright install chromium
# ffmpeg and ffprobe must also be on PATH
# see it work, no narration or API keys needed
cp templates/deck.html .
python3 scripts/render.py --preview 2 8 18 # stills, fastest check
python3 scripts/render.py # -> out/silent.mp4
# full pipeline
cp templates/script.example.json script.json
# generate audio/vo_01.mp3 ... one clip per scene with any TTS provider
python3 scripts/assemble.py # timings.json + out/voice.wav
python3 scripts/render.py # out/silent.mp4
python3 scripts/mux.py --final out/final.mp4 # adds voice, and music if audio/bed.mp3 existsEvery script supports --help.
Match the product's brand from its code
python3 scripts/detect_brand.py ../their-product --cssReads tokens, tailwind, CSS variables, JS theme objects and the manifest; also
reports fonts, icon library and logos. Skips build output and rejects colours
that do not cohere, printing what it rejected. Paste the :root block into
deck.html. Show the user the result before rendering.
Where things live
| Path | Purpose |
SKILL.md | full brief: pipeline, kinds of video, working rules |
.claude-plugin/ | plugin and marketplace manifests; raise version in plugin.json on every release, or installed copies never update |
references/PIPELINE.md | stage-by-stage walkthrough, multi-cut technique |
references/AUDIO.md | voice settings, pronunciation, music levels |
references/SCREEN-CAPTURE.md | recording product footage, compositing |
references/PITFALLS.md | read before debugging: real failures and fixes |
scripts/ | the pipeline |
templates/deck.html | starter deck and the animation engine |
Conventions
- Never drive the timeline from wall-clock time. The renderer seeks to an
explicit
tand screenshots. Do not userequestAnimationFrameor CSS animation playback for anything that must appear in the render; it will tear or drop frames under a screenshot loop. - Pin animations to narration beats. If the voice names the third item at 4.2s, the third element appears at 4.2s. Re-check after any rewrite; a line that comes back shorter will strand its visuals.
- Never run two renders against the same parts directory. Check first:
pgrep -f render.py. - Measure, do not assume. Detect blank frames by ink coverage rather than
variance, confirm pronunciation by transcribing generated audio back, and run
ffmpeg -af volumedetecton the final file before calling it done. - Do not handle user credentials.
scripts/capture/login.pyopens a browser so a human can sign in; the session persists in a local profile that later recordings reuse. Never type a password on someone's behalf.
Do not commit
out/,preview/, generated.mp4and.wavfilesaudio/andaudio_*/(generated narration and music)capture/at the repo root. It holds raw takes and a live browser session incapture/profile/. Note the leading slash in.gitignore; without it the rule would also excludescripts/capture/, which is source.
Style
Plain ASCII in docs and code comments. No em dashes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

