OR Key
drop another .md file to compare - side-by-side diff against video-edit

video-edit

Builds, previews, and renders short video clips.
personal 2 files

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.

Work with me
For developers how this skill is built, graded, and how it runs

at a glance- the short version

eval modemanual
categoryContent
stages1
dependsremotion

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.

The skill
state/skills/video-edit/SKILL.md present
the skill itself, in plain text
The main file. It says what the skill is and lays out the steps in plain English.
Code
state/lib/video-edit.ts not present
code the skill can run
Optional. Many skills are just words and need no code at all.
Scripts
state/bin/video-edit/ not present
helper scripts
Optional. Added when a skill has a few commands to run.
Loader
state/skills/video-edit/AGENTS.md present
what the AI loads on the fly
Loaded automatically the moment this skill is needed. Kept short on purpose.

how it runs - the shared frame every skill uses 4/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.

makes the work The worker
inferred
npx tsx ~/projects/snappy-os/state/lib/remotion. from a command
No worker named, so the first command in the skill is treated as the worker.
checks the work The reviewer
present
Robert (weekly review) reviewed by hand
No automatic check. Robert reviews these by hand. The part that made it still isn't the part that approves it.
frame
learns Self-correction
present
fixes itself learns from gaps
When a run hits a gap, the skill gets edited on the spot [FIXED] or queued for a bigger rewrite [LOGGED], so it keeps getting better.
tidies up Background fixes
present
queued for rewrite runs in the background
Bigger fixes that can't be made on the spot get queued and rewritten in the background later.
remembers Run history
present
state/log/pending-eval.ndjson manual runs
Every run is written down here, then reviewed by hand each week.
Critical rules the things this skill must not get wrong
No must-not-break rules called out for this skill. Anything important lives in the writeup below.

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.

  1. Loading feedback rows…

how the work flows- step by step

inputs remotion
1 stage
npx
npx tsx ~/projects/snappy-os/state/lib/remotion.ts scaffold

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

  1. Receive a video-compose intent (e.g. "compose a title card clip", "edit the welcome video", "render QuoteCard to mp4").
  2. Check ~/projects/snappy-remotion/package.json exists - if not, emit VideoComposition with installed: false + install instructions.
  3. If installed: call listCompositions() from state/lib/remotion.ts to enumerate available compositions.
  4. Match intent to a composition ID (or propose a new one via addComposition()).
  5. Emit VideoComposition shape with: name, description, format, duration, fps, status: "ready"|"not-installed", previewUrl (if Remotion Studio is running), compositions[].
  6. If render was requested: call render(compositionId, props, opts) from state/lib/remotion.ts - returns path to output MP4.
  7. If save-artifact was requested: POST rendered MP4 path to /artifacts endpoint.

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 absent
  • status: "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. Never npm install remotion in 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 VideoComposition shape 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

Per-turn rules for video editing via Remotion. Full reference: state/skills/video-edit/SKILL.md.

Critical Rules

  1. Never install Remotion inside snappy-chat. Remotion and its deps (@remotion/cli, @remotion/player) belong in ~/projects/snappy-remotion (scaffolded via state/lib/remotion.ts). Installing inside snappy-chat bloats the bundle and may conflict with Vite's React setup.
  1. Preflight before any operation. Check existsSync("~/projects/snappy-remotion/package.json"). If absent, emit VideoComposition with status: "not-installed" and installCommand: "npx tsx ~/projects/snappy-os/state/lib/remotion.ts scaffold".
  1. VideoComposition shape = metadata, not a player. The shape shows composition list, format, duration, and install status. Actual video playback uses VideoPreview pointing at the rendered MP4 file path.
  1. Render is slow. Always emit a ProgressList shape first, call render(), then emit VideoPreview with the resulting MP4 path. Do not emit a VideoPreview before the render completes.
  1. Save-artifact after render. After a successful render, call save_artifact({name, shape_name: "VideoPreview", shape_args: {src: outputPath}, intent}) to persist it in the cockpit artifacts store.
  1. Composition names must be PascalCase. Validate with /^[A-Z][a-zA-Z0-9]+$/ before calling addComposition(). Reject invalid names with a clear error.
  1. Remotion Studio conflict. Remotion's dev server runs on port 3000. If that port is busy, preview() fails silently. Detect the conflict with lsof -nP -iTCP:3000 -sTCP:LISTEN before calling preview.

Commands

OperationCommand
preflight check`ls ~/projects/snappy-remotion/package.json 2>/dev/null && echo ready \\echo not-installed`
scaffold projectnpx tsx ~/projects/snappy-os/state/lib/remotion.ts scaffold
list compositionsnpx tsx ~/projects/snappy-os/state/lib/remotion.ts list
render compositionnpx tsx ~/projects/snappy-os/state/lib/remotion.ts render <CompId> --props '{"text":"Hello"}' --format square
start preview (studio)npx tsx ~/projects/snappy-os/state/lib/remotion.ts preview
add new compositionnpx tsx ~/projects/snappy-os/state/lib/remotion.ts add <PascalName> "description"
check render outputls -lh /tmp/snappy-remotion-*.mp4

Intent Routing

Intent patternAction
compose * video, create * clip, make * remotion clipEmit VideoComposition (composition design)
render * mp4, export * video, render * clipCall render() then VideoPreview
list * video project, my video projectsEmit VideoComposition with compositions[] list
what video tools, video tools availableEmit VideoComposition with tool capabilities overview
save * video as artifact, save * clipCall save_artifact() after render
edit * video, change * title toaddComposition() or modify existing TSX
start remotion studio, open video editorCall preview() then emit VideoPreview with studio URL

VideoComposition Shape Fields

{
  status: "ready" | "not-installed";
  compositions: Array<{
    id: string;          // PascalCase composition ID
    format: string;      // "square" | "vertical" | "landscape" | "youtube" | "story"
    fps: number;         // frames per second
    frames: number;      // total frames (duration = frames/fps seconds)
  }>;
  selected?: string;     // currently selected composition ID
  previewUrl?: string;   // Remotion Studio URL when running
  renderOutput?: string; // absolute path to MP4 when rendered
  installCommand?: string; // shown when status: "not-installed"
}

Self-correcting loader (PID feedback)

Before you finish, do two things:

1. Fix gaps. If this loader didn't cover your case, edit this AGENTS.md surgically.

2. Log the result.

echo "[$(date -u +%FT%TZ)] video-edit: <what was missing or fixed> [FIXED|LOGGED] action_kind=<kind>" >> ~/projects/snappy-os/state/log/loader-feedback.log
  • FIXED = patched inline. LOGGED = too large for inline.
  • action_kind: shape-ok | skill-ran | loader-rewritten | pattern-elevated

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

rubric manual manual Robert review - no automated rubric
recent no runs actor/auditor: unverifiable
deps remotion

no recent runs logged - the eval contract is declared but nothing has been graded yet