analyze-reference
Skill4 starsChanged 9 days agoMITView on GitHub
Take a reference video (a reel, TikTok, CapCut template, music video, ad) apart frame by frame — exact cut frames, beat/tempo, flashes and light leaks, transitions, intro construction, picture-in-picture sections, captions, ending and colour — so an edit can copy its structure precisely. Use it whenever the user gives a video to imitate ("edit like this", "same style", "match this reel"), asks how a video was edited, or points at a timestamp in a reference that your edit doesn't match yet. Also finds the beat of a song by listening to it (tempo, beat and bar frames, loud sections, drops) when the user wants clips cut to music without a reference video.
In this repository6 other files it gives its agents.
- check-renderSkill
- filmcraft-editingSkill
- match-gradeSkill
- photo-titleSkill
- recap-editSkill
- select-shotsSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
Every frame as a PNG plus info.json (fps, size).
- Distinctive: line 22
If you only have a link (Instagram/TikTok usually need a login to download), ask for the file.
- Distinctive: line 79
Write the findings as a short spec (cut frames, beat, per-section notes, colour numbers) the recap-edit plan can follow, and show the user …
≈ “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.
Files
Analysing a reference video
Users compare your edit to the reference second by second. Guessing the style from a few frames
(or the post's caption) gets the vibe and misses the details they care about: exact cut timing, how the
title is built, what happens at 0:10 or 0:15. Measure instead. Scripts need Pillow and
FILMCRAFT_CLI="${user_config.filmcraft_cli}" (or filmcraft-cli on PATH); ${CLAUDE_SKILL_DIR}
is this skill's folder.
1. Get frames
python3 ${CLAUDE_SKILL_DIR}/scripts/extract_frames.py ref.mp4 work/ref --scale 0.25Every frame as a PNG plus info.json (fps, size). For close study of a short span (a title, a
transition) extract again at --scale 1 --start S --end S.
If you only have a link (Instagram/TikTok usually need a login to download), ask for the file. A browser can show the post, but frame-accurate work needs the video.
2. Cuts, beat, flashes
python3 ${CLAUDE_SKILL_DIR}/scripts/detect_cuts.py work/ref # add --soft for dissolves/whipsGives cut frames, shot lengths, the common shot length (the beat: e.g. 23 frames ≈ 78 BPM, with half-beat bursts of 11–12), sudden-brightness flashes (cream/white flash frames, light-leak peaks) and black frames. Expect a structure like: intro → flash → fast half-beat burst → long hold → burst → holds → on-beat section → fade. Keep the cut frames verbatim for the new edit.
The beat from the sound
python3 ${CLAUDE_SKILL_DIR}/scripts/detect_beats.py ref.mp4 --fps 30 --json work/beats.jsonListens to the soundtrack (a video or a song file: mp3, m4a, wav) and prints the tempo, every beat
and estimated bar start as sequence frames at --fps (song at frame 0), the loud / quiet sections
and drops. On a reference, the cuts should sit on these beats within a frame or two; when the visual
cuts are ambiguous (dissolves, fast motion), trust the beats. Tempo can read at double or half the
feel (156 vs 78 BPM): the cut lengths tell you which one the editor used, or pass --bpm.
confidence below 1.5 (exit code 2) means no real beat, e.g. speech or ambient sound.
3. Look at every section
python3 ${CLAUDE_SKILL_DIR}/scripts/contact_sheet.py work/ref work/sheet_intro.jpg --to 150 --every 3
python3 ${CLAUDE_SKILL_DIR}/scripts/contact_sheet.py work/ref work/sheet_body.jpg --from 150 --every 10 --cols 14
python3 ${CLAUDE_SKILL_DIR}/scripts/contact_sheet.py work/ref work/sheet_t10.jpg --from 278 --to 306 --cols 7 --zoom 2--crop x0,y0,x1,y1 isolates the picture area (e.g. a 16:9 band inside a 9:16 reel); --zoom for
detail. Read the sheets and write down, per section:
- Intro: how the title is made (photos stacked into letters? footage inside letters? typed?), letter shape and size, order and timing of each piece (frame numbers), what the first frame shows.
- Transitions at each cut: hard cut, flash (colour, frames), whip, light leak (streaks? flare direction? blowout?), zoom.
- Non-cut sections: pictures popping onto the frame on the beat (positions, sizes, flash before each), split screens, slide-ins. Positions as fractions of the frame, timings as frames.
- Framing: full frame, letterboxed band, aspect.
- Caption/text: wording style, font look (monospace, serif), size, position, whether it stays on.
- Ending: hold length, fade to black (how many frames).
Zoom into anything the user calls out ("the 2026 is not like the video", "at 0:10 there's an effect") at full resolution before rebuilding it.
4. Colour
Measure the reference's look over the body of the video (skip the intro and any black bars):
python3 ${CLAUDE_SKILL_DIR}/../match-grade/scripts/color_stats.py work/ref --crop 0,112,180,208Note shadow neutrality, highlight warmth (R minus B), brightness and saturation for match-grade.
Output
Write the findings as a short spec (cut frames, beat, per-section notes, colour numbers) the recap-edit plan can follow, and show the user the key sheets when it helps them confirm.
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
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.

