/agent-edite-davinci-resolve:long-video-highlight-clippingfrom agent-edite-davinci-resolve
Use when cutting highlights from long VODs into Resolve.
Ships in agent-edite-davinci-resolve. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
In this repo: pipeline code is
scripts/highlight/(waswork/*.py), teststests/highlight/, job folderswork/highlight/<channel>/<job>/(HIGHLIGHT_JOBpoints at itsjob.json), job prompt templatedocs/highlight/prompt-template.md, wikidocs/highlight/wiki/. Older wording that sayswork/,prompt.mdorllm_wiki/means these paths.
Start from the one-page highlight skill (map, steps, pipeline.py status); this file holds the details and traps.
Finds gameplay / fun / meme highlight moments in long livestream or VOD footage and builds one short-clip timeline per moment in DaVinci Resolve.
User communicates in Thai; write plans/prompts/reports in Thai, keep code, paths and commands literal.
Also load resolve-rough-cut (assembly traps, no titles/captions/effects), resolve-media-pool, resolve-session and house-style before touching Resolve. Do not duplicate their rules here.
prompt.md; the plan and scripts read from it. Footage facts (count, codec, fps, duration, clip ids) are read live from ffprobe/Resolve, never copied into docs: they are stale on the next job.source_id as v01..vNN by sorted filename and store the mapping in inventory.json; never match substrings of filenames. Filenames contain Thai, full-width brackets and bars: glob with pathlib, pass paths to subprocess as list args (no shell).WORK_DIR from the current variables table once and put all job artifacts there. If it already includes the channel and job, do not append them again.HIGHLIGHT_JOB to the current job.json before every pipeline, test, helper, and reviewer subprocess; carry the exact export in delegated briefs because child environments need not inherit the parent's selection. Check that generated artifact paths point into the current WORK_DIR before accepting results..gitignore avoids channel-specific exclusions.clarify: aspect, clips per video, approval pause, Resolve series-vs-new project); skip anything the user already stated.resolve_control runtime_mode, project_manager get_current/list/snapshot, media_pool probe_media_pool). If the open project is named for the job and already holds the files, reuse it; do not recreate or re-import. If its name differs but its media paths match, offer reuse in the upfront questions instead of switching automatically. Record the user's chosen RESOLVE_PROJECT separately from JOB: a project name need not change the artifact directory. Include Playback frame rate confirmation in the same upfront form when the source rate is already known.ask) before building them.{ชื่อคลิป}-{ชื่อเกม}-vdo: no source/candidate ID or category prefix. Keep IDs and categories in metadata instead. Resolve the game label before assembly from verified content or the user's explicit label, never the filename alone. When the user supplies a label for the whole set, use it consistently, including chat clips, without asking the same naming question again. Carry this convention into the actual name generator and its tests; changing only prompt text or adding an unused job field does not change a builder's output. When the user renames clips during QC, preserve their exact spelling verbatim (even apparent typos such as เพือน, พีเชื่อผม, พีจ้าา) unless asked to edit them; flag suspected typos in the handoff instead.docs/channels/<channel>-games.md (if present) before generating reader or reviewer briefs and pass per-game terms, character/champion names, and visual event markers via pipeline.py briefs "<hint>" (and briefs.run_readers(..., hint=...) in Python): Thai Whisper routinely garbles English/game nouns (Shen, Zed, Teemo, R) and causes reviewers to misname clips or guess from broken ASR.inventory.json + inventory.md).audio/<id>.wav (16 kHz mono pcm_s16le, level untouched) and reuse it for scoring, transcription and silencedetect. Re-demuxing VOD containers repeatedly is the slow part; no video decode is needed for scoring.highpass=f=80,loudnorm=I=-16:TP=-1.5:LRA=11). Never normalize the wav used for scoring: it erases the loudness contrast the shortlist depends on.
per_hour; compare candidate densities and aim well below half the footage when the brief permits tuning. Record the density and effective padding, and disclose the risk of missing quiet moments rather than treating reduced coverage as proof of quality.spans(wins, duration_s, pad=...) API used indirectly by run, a process-local functools.partial(transcribe.spans, pad=<brief value>) can apply the requested padding without changing defaults for other jobs. Default arguments are bound at function definition, so changing PAD_S alone does not change that default.BatchedInferencePipeline(WhisperModel('large-v3', device='cuda', compute_type='float16')) with batch_size=16, beam_size=1: ~26x realtime versus ~2.5x for the sequential call, same model. VAD is built in.cublas64_12.dll not found, pip install nvidia-cublas-cu12 nvidia-cudnn-cu12 into the venv and call os.add_dll_directory() plus a PATH prepend for every site-packages/nvidia/*/bin before loading the model (a small gpu_env.setup() helper). A new RTX 50-series card then ran float16 fine. Smoke-test on a 60 s clip first; poll its log in short sleeps because model download plus load takes a minute.thai-subtitles-resolve "Hard clips" recipe: demucs vocals -> VAD chunks (0.35, max 6 s) -> Typhoon realtime plus large-v3 per chunk (Katy404 used a one-off asr_max_clips.py in the gitignored scratch folder; promote it before relying on it). Plain large-v3 with vad_filter, beam 5 and no_repeat_ngram_size on the full mix removed the loops but dropped most speech under game audio (one 71 s clip kept a single line). Katy404 2026-10: 7 of 48 clips looped; none was empty.end_s: Katy404 v09-03 "ชนะแล้วทุกคน" ended 8-33 s after the cut.pipeline.py fulltext transcribes the WHOLE video with word timestamps (large-v3-turbo, batched, 10-min resumable chunks) into transcripts/<id>.fulltext.txt ([H:MM:SS] text [ends s], sentences split at word pauses >= 0.6 s). If repo .venv lacks faster-whisper or CUDA libraries, run via the system Python (e.g. Python313) where CUDA DLLs are installed. Note that reading large streams over cloud drive mounts (G:/My Drive) adds latency (~45 min for 14 streams). Packets then show [ends] per line, reviewers can read past the window for the setup and the payoff, and snap.py <id> in:<t> out:<t> moves a mid-sentence cut to the sentence start/end (falls back to silence). It lets quiet moments the loudness shortlist missed be found by reading.fulltext): pipeline.py readpacks [ids] writes 30-min reading packs (2-min overlap) with a per-minute signal line (loud z, jump dB, talk %, !! = loud z >= 1.5 or jump in the stream's top 10%, shortlist); pipeline.py readbriefs [ids] writes one review/<pack>.brief.md per pack. Spawn one reader subagent per pack ("read and follow it"); each writes review/<pack>.json with setup/payoff/reaction cut points and a verbatim payoff quote. pipeline.py proposals rejects items whose quote is not in the pack or whose order/length is wrong, merges overlaps (keeps the most confident), tags quiet items outside the shortlist, and writes review/<id>.proposals.md, which the final reviewer brief reads first.quiet. They overlapped 3 of the 4 clips approved earlier; the miss was a lava scene carried by game audio and screaming rather than words. Reading complements the loudness shortlist, it does not replace it: keep both inputs for the final reviewer. Reader confidence was 0.35-0.65 because of ASR errors, so quiet picks still need a human watch.fulltext for 11 videos took 42 min on the 8 GB RTX. 61 sonnet readers took 30-65 s each, with 6-8 in parallel, starting each video's readers as soon as its transcript finished. The result was 342 proposals, 248 of them quiet, and only 36 with confidence >= 0.5. They covered 37 of the 48 approved clips (77%); the misses were mostly action scenes carried by game audio rather than words. Multi-speaker and collab streams gave the most garbled ASR. Rank the human listening by confidence and do not hand over all 342.%TEMP% file name (w.py) and one overwrote another's output. The reader brief now forbids helper files (use an inline heredoc). Check %TEMP% for new *.py after each batch.<id>-read-NN.md); a dot/dash mismatch made all three trial readers guess the input file.!! flagged 89 of 90 minutes on Katy404 v05, because every minute's peak jump is high; flag relative to the stream instead.ffmpeg -ss <t> -i ... -frames:v 1 (fast seek). Do not use Resolve analyze_bin for this: it pulls full-res frames. Spot-check that each sheet's burned-in yellow H:MM:SS tile timestamps match the window start in its filename (frames/<id>_*.jpg); if a sheet is mismatched (e.g., v06_000180.jpg labeled 1:06:52–1:10:37 in KT404 Highlights 2026-11-2), delete and regenerate it before readers or reviewers inspect it.silencedetect n=-35dB:d=0.4). The parent verifies subagent output with a schema pytest (keys, category set, length bounds, end <= duration, no overlaps), not their summaries.
1.00), opening on chat/Discord windows, or carrying static visuals during storytelling unless the channel explicitly requests pure talk clips.delegate_task -> invoke_subagent (TypeName: "self", one per video, max 8 per call; pass the brief text as Prompt and the exact HIGHLIGHT_JOB export inside it). Hermes terminal background/notify -> run_command for long stages; the system notifies on completion, so do not poll. Load other skills by reading skills/<name>/SKILL.md directly rather than reporting them missing.snap.py often returns the time unchanged. Tell reviewers to flag low-confidence clips in their reply and surface those ids to the user in the final report; do not present the clip list as verified content.resolve-rough-cut for end-frame exclusivity and mixed-fps rules; set the timeline frame rate before the first timeline).Generate timeline_plan.json (name + clip_infos per clip) with a tested script, create ONE timeline with media_pool create_timeline_from_clips (if_exists: "fail"), then verify it with timeline probe_timeline_structure (source_start/end match, media_status Online, source_fps equals timeline fps) and detect_gaps_overlaps before creating the rest.
Each call needs its exact clip ids/frames; pull them from the plan file in a terminal call and paste them rather than recalling them. Independent create calls can be batched in one turn; finish with timeline list (count equals candidate count, no *_archived_vNN) and project_manager save.
detect_gaps_overlaps only inspects the current timeline (the last created), so a full per-timeline check needs timeline set_current per id; single-clip timelines make gaps unlikely, but say in the report which timelines were actually checked.
For a naming-only correction, read the current project and timeline list, map every target by stable timeline ID, and check proposed names for collisions. For each target, serialize timeline set_current(id) then timeline set_name(name); do not parallelize these pairs because set_name acts on the globally current timeline. Rename existing timelines rather than rebuilding them, so trims and editor changes survive. Save the project, read back timeline list, and compare every target ID/name and the total count before claiming completion. Synchronize timeline_plan.json and the report with the verified names; retain candidate IDs and source ranges unchanged.
Batch read-back: after the last create, run python scripts/highlight/verify_timelines.py (HIGHLIGHT_JOB set, job project current). It reads every planned timeline without switching and writes timeline_verification.json; require 100% pass (e.g. 56/56 in 2026-11). Use MCP probe_timeline_structure only to confirm a reported mismatch. Note on CreateTimelineFromClips: endFrame is exclusive ([startFrame, endFrame)); passing end - 1 results in a timeline 1 frame shorter than planned. A 30 fps source on a 60 fps timeline reads back with double the source frame count as timeline duration: that is correct.
Footage on a cloud drive (G:/My Drive): set DEMUX_WORKERS 1-2 in job.json before features; parallel reads silently truncate wavs.
Reviewer briefs carry the real interpreter and HIGHLIGHT_JOB= in the snap command; pass the channel hint with pipeline.py briefs <hint>. The schema gate reads the clip-count range from CLIPS_PER_VIDEO.
In Claude Code, the reviewers are general-purpose subagents (sonnet is enough) whose prompt is just "read and follow "; 12 ran in parallel in about 45 s each.
Keep every script a job needs inside the repo, never only in chat or a one-off temp file: reviewer prompt as a template rendered per video (briefs.py + templates/reviewer_brief.md, delegate_task context = that file's text), source_id->Resolve clip id mapper that fails on a missing video, a calls <start> <end> mode on the timeline builder that prints ready MCP payloads, a GPU smoke test that reads the first inventory video (no hardcoded channel or filename), and ffmpeg path resolution as env override -> bundled copy -> PATH. Write the test first for each; run the whole suite before committing.
After changing the highlight entry skill, run a cold-start test. Give a fresh, cheap subagent a read-only user-style request ("/highlight : where is it, what next for v01?") and ask it to list what was unclear. The 2026-11-03 run found the workflow from AGENTS.md alone, but it caught three problems: the skill had no rule for re-reviewing a video whose review/<id>.json was already approved (overwrite risk), status could not be scoped to one video, and WORK_DIR and the background commands were never spelled out.
Edits to AGENTS.md can be blocked by an approval prompt that times out; silence is not consent. Do not retry or route around it via terminal; finish the rest, then tell the user exactly which line is still stale and ask.
When the user asks to commit or add something by a name that matches nothing in the repo (e.g. a Releases folder), say so and offer the readings (folder, tag, GitHub release) instead of guessing; commit what is unambiguous. Never push or tag without being asked.
Git branch: this user wants work committed and pushed on main only; do not create feature branches (a feature-branch rule in the repo's AGENTS.md is stale once they say so; flag it, since editing that file needs approval). Check git rev-list --left-right --count origin/main...HEAD and push with a fast-forward, not a merge commit.
Release flow when asked: (in this repo use scripts/release.py per AGENTS.md, which supersedes the rest of this line) write notes to Releases/<tag>-<job>.md (what was added with real counts from files and test output, problems and fixes, what was verified vs not, commit table, how to run next), commit, git tag -a, push the tag, then gh release create <tag> --notes-file <that file>. Later doc fixes do not move the tag; refresh the page with gh release edit <tag> --notes-file and say the tag still points at the old commit.
A bare repeated "go ahead" with nothing pending is not an instruction: say nothing is queued and offer concrete next steps (PR, listening to low-confidence clips, per-timeline gap checks) instead of inventing work.
Never kill python by image name when a pipeline and a benchmark may both be running; list Get-CimInstance Win32_Process command lines via powershell and Stop-Process -Id. In git-bash, taskkill //F is rejected here; use powershell. Two concurrent GPU jobs silently slow each other, so kill the stale one before benchmarking.
Subagent reviewers need a snap.py <id> <seconds>... helper (silencedetect on the level-untouched wav, returns snapped times) and an exact JSON schema in their brief; keep the schema pytest red until all review files exist, then run it as the gate. Locate the actual schema-test symbol in the current test tree instead of assuming an old plan's filename. Before review, distinguish an expected missing-review failure from implementation failures: run the remaining tests without that one gate, then restore the full suite after review. Verify contact-sheet count and dimensions against shortlist count, and packet/brief count against inventory count before delegation.
write_file refuses to overwrite a file whose last read was paginated or from an earlier task, and repeating the identical call loops. Read the whole file with a plain read_file (no offset/limit) immediately before overwriting, or write the new content to a fresh temp file and mv it over the old one. Prefer patch for small edits.
When editing files through a Python heredoc or tool call, backslashes can arrive halved: \a in a Windows path becomes a BEL control character and a regex backreference \1 becomes 0x01. Build such strings with chr(92), avoid sending backslash escapes in replacement text, and scan the result for characters below 0x20 afterwards (and run the test that covers the regex).
Keep the repo's root AGENTS.md in step with the pipeline after a job: skill names to load, scripts/highlight/ module list and run commands, how the job variables are selected, the working rules that proved necessary, and a dated 'current state' line that says to verify before relying on it. Edit it with patch (a whole-file write_file can be refused after a prior terminal edit) and check every named env var, stage and path against the code first.
Keep a project wiki (docs/highlight/wiki/) in step with a finished job: add the user's verbatim answers/approval under raw/, one source summary, one run-record analysis that separates user decisions from agent-measured numbers and unverified ASR claims, then update index, overview and an append-only log entry. An all-clips approval without reasons is not a reusable preference: do not edit house-style from it.
git-bash /tmp is not the native Windows temp dir: run native Python on scripts with $(cygpath -w <path>), or write scratch files to the Hermes scratch directory.
Playback frame rate cannot be set or verified through the API; ask the user to confirm it in Project Settings -> Master Settings -> Playback frame rate and do not improvise other menu paths.
Re-check the active project immediately after a background review: the user may have switched it. Obtain consent before saving/switching an unrelated project. If LoadProject says not found, inspect Project Manager's current folder and navigate the observed folder tree before retrying; project list/load are scoped to that folder, not the whole database.
Read every timeline_frame capture warning. A new project's original format may be mov with an empty codec, which the capture cannot restore; read back render.get_format_and_codec and disclose the remaining jpg setting instead of silently choosing a new delivery codec. Failed playhead restoration is separate from timeline restoration; intentionally set and read back the handoff timeline/playhead.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub pong34811/agent-edite-davinci_resolve --plugin agent-edite-davinci-resolve98 skills in this plugin
/agent-edite-skills-catalogInventory, read, and route this repo's project skills./agent-skill-repo-releaseVersion, tag, push, and publish skill-repo releases./davinci-resolve-apiComprehensive guide for scripting DaVinci Resolve Studio via its Python API. Covers environment setup, connection, project management, media pool operations, timeline building, clip placement, color management, rendering, and export. Requires DaVinci Resolve Studio (free version does not include scripting API).
/general-videoAuthor or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated motion-first unit, including an animated title. Route fresh creation through hyperframes before using this skill.
/gif-searchSearch/download GIFs from Tenor via curl + jq./grillingGrill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.