agentleFS
notquenotque/vexjoy-agent/skills/content/video-editing/SKILL.md

video-editing

Skill448 starsChanged 5 days agoMITView on GitHub

Video editing pipeline: cut footage, assemble clips via FFmpeg and Remotion.

  • Reads credentials
  • Installs packages

56 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use everything-claude-code-conventions, agent-sort and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • mryeastcodeSkill

    everything-claude-code-conventions

    Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

    Also in 8 projects that use this

  • niloykumarbarmanSkill

    agent-sort

    Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

    Also in 8 projects that use this

  • ysyecustSkill

    brand-discovery

    Use when a brand needs to discover or articulate its identity through structured multi-session interviews. Covers purpose, positioning, audience, personality, voice, narrative, and founder-brand tension across 8 modules using laddering, 5 Whys, and projective techniques. Produces a resumable session with disk-persisted state and a master brandbook (90_SYNTHESIS.md).

    Also in 4 projects that use this

  • ysyecustSkill

    competitive-report-structure

    Use after benchmark-methodology has produced scored competitor profile cards. Assembles findings into a decision-grade report: landscape map, competitor profiles, benchmarking matrix, white-space analysis, strategic recommendations, and team alignment trigger questions. Final step in the three-skill competitive pipeline.

    Also in 4 projects that use this

  • tpavanipradeepSkill

    nextjs-turbopack

    Next.js 16+ and Turbopack — incremental bundling, FS caching, dev speed, and when to use Turbopack vs webpack.

    Also in 14 projects that use this

  • CodeWithBehnamSkill

    dmux-workflows

    Multi-agent orchestration using dmux (tmux pane manager for AI agents). Patterns for parallel agent workflows across Claude Code, Codex, OpenCode, and other harnesses. Use when running multiple agent sessions in parallel or coordinating multi-agent development workflows.

    Also in 16 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 48 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Constraint: Before writing the EDL manually, run FFmpeg scene/silence detection.

    line 109
  2. Very specific:

    Constraint: Always generate concat-list.txt from cuts.txt order, not from shell glob.

    line 123
  3. Very specific:

    Gate: All segment files exist. assembled/rough-cut.mp4 written to disk.

    line 127
  4. Distinctive:

    When to use: Only when rough-cut.mp4 requires programmatic elements (animated titles, lower thirds, caption tracks, brand overlays).

    line 135
  5. Distinctive:

    Constraint: Check whether existing footage covers the gap before generating anything.

    line 149
  6. Very specific:

    Gate: All required generated assets saved to assets/ directory before proceeding.

    line 153

“Common” is measured: kept by at least 6 in 10 of the 48 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Video Editing Skill

Overview

This skill implements a 6-layer pipeline where AI handles judgment tasks (what to keep, what to cut, highlight selection) and FFmpeg/Remotion handle mechanical execution deterministically.

LayerNameMechanismPrimary Tool
1CAPTUREInventory source footageBash + Glob
2AI STRUCTURETranscript to EDLLLM judgment
3FFMPEG CUTSEDL to segment filesFFmpeg (deterministic)
4REMOTION COMPOSITIONSegments to TSX compositionRemotion + TypeScript
5AI GENERATIONFill gaps with generated assetsElevenLabs / fal.ai (conditional)
6FINAL POLISHHuman taste layerHuman + NLE

Deep References

SignalLoadContent
Shell commands for each phase, gate checksreferences/phase-commands.mdFull command blocks for Phases 1-6
FFmpeg recipes: cutting, concat, proxy, detectionreferences/ffmpeg-commands.mdTimestamp extraction, batch cutting, audio normalization, scene/silence detection
Remotion composition scaffoldreferences/remotion-scaffold.mdTSX composition template, render command, reuse patterns
Image-to-video pipelinereferences/image-to-video.mdValidate, prepare, encode, verify workflow
FFmpeg filter graphs for visualizationreferences/ffmpeg-filters.mdScale/pad, showwaves, showspectrum, overlay, complete filter graphs

Instructions

Preflight (Run before Phase 1)

Hard requirements (BLOCK if missing): ffmpeg (all phases), node (Remotion / npx). Soft requirements (WARN if missing): remotion (only required for Phase 4).

which ffmpeg >/dev/null 2>&1 || { echo "ERROR: ffmpeg not found. Install: brew install ffmpeg (macOS) | apt install ffmpeg (Linux)"; exit 1; }
which node >/dev/null 2>&1 || { echo "ERROR: node not found. Install: https://nodejs.org or via nvm"; exit 1; }
npx remotion --version >/dev/null 2>&1 || echo "WARNING: remotion CLI not found. Phase 4 unavailable. Install: npm install @remotion/cli"

Phase 1: CAPTURE

Goal: Inventory all source footage and confirm files exist on disk before any processing.

Constraint: Source files are read-only. All FFmpeg commands write to new files only. Never overwrite source footage.

Steps: locate source files (find), inspect each with ffprobe, generate proxies for files >10 min (see references/ffmpeg-commands.md -> Proxy Generation), create working directories (segments/, assembled/). Full command block: references/phase-commands.md -> Phase 1.

Gate: Source files confirmed on disk. File list written to source-inventory.txt. Proceed only when gate passes.


Phase 2: AI STRUCTURE

Goal: Analyze content and produce a written EDL (cuts.txt) that drives all downstream cutting.

Constraint: cuts.txt is the contract. The EDL file is the only source of truth for downstream phases. Do not hand-edit FFmpeg commands — generate them from the EDL.

Constraint: Before writing the EDL manually, run FFmpeg scene/silence detection. Detection output informs judgment, not replaces it.

Steps: transcribe with whisper/AssemblyAI, run scene/silence detection, apply judgment (what advances narrative, what is filler, target duration), write cuts.txt in EDL format START_TIME,END_TIME,LABEL, review for overlap and total duration. Full command block and EDL format example: references/phase-commands.md -> Phase 2.

Gate: transcript.txt exists. cuts.txt written to disk. Proceed only when both files exist.


Phase 3: FFMPEG CUTS

Goal: Execute the EDL deterministically — one FFmpeg cut per segment in cuts.txt.

Constraint: Batch-cut from EDL using a loop. Do not create individual FFmpeg commands per cut. This ensures reproducibility and review capability as a list.

Constraint: Always generate concat-list.txt from cuts.txt order, not from shell glob. Shell glob (segments/*.mp4) sorts alphabetically, not by EDL order.

Steps: batch-cut from EDL with while loop (libx264/aac, -avoid_negative_ts make_zero), verify segments, generate concat-list.txt in EDL order, concat with -f concat -safe 0 -c copy. Full command block: references/phase-commands.md -> Phase 3. See also references/ffmpeg-commands.md -> Batch Cutting.

Gate: All segment files exist. assembled/rough-cut.mp4 written to disk. Proceed only when gate passes.


Phase 4: REMOTION COMPOSITION

Goal: Wrap segments in a Remotion TSX composition for programmatic overlays, titles, or transitions.

When to use: Only when rough-cut.mp4 requires programmatic elements (animated titles, lower thirds, caption tracks, brand overlays). If rough-cut.mp4 is sufficient, skip to Phase 6.

Constraint: Layer 4 requires TypeScript/React. Hand off to typescript-frontend-engineer for TSX work; return to python-general-engineer for Phase 5 onward.

Steps: initialize Remotion (npm create video@latest first time; otherwise npm install @remotion/cli @remotion/player remotion), scaffold composition (see references/remotion-scaffold.md), render with npx remotion render. Full command block: references/phase-commands.md -> Phase 4.

Gate: assembled/remotion-output.mp4 exists. Proceed only when gate passes.


Phase 5: AI GENERATION

Goal: Fill genuine gaps in source material with generated assets — only when needed.

Constraint: Check whether existing footage covers the gap before generating anything. Generate only what doesn't exist.

Decision tree: cut around the gap → update cuts.txt and re-run Phase 3; voiceover → ElevenLabs (authorization required); music → fal.ai (defer to fal-ai-media); b-roll → fal.ai (defer to fal-ai-media). ElevenLabs Python helper, authorization pattern, and save-to-disk flow: references/phase-commands.md -> Phase 5.

Gate: All required generated assets saved to assets/ directory before proceeding.


Phase 6: FINAL POLISH

Goal: Deliver assembled output and hand off taste-layer work to human.

Constraint: Layer 6 is human territory. The skill assembles; the human finishes. The following require human judgment and should not be attempted programmatically:

  • Color grading and color matching between clips
  • Music timing and volume ducking
  • Caption style, font, positioning
  • Transition timing and style
  • Final audio mix levels

Handoff template (handoff-notes.txt with source list, EDL, rough-cut path, remaining-for-human checklist): references/phase-commands.md -> Phase 6.

Gate: assembled/rough-cut.mp4 (or assembled/remotion-output.mp4) exists. handoff-notes.txt written to disk.


Video Transcript Extraction

Pull a video's transcript as readable paragraphs. Prefer uploader subtitles; fall back to auto-generated.

# Path 1: uploader subtitles (accurate)
yt-dlp --skip-download --write-subs --sub-langs en --sub-format vtt -o '<work-dir>/%(id)s' '<URL>'
# Path 2: auto-generated (fallback when path 1 writes no file)
yt-dlp --skip-download --write-auto-subs --sub-langs en --sub-format vtt -o '<work-dir>/%(id)s' '<URL>'
# Clean VTT to paragraphs
python3 ${CLAUDE_SKILL_DIR}/scripts/vtt_to_paragraph.py <work-dir>/<id>.en.vtt

Options: --timestamps for [mm:ss] markers, --keep-brackets for cue tags, -o FILE for file output. Other languages: change --sub-langs. List available: yt-dlp --list-subs '<URL>'.

Error Handling

ErrorCauseSolution
"No such file or directory" on sourcePath in cuts.txt doesn't match filenameRun cat source-inventory.txt. Quote paths with spaces.
FFmpeg "Invalid option" or codec errorsCodec unavailable or flag syntax errorffmpeg -codecs | grep libx264. Fall back to -c:v copy.
Remotion "Could not find composition"Composition ID mismatchCheck src/index.ts for registered ID. Match exactly in render command.
Segments concat in wrong orderShell glob sorts alphabetically, not by EDLGenerate concat-list.txt from cuts.txt order, not from glob.
ElevenLabs 401ELEVENLABS_API_KEY not setexport ELEVENLABS_API_KEY=your_key before Phase 5.
No .vtt file from transcript extractionVideo has no subtitles in requested languageyt-dlp --list-subs '<URL>' and pick an available language.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.