Imported from Tsubaki-01/tsubaki_skills (
editing-videos-from-assets/SKILL.md). Install upstream withnpx skills add Tsubaki-01/tsubaki_skills --skill editing-videos-from-assets. Copyright stays with the author.
Editing Videos from Assets
Boundaries
Treat the asset directory as read-only and process locally. Put generated files in separate work and output directories. Never upload, move, rename, overwrite, or delete originals. Background music is completely out of scope: never add, generate, download, recommend, or mix it. Retain only useful audio already embedded in a source clip, or export an intentionally silent video.
Phase 1: inspect, analyze, and propose
Carry forward the user's existing brief, chosen style, format, and duration. Ask only about a missing choice that materially affects the edit. A clear direction already supplied by the user is a selection, not a reason to ask again.
Locate local ffmpeg and ffprobe. Run these from the Skill directory:
python scripts/inspect_media.py <assets-dir> --output <work-dir>/manifest.json
python scripts/sample_media.py <work-dir>/manifest.json --work-dir <work-dir> --make-proxies
Review every non-hard-rejected entry in shots.json across every paginated
contact sheet; do not stop after early or technically strongest shots. Build
content groups for people, scenes, event phases, actions, emotions, and time
regions. Prefer content coverage, then time coverage; use technical quality as a
gate and suppress duplicates. Preserve unique poor shots when they carry
otherwise missing content. Mark uncertain content unknown; never guess.
Author selection.json against
references/selection.schema.json. Obtain its
exact artifact fingerprint, then audit it:
python scripts/validate_selection.py --shots <work-dir>/shots.json --fingerprint-only
python scripts/validate_selection.py --shots <work-dir>/shots.json --selection <work-dir>/selection.json
Resolve selection errors before proposing styles. Present the validator facts as a short 素材覆盖摘要, including analyzed counts, major groups, hard/duplicate exclusions, selected poor shots, and unknowns. Then read references/style-proposals.md when the direction is still open. Offer only materially different directions supported by the assets, using the same reviewed shot pool; do not pad a fixed number of options.
STOP FOR SELECTION
If the direction is unresolved, ask the user to select and stop. Proceed when their direction is clear, including a choice already made earlier in the task.
Phase 2: subtitles and timeline
After selection, read references/editing-qa.md and
references/export-presets.md. Build
timeline.json against references/timeline.schema.json.
Every segment must include the exact selected shot_id and remain inside its
recommended source range. text burns a short title at the top of that segment;
dialogue subtitles are separate and remain at the bottom.
Automatic speech recognition is optional and local. Use faster-whisper with
word timestamps only when the dependency and a local model are available:
python scripts/transcribe_audio.py <work-dir>/manifest.json --output-dir <work-dir>/transcripts --model <local-model-path> --timeline <work-dir>/timeline.json
A named model such as small may be used with --allow-model-download only
after explicit user approval. Never upload audio. If ASR is unavailable, reports
low confidence, or lacks a usable local font, continue without burned subtitles
and disclose this; never invent speech. When captions are usable, set subtitle
mode to burn and point the timeline to the generated ASS file.
render_timeline.py checks the selection, timeline, and source files itself.
Run validate_timeline.py separately only when useful for diagnosing or drafting
the timeline. If a source changed, reinspect it and regenerate the affected
analysis and edit artifacts before rendering.
Phase 3: render, review, and deliver
Render a preview first:
python scripts/render_timeline.py --timeline <work-dir>/timeline.json --manifest <work-dir>/manifest.json --shots <work-dir>/shots.json --selection <work-dir>/selection.json --output <work-dir>/preview.mp4 --quality preview --graph <work-dir>/filter-graph.txt --log <work-dir>/render.log
Show the preview for approval, checking visible titles, subtitles, crops, and transitions as well as playback. Apply only requested or diagnosed changes. Allow at most two automatic repair attempts; if a critical defect remains, retain the candidate and diagnostics and do not produce a final file.
After preview approval, render with --quality final to a candidate path. Compute
the expected duration from the timeline, accounting for transition overlaps, then
run QA and atomic promotion:
python scripts/qa_output.py <work-dir>/candidate.mp4 --report <work-dir>/qa.json --preset <timeline-preset> --quality final --expected-duration <seconds> --promote <output-dir>/final.mp4
Deliver final.mp4 only when critical_pass is true. Also deliver a short
production note naming the selected proposal, preset, duration, source-audio and
subtitle decisions, used/excluded assets, deviations, warnings, and QA result.