AGENT SKILL

video-editing-skill

Deterministic video editing from a typed edit request (trim, cut, concat with transitions, speed change, fit / fill / resize, still-image overlay) with an exact source-to-timeline mapping and per-operation provenance. Executes through ffmpeg-skill; never takes commands, argv, filter strings or executables. Use when an agent has already decided what to edit and needs the edit performed, verified and traced. Not for deciding what to cut, transcribing, captioning, colour grading or audio mastering.

License 许可
MIT
所属仓库
kajisho5/skillpact
最近更新
2026-11-13
Stars
★ 0
Forks
0

01 前言 Front Matter

name
video-editing-skill
description
Deterministic video editing from a typed edit request (trim, cut, concat with transitions, speed change, fit / fill / resize, still-image overlay) with an exact source-to-timeline mapping and per-operation provenance. Executes through ffmpeg-skill; never takes commands, argv, filter strings or executables. Use when an agent has already decided what to edit and needs the edit performed, verified and traced. Not for deciding what to cut, transcribing, captioning, colour grading or audio mastering.

02 资源文件 46

03 SKILL.md 正文

video-editing-skill

video-editing run - --json --workspace DIR [--allowed-input ROOT] reads one request document on stdin and prints one response document on stdout. Everything else (skill, doctor, validate, plan) is documented in README.md; the machine-readable contract is video-editing contract --json.

Workflow for a caller:

  1. doctor --json --workspace DIR once: ok must be true; operations[] says per type whether it is AVAILABLE (tool and the flags it needs present in the installed ffmpeg-skill, any release; encoders / filters found by its doctor) and supported_operations lists exactly those.
  2. Build the request from the contract's request_shape: sources (files under an allowed root), allowlisted operations with typed params, outputs (relative paths under the workspace).
  3. plan - --json to see the operation graph, the timeline mapping, the tool per step and the commands ffmpeg-skill would run. Nothing is written.
  4. run - --json. On success every output carries its sha256, size, timeline and an OBSERVED probe; every source its probe; every operation a provenance record (completed / reused); the document is self-checked against the contract shape before it is printed. On failure {"ok": false, "error": {code, message, retryable, details}}, the failed record with its error, later operations skipped, and no output file is left behind.

Media rules (contract.media_compatibility): every source is probed first; OVERLAY needs a video input with an audio stream; CONCAT conforms sizes / rates and adds audio when any input has it. Engine gaps (a missing ffmpeg-skill tool, encoder or filter) are refused before execution as TOOL_ERROR.

Operation types (the allowlist): TRIM, CUT, CONCAT (with params.transition), SPEED (factor, optional smooth: blend | interpolate for slow-motion), FIT, FILL, RESIZE, OVERLAY, ROTATE (turn 90/180/270 clockwise and/or mirror h/v). Anything else (CROP, FREEZE, REVERSE, IMAGE_INSERT, POSITION included) is refused with UNSUPPORTED_OPERATION; the contract's unsupported list says why.

Times are exact: "1:30", "00:01:30.250", {"frames": 300, "fps": "30000/1001"} or a number of seconds.

Frames are exact too: RESIZE keeps the aspect (width → height = even(width × sh / sw)), FIT pads to an aspect, FILL crops to it (optionally off-centre via anchor: {x, y}, each 0..1); ROTATE keeps every pixel losslessly (degrees: 90 | 180 | 270, flip: h | v), swapping width and height only for a 90/270 turn; the target frame is reported before execution (normalized.target_frame) and verified after. outputs[].encoding may set crf (14..28) and preset (x264 vocabulary); nothing else about encoding is configurable (contract.encoding).

contract --check tests/contract/contract.json verifies the live contract against the implementation, the docs and that saved copy; exit 1 on any problem.

04 同仓库更多 Skills

kajisho5
kajisho5/skillpact

thumbnail-skill

Deterministic thumbnail rendering execution Skill for the AI Video Production Ecosystem. Use it when a caller (normally video-production-agent) has already decided exactly what a thumbnail should show - which still image or which explicit video timestamp, what text, what layout - and needs it rendered safely to PNG/JPEG with provenance. Do NOT use it to choose what a thumbnail should show, pick a "best" video frame, detect faces, generate a title, judge design quality, or run arbitrary ffmpeg/image commands (it refuses them); those decisions belong to the caller.

★ 0
kajisho5
kajisho5/skillpact

subtitle-skill

Deterministic subtitle validation, SRT/WebVTT generation, and video caption burn-in. Given an already-decided, typed subtitle document (cue text, timing, optional speaker/style), validate its timeline, generate an SRT or WebVTT file, or burn it into a video by delegating to ffmpeg-skill's caption tool. Use this skill only after another agent has already decided what the subtitle cues should say and how they should be split -- it performs no transcription, no diarization, no cue-splitting judgement, and no "does this look right" visual check.

★ 0
kajisho5
kajisho5/skillpact

ffmpeg-skill

Edit video and audio with local FFmpeg from natural-language requests: cut, trim, join, resize/reframe (9:16, 1:1), speed change, captions and subtitles (SRT/ASS, animated, karaoke), logos and text overlays, lower-thirds and titles, silence removal, multicam and external-mic sync, loudness normalisation, HDR/Dolby Vision to SDR, LUTs, background music with ducking, platform exports (YouTube, Reels, TikTok, X), compliance checks, scene detection and highlight reels, contact sheets to inspect results, and whole-edit project files. Use this skill whenever the user mentions a video or audio file (mp4, mov, mkv, wav, m4a), footage, a clip, captions, subtitles, a reel or short, YouTube/Instagram/TikTok delivery, LUFS, sync, transcoding, ffmpeg, or asks to make something "60 seconds", "vertical", "louder", "captioned" — even when they do not say "edit". Python 3.9 standard library only, no cloud, no API keys.

★ 0
kajisho5
kajisho5/skillpact

skillpact

Write and check SkillPact contracts (skill.contract.json) for Agent Skills with the skillpact CLI - draft a contract from a SKILL.md, validate it, run its conformance tests network-isolated, hash and sign every file, report the level L1 / L2 / L3, match it against a harness policy (allow / ask / deny) and compile that decision to Claude Code, Cursor, Codex or Gemini CLI settings or export it to HushSpec, Rego, APS or ACS. Use when the user wants a skill's permissions declared or reviewed before install, a contract drafted, validated, signed or migrated, a conformance level or badge, a policy check, or harness permission settings made from a policy. Python 3.11+; bubblewrap on Linux for L2 and L3. Not a runtime sandbox and not a malware scanner - L3 means these files, signed by a trusted author, passed their tests, not that the skill is safe.

★ 0