agentleFS
hiteshbandhuhiteshbandhu/skills-i-use/skills/reel-edit/SKILL.md

reel-edit

Skill1 starsChanged 5 months agoMITView on GitHub

Edits raw phone footage into a bold, professional-looking 9:16 Instagram reel on a Mac, with no editing app: a concept-first workflow, beat-synced cuts, HTML/canvas-rendered motion type, on-device Apple Vision / Core ML / MLX models (person mattes, subject lift, depth, hand/body pose, optical flow), synthesised SFX and a -14 LUFS mix. Includes scripts for every step, craft rules and a catalogue of 20+ edit recipes. Triggers on "edit this video", "make a reel", "instagram edit", "cut this footage", "make it viral", "another version", "go ham", "motion design on this", "beat-synced edit", "segmentation edit", "parallax edit".

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    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:

    Write a 4-line concept before touching code: idea · visual language · where the footage is transformed · the ending.

    line 74
  2. Distinctive:

    Start from taste.md: bold graphic transformation driven by segmentation, giant type, flat colour, paper/print textures, energy.

    line 78
  3. Distinctive:

    Every effect must serve the idea.

    line 80
  4. Distinctive:

    Use what's actually in the footage.

    line 82
  5. Distinctive:

    Check concepts.md and the private log (Step 7) so you don't repeat yourself.

    line 83
  6. Very specific:

    Open preview_sheet.jpg and the full-size frames: Check: text inside the IG safe zone, nothing clipped, targets aligned (zoom in), type …

    line 117
  7. Very specific:

    Look at the final sheet. Then delete <p>/out and <p>/fr if the disk is tight.

    line 129
  8. Very specific:

    When the person reacts, record it in a private log outside this repo (e.g.

    line 135
  9. Distinctive:

    Never ship without looking at a contact sheet of the actual encode.

    line 143
  10. Distinctive:

    No full stops in on-screen text.

    line 144
  11. Distinctive:

    Ask before downloading any outside asset (music, fonts, stock, SFX, models).

    line 147

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill 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.

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

Reel Edit — raw footage → finished reel, on a Mac

You are the editor and the motion designer. The user hands over clips and a vibe; you choose a concept, build it, check it, and deliver an MP4. Everything runs locally.

Read before starting:

  • taste.md: craft rules. Read it every time. The person's own preferences override it.
  • concepts.md: catalogue of edit recipes (idea · build · watch-outs). Pick a direction different from the last cut.
  • pipeline.md: render engine contract, gotchas, disk/memory limits.
  • sound.md: music sourcing, beat grids, SFX, mix levels.
  • models.md: which on-device model does what, sizes, speeds, what is too heavy.

Scripts (read each before running it; they write only inside the project dir you pass):

ScriptDoes
scripts/setup.shchecks ffmpeg, swiftc, Python packages and Chromium; builds the Vision tools
scripts/ingest.pyclips → fr/<id>/ 1080×1920 frames, au/<id>.wav, slow-mo variants, manifest, contact sheets
scripts/beats.pytrack → tempo, energy curve, drop candidates, beat grid from a start offset
scripts/transcribe.pyfaster-whisper word timestamps, offline
scripts/vision/*.swift + build.shseg person matte · fg subject lift · face face boxes · depth Core ML depth · hand · pose · flow · contour
scripts/render_html.pyrenders an HTML engine (render(t)) to frames; --preview for key moments
scripts/engine_template.htmlstarter engine: type with footage inside the letters, full-bleed punch-ins, a word placed behind the person
scripts/fx/parallax.py (depth 2.5D) · camtrack.py (background camera track) · clone.py (multiplicity comp) · comic.py
scripts/sfx.py / scripts/mix.pysynthesised SFX library / JSON-spec mixer mastered to -14 LUFS
scripts/encode.sh / scripts/contact_sheet.pyIG-ready H.264 + AAC / tiled review sheet
scripts/lab/mlx_detect_server.pyoptional local MLX detector (RF-DETR count, Florence-2 identify/find)

Output: {SKILL_OUTPUT_DIR}/reel-edit/<project>/ (see ../OUTPUT.md). Work files go there (fr/ mk/ depth/ out/ au/); the final MP4 goes where the user asks, else next to the source footage. Frame dumps are GBs, so delete fr/ and out*/ after the final encode.


Step 0 — Brief (do not skip, keep it short)

Infer what you can and ask only what changes the edit:

SettingDefault
Goalviral IG reel; must look pro-edited, never AI-made
Length15–25 s (music-led) · up to 60 s (talking head)
Audiospeech-led if someone talks to camera; otherwise music-led with natural sound under it
Musicfree-licence track you find (Mixkit-style); ask before downloading anything
Versions1 strong concept. If asked for "versions", make each a different concept, not a re-grade
Brand textnone permanent on screen; no full stops in on-screen copy

Step 1 — Look at the footage

  1. scripts/setup.sh (first run on a machine).
  2. python3 scripts/ingest.py <clips> --project <out>/<name> [--slow 03,06]
  3. Open every contact sheet in <project>/sheets/. Log for each clip: subject, motion, faces, objects, light, usable seconds, audio (mean_db in manifest). Low-res phone footage is fine if the concept is graphic.
  4. Speech? python3 scripts/transcribe.py <project>/au/<id>.wav, but only for clips that are actually speech. Noisy room audio: skip it and go music-led. Non-English speech: faster-whisper with task='translate' finds quotable lines, which a speaker of the language must check.

Step 2 — Pick ONE concept (the step that decides everything)

Write a 4-line concept before touching code: idea · visual language · where the footage is transformed · the ending. A concept is an idea about the subject ("people made of letters", "one person, four opinions"), not an effect list.

  • Start from taste.md: bold graphic transformation driven by segmentation, giant type, flat colour, paper/print textures, energy.
  • Every effect must serve the idea. A model showcase (datamosh, x-ray, sketch) without an idea reads "forced".
  • Use what's actually in the footage; people notice when a clip they care about is skipped.
  • Check concepts.md and the private log (Step 7) so you don't repeat yourself.

Tell the user the concept in 2–3 lines and start; do not wait for approval unless the brief was vague.

Step 3 — Music and the beat grid

  1. Pick a track that matches the energy (see sound.md).
  2. python3 scripts/beats.py track.mp3 → choose --start a few beats before a drop so the reel opens with a little tension and lands the drop at 3–8 s.
  3. python3 scripts/beats.py track.mp3 --start <s> --out <project>/grid.json. All shot boundaries are in beats. Cuts on beats, hits on kicks, type on off-beats.

Step 4 — Analyse footage with on-device models (only what the concept needs)

B=scripts/vision/bin
$B/seg   <p>/fr/05 <p>/mk/05          # person matte (accurate), PNG per frame
$B/fg    <p>/fr/03 <p>/fg/03 2        # subject lift: book, laptop, pen, people
$B/depth DepthAnythingV2SmallF16.mlpackage <p>/fr/06 <p>/depth/06
$B/hand  <p>/fr/10 <p>/hand10.json    # fingertips (1080x1920 px)
$B/face  <p>/fr/05 <p>/faces/05.json 6 # face boxes every 6th frame: keep type/panels off faces
$B/pose  <p>/fr/09 <p>/pose09.json    # body joints
python3 scripts/fx/camtrack.py <p> 05 # camera track for anything locked to the room

Measure positions (heads, hands, table edge) from the mattes/JSON, never by eyeballing.

Step 5 — Build the engine and preview

  1. Copy scripts/engine_template.html → <project>/engine.html. Give the shot list a JSON --data file (shots in beats). Restyle freely; keep the render(t) / window.DUR contract. Python/OpenCV renderers (fx/) are fine for per-pixel work; composite their frames in.
  2. Preview 8–16 key moments: python3 scripts/render_html.py <p>/engine.html --project <p> --grid <p>/grid.json --data <p>/shots.json --out <p>/out --preview 0.4,1.2,...
  3. Open preview_sheet.jpg and the full-size frames. Check: text inside the IG safe zone, nothing clipped, targets aligned (zoom in), type not touching faces, brightness, nothing that looks templated/AI. Fix, re-preview. Usually 2–4 rounds.

Step 6 — Full render, mix, encode

python3 scripts/render_html.py <p>/engine.html --project <p> --grid <p>/grid.json --data <p>/shots.json --out <p>/out
python3 scripts/mix.py <p>/mix.json <p>/mix.wav          # music + natural sound + SFX → -14 LUFS
scripts/encode.sh <p>/out <p>/mix.wav <final>.mp4
python3 scripts/contact_sheet.py <final>.mp4 <p>/final_sheet.jpg --n 16

Look at the final sheet. Then delete <p>/out and <p>/fr if the disk is tight.

Step 7 — Deliver and learn

  • Send the MP4 with a 3–5 line note: concept, track and licence, what's notable, any asset with a rights risk (e.g. game audio).
  • When the person reacts, record it in a private log outside this repo (e.g. ~/.reel-edit/log.md or the agent's memory): concept, track, reaction, new rules. That log is what makes the next edit better. Never write names, quotes, reactions or project details about real people into this skill's files.
  • "Another one" means a new concept and new techniques, not the last cut with a new filter.

Hard rules

  • Never ship without looking at a contact sheet of the actual encode.
  • No full stops in on-screen text. No permanent brand header. Keep footage bright.
  • Captions/type inside the IG safe zone: x 60–1020, y 220–1500 for anything important.
  • Audio edges: 30–60 ms fades always; music fades out at the end; no abrupt cuts.
  • Ask before downloading any outside asset (music, fonts, stock, SFX, models); say where it came from and its licence.
  • 8 GB Macs: ≤5 render workers, one ML model in memory at a time, restart PyTorch MPS workers every ~40 frames.

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.