Communitygithub.com

video-vfx-editor

Professional video editing AND clipping on the local machine with FFmpeg, Python and Node. Use when the user wants to edit video, cut a talking-head or podcast, burn Hindi subtitles or captions, remove silences and filler words, chroma key a green screen, cut a person out without green screen, reframe 16:9 to 9:16 for shorts, reels or TikTok, find highlight clips from a long video, learn an editing style from reference links, add motion graphics or sound effects, or check a render against platform specs. No API keys, no cloud render, no watermarks.

What is video-vfx-editor?

video-vfx-editor is a Claude Code agent skill that professional video editing AND clipping on the local machine with FFmpeg, Python and Node. Use when the user wants to edit video, cut a talking-head or podcast, burn Hindi subtitles or captions, remove silences and filler words, chroma key a green screen, cut a person out without green screen, reframe 16:9 to 9:16 for shorts, reels or TikTok, find highlight clips from a long video, learn an editing style from reference links, add motion graphics or sound effects, or check a render against platform specs. No API keys, no cloud render, no watermarks.

Works with✓Claude Code✓Codex CLI✓Cursor✓Gemini CLI✓OpenCode
npx skills add https://github.com/sujeetcoder/video-vfx-editor/tree/HEAD

Ask in your favorite AI

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

Documentation

What does video-vfx-editor do?

You are the editor. Everything runs locally: FFmpeg does the pixels, Python the decisions, Node the motion graphics. There are no paid APIs and no cloud render.

A decision that is not written to a file did not happen. State lives in edit/state.json, decisions in edit/decisions.md, handoff in edit/handoff.md.

0. Before anything

  1. python install/doctor.py --json — if FFmpeg/libass is missing, follow the fix string in the error; do not improvise a different stack. If Python is outside 3.11–3.13, run python install/ensure.py --install --yes once and use the interpreter it prints for every script.
  2. Work inside the user's project folder. Every script writes only under edit/.
  3. Never claim a gate passed without running scripts/check.py.

1. The core loop (edit job)

python scripts/ingest.py "<file|url>" --json
python scripts/probe.py "<ingested>" --quick --json
python scripts/intake.py --json            # ask these 5–8 questions in chat
python scripts/plan.py "<probe.json>" --json
python scripts/cut.py "<source>" --json
python scripts/asr.py "<cut>" --lang hi --json
python scripts/caption.py "<cut>" --lang hi --json
python scripts/audio.py "<cut>" --json
python scripts/export.py "<audio>" --json
python scripts/check.py "<export>" --json

forge.py runs this for you and refuses to skip stages:

python scripts/forge.py init "<file>" --job edit --json
python scripts/forge.py next --json          # exact next command
python scripts/forge.py run --json           # run to the end (stops on failure)
python scripts/forge.py resume --json        # ≤1.5k-token brief for a fresh model
python scripts/forge.py status --json

If a stage fails three times on the same cause, stop and ask the user with the two most likely causes. Never loop silently.

2. Intake — ask 5 to 8 questions, never more

intake.py --json returns the bank with detected defaults already filled from probe.py --quick, plus a reasons map. Present it as a numbered list with defaults marked; accept "ok".

Ask about: job (edit/clip), format/playbook, aspect, caption language, caption look, pace, audio treatment, extra effects. Do not re-ask anything answered in edit/decisions.md.

Defaults that matter: captions Hindi (Devanagari), aspect 9:16 for shorts/reels, loudness −14 LUFS (−16 podcast), true peak ≤ −1 dBTP.

3. Job type clip (long video → 3–10 vertical clips)

python scripts/forge.py init "https://youtu.be/..." --job clip --json
python scripts/forge.py run --until plan --json
# ingest needs --acknowledge-rights for URLs (YouTube ToS)

plan.py writes candidates.json and prints a compact table (≤30 rows) with five signals: speech, pace, hook, self-containedness, external position. You rank it, the user approves. Then:

python scripts/forge.py approve 1 4 7 --json
python scripts/clips.py --from-plan --json

clips.py writes clip_NN.mp4 + .srt + .jpg + .json + manifest.json + review.html under edit/out/run-<id>/. --rules gives a deterministic fallback ranking. This measures clip strength, not virality — say so.

4. What to read, and only when

SituationRead
green screen / uneven lightingreferences/chroma-key.md
no green screen, cut the person outreferences/person-matte.md
captions look wrong, Hindi shaping, karaokereferences/captions.md
audio noisy, humming, ducking, loudnessreferences/audio.md
platform limits, bitrate, durationreferences/platforms.md
question bank, presets, detected defaultsreferences/intake.md
choosing clip windowsreferences/clipping.md, references/clip-scoring.md
"train the skill on these links"references/style-learning.md
motion graphics, kinetic typereferences/motion-graphics.md
sound effects, risers, whooshesreferences/sound-design.md
free b-roll / stock images + creditsreferences/stock-media.md
resuming on a fresh modelreferences/continuation.md
anything failingreferences/troubleshooting.md
format-specific recipereferences/playbooks/<name>.md

5. Contracts every command obeys

  • --json prints one JSON object on stdout; logs go to stderr.
  • Envelope: status, stage, output, artifacts, checks, next, error, device, duration_ms.
  • status ∈ ok | warn | fail. Exit 0/2/3/4/5/6 = ok/warn/failed check/needs user/missing capability/invalid input.
  • Errors carry kind, detail, fix, doc, retryable. Quote the fix verbatim to the user, per OS.
  • --dry-run prints every FFmpeg command and writes nothing.
  • --device auto|cpu|cuda|mps (env VFE_DEVICE). GPU OOM retries once on CPU.

6. Device policy (do not re-derive)

auto → CUDA → MPS → CPU. faster-whisper: float16 on CUDA, int8 on CPU (there is no MPS path). Torch matte: cuda/mps, float32 CPU with --mask-res 540 --every 2. FFmpeg: h264_nvenc / h264_videotoolbox only when probed present, else libx264. earshot is CPU-only by design.

7. Gates — nothing is done until these pass

  1. duration / aspect / fps as planned
  2. loudness −14 or −16 LUFS ±1, true peak ≤ −1 dBTP
  3. blackdetect + freezedetect at cut points
  4. caption safe zone, ≤32 chars/line, 2–4 words
  5. contact sheet generated (sheet.py) and actually looked at
  6. platform spec PASS/WARN/FAIL with a fix per FAIL
  7. chroma: matte coverage 65–85 %, white and black previews
  8. clip gates: hook ≤1.5 s, sentence-aligned start/end, subject inside crop
  9. motion gates: frame-diff energy, no text overflow
  10. style deviation report when a profile is active

check.py returns FAIL + a fix; do not report success when a gate fails.

8. Style learning

Trigger: "train skill video-vfx-editor on these links" (3–5 references).

python scripts/style.py learn a.mp4 b.mp4 c.mp4 --name <name> --json
python scripts/style.py apply --name <name> --json
python scripts/style.py compare out.mp4 --name <name> --json

Measure, never describe. Confidence tiers: <10 samples low, 10–15 medium, 15+ high — print the tier next to every number. Ask at most 3 questions afterwards (font, music level, reels-only). Never copy the reference music or re-upload reference files.

9. Chroma and person matte

python scripts/chroma.py green.mp4 --bg bg.jpg --json      # sample→key→sweep→despill→QC
python scripts/matte.py person.mp4 --bg studio.jpg --preview --json
python scripts/textbehind.py person.mp4 --mask mask.mov --text "TITLE" --json

chroma.py samples the real border colour (k-means), sweeps similarity × blend for 65–85 % coverage, despills after the key, and writes white + black previews. Never hand-tune a default without looking at the previews.

10. Reframe + virtual camera

python scripts/reframe.py 16x9.mp4 --aspect 9:16 --json

Face tracking every 3rd frame at 360p, 5-frame median, 40 px/frame clamp, scene-cut reset, contain + blur fallback when no face or the subject would leave the crop. Keyframes land in virtual-camera.json. Zoom ≤1.25×, 180–320 ms.

11. House rules

  • Ask the user only for: a wrong repo/owner, a licence decision, or permission for a system-level install. Everything else: decide, write it down, continue.
  • No paid APIs, no cloud render, no telemetry, no accounts, no watermarks.
  • No silent fallbacks: warn, error with a fix, or ask.
  • Keep edit/ out of version control; never commit media, models, node_modules.
  • Finish a turn with: what was produced, which gates ran (with numbers), what was not tested, and the exact next command.

Related Skills