npx tsx ~/projects/snappy-os/state/lib/remotion. .md file to compare - side-by-side diff against video-edit
video-edit
What it does for you
Builds, previews, and renders short video clips.
What it produces
A recent result, so you can see the kind of work it returns.
loading…
How to get it
These run inside the Snappy workspace. Want this working in your business? I set skills like this up with you, in one focused week.
For developers how this skill is built, graded, and how it runs
at a glance- the short version
what's inside - the parts that make up a skill 2/4 present
A skill is just a few plain-text files. Only the main one is required. The rest are optional, added as the work needs them. This is what the skill is made of; how it runs is just below.
state/skills/video-edit/SKILL.md
present
state/lib/video-edit.ts
not present
state/bin/video-edit/
not present
state/skills/video-edit/AGENTS.md
present
how it runs - the shared frame every skill uses 3/5 present
Every skill runs the same way. One part does the work, a separate part checks it, and a short loader hands the AI exactly what it needs for the job. Anything this skill doesn't use shows a one-line note saying why, on purpose, not by accident.
This skill doesn't fix its own gaps yet.
state/log/pending-eval.ndjson what it has learned - fixes written back in over time sample
When a run hits something this skill didn't handle, the fix gets written back into the skill so it doesn't happen again. FIXED means it was corrected on the spot. LOGGED means it's queued for a bigger rewrite. Either way, the skill gets a little better and never makes the same mistake twice.
- Loading feedback rows…
how the work flows- step by step
SKILL.md- the skill, written out in plain English
video-edit
Cockpit-native video editing via Remotion. Routes user video-compose/render intents into a VideoComposition generative-UI shape that previews the composition structure, shows install status, and exposes render/save controls.
This skill scaffolds gracefully: if ~/projects/snappy-remotion is not present, the shape renders a pre-flight card explaining what to install. Once installed, it exposes real composition listing, rendering, and preview.
Install path
Remotion must be scaffolded once before renders work:
npx tsx ~/projects/snappy-os/state/lib/remotion.ts scaffold
# installs: ~/projects/snappy-remotion with 5 starter compositions
Dependencies (already declared in state/lib/remotion.ts):
{
"remotion": "^4",
"@remotion/cli": "^4",
"@remotion/player": "^4",
"react": "^18",
"react-dom": "^18"
}
These live in the sibling ~/projects/snappy-remotion project, NOT in snappy-chat. The cockpit renders composition metadata; actual rendering runs via npx remotion render in that project.
Steps
- Receive a video-compose intent (e.g. "compose a title card clip", "edit the welcome video", "render QuoteCard to mp4").
- Check
~/projects/snappy-remotion/package.jsonexists - if not, emitVideoCompositionwithinstalled: false+ install instructions. - If installed: call
listCompositions()fromstate/lib/remotion.tsto enumerate available compositions. - Match intent to a composition ID (or propose a new one via
addComposition()). - Emit
VideoCompositionshape with:name,description,format,duration,fps,status: "ready"|"not-installed",previewUrl(if Remotion Studio is running),compositions[]. - If render was requested: call
render(compositionId, props, opts)fromstate/lib/remotion.ts- returns path to output MP4. - If save-artifact was requested: POST rendered MP4 path to
/artifactsendpoint.
VideoComposition shape contract
The server emits this via emitTriple("VideoComposition", payload) for intents matching:
compose.*video,create.*video,edit.*video(composition intents)render.*mp4,render.*video,export.*video(render intents)list.*video.*project,my video project,video.*clip,remotion.*clip(list/browse intents)what video tool,video tool available(discovery intents)
Payload shape:
{
status: "ready" | "not-installed";
compositions: Array<{id: string; format: string; fps: number; frames: number}>;
selected?: string;
previewUrl?: string;
renderOutput?: string;
installCommand?: string;
}
Eval
Manual. Criteria:
- Shape renders without console error
status: "not-installed"shows install instructions when snappy-remotion absentstatus: "ready"lists real compositions from Root.tsx- Render path produces an MP4 at the stated output path
Gotchas
- Remotion project lives at
~/projects/snappy-remotion, NOT inside snappy-chat. Nevernpm install remotionin snappy-chat. - Remotion Studio (preview server) runs on port 3000. The cockpit's head-screen server is on 3147. No port collision.
render()can take 30-120s for a 150-frame clip. Emit a ProgressList shape before calling render; follow up with VideoPreview once the MP4 path is returned.addComposition()requires PascalCase names. Validate before calling.- The
VideoCompositionshape in genui-library.tsx is a defineComponent wrapper. It is NOT a real Remotion<Player>- it shows composition metadata. The actual playback stays in VideoPreview (HTML5 video pointing at the rendered MP4).
AGENTS.md- what the AI loads when this skill comes up
video-edit - loader
Remotion video editing via cockpit. Full reference: state/skills/video-edit/SKILL.md.
Critical Rules
- Never install Remotion in snappy-chat. Lives at
~/projects/snappy-remotion(viastate/lib/remotion.ts scaffold). Installing inside snappy-chat bloats bundle + conflicts with Vite. - Preflight: check
~/projects/snappy-remotion/package.jsonbefore any op. Absent → emit VideoComposition withstatus: "not-installed"+ scaffold command. - VideoComposition = metadata card, NOT a player. Shows composition list/format/duration/status. Playback via VideoPreview (HTML5 video src).
- Render is slow (30-120s). Emit ProgressList first → call render() → emit VideoPreview. Never preview before render completes.
- Save-artifact after render. Call
save_artifact({name, shape_name: "VideoPreview", shape_args: {src: outputPath}, intent})to persist MP4. - Composition names must be PascalCase. Validate
/^[A-Z][a-zA-Z0-9]+$/before addComposition(). Reject invalid with clear error. - Port 3000 conflict. Remotion Studio runs on 3000 (cockpit on 3147). Check
lsof -nP -iTCP:3000 -sTCP:LISTENbefore preview().
Commands
| check | ls ~/projects/snappy-remotion/package.json 2>/dev/null && echo ready | | scaffold | npx tsx ~/projects/snappy-os/state/lib/remotion.ts scaffold | | list | npx tsx ~/projects/snappy-os/state/lib/remotion.ts list | | render | npx tsx ~/projects/snappy-os/state/lib/remotion.ts render <CompId> --props '{"text":"Hello"}' --format square | | preview | npx tsx ~/projects/snappy-os/state/lib/remotion.ts preview | | add | npx tsx ~/projects/snappy-os/state/lib/remotion.ts add <PascalName> "description" | | intent | compose.*video, render.*mp4, list.*video.*project, start remotion studio |
Self-Test
- [ ] Can you check if snappy-remotion is installed?
- [ ] When not installed, do you emit VideoComposition with status: "not-installed"?
- [ ] After render completes, do you call save_artifact()?
- [ ] Do you validate composition names before calling addComposition()?
- [ ] Do you emit ProgressList before starting render()?
- [ ] What port does Remotion Studio use? Where can conflicts happen?
- [ ] VideoComposition shows metadata - what shows the actual MP4 playback?
Found a gap? Edit this file. <!-- footer-injection-point -->
api.ts- the code it can call
⚠ no api.ts - this skill has no typed action surface
scripts- helper scripts it can run
prose-only skill - 3 inline code blocks live in SKILL.md above (no state/bin/ sidecar yet).
how we check it- the checks, plus the last 10 runs
no recent runs logged - the eval contract is declared but nothing has been graded yet