Communitygithub.com

xushengyu2003-sys/workbuddy-short-video-kit

把已有中文口播、访谈、课程或产品素材剪成短视频并添加字幕;从素材检查、转录选段到本地 MP4 导出和质量检查。用户说剪短、剪口播、访谈切片、删停顿、加字幕、一句话出片时使用。

workbuddy-short-video-kit 是什么?

workbuddy-short-video-kit is a Claude Code agent skill that 把已有中文口播、访谈、课程或产品素材剪成短视频并添加字幕;从素材检查、转录选段到本地 MP4 导出和质量检查。用户说剪短、剪口播、访谈切片、删停顿、加字幕、一句话出片时使用。.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/xushengyu2003-sys/workbuddy-short-video-kit/tree/HEAD/skills/workbuddy-short-video

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Short Video Editing Workflow for Beginners

This is a self-contained macOS-first skill. It includes execution tools; no other skill needs to be installed for video editing. WorkBuddy is responsible for understanding content and selecting footage, FFmpeg for deterministic editing, and optionally faster-whisper for local transcription. Do not claim a result as a completed video if only a script or outline was produced.

Respond to the User's One-Line Request

Start directly when the material and objective are given. Defaults: Chinese voice-over/interview, target about 60 seconds, 1080×1920, 30fps, keep original audio, white subtitles with black stroke, no background music, do not publish. For horizontal footage, keep the full frame by adding background margins by default to avoid cutting off another interviewee; only crop to fill if the visual review supports it or if the user requests it.

If material is missing, only ask the user to upload a video or provide the local path. If no content objective is given, the skill can autonomously select a segment with complete information based on the transcription; do not ask a beginner to fill in timecodes, JSON, or tool parameters. For long interviews, transcribe first, then choose a topic—do not mechanically take the first 60 seconds. Produce only one clip by default; if the user requests multiple clips, provide an independent list and version directory for each.

Execution and Library Usage

First, determine the current skill directory as SKILL_DIR; the tool entry point is scripts/video.py relative to this file. Do not use the absolute path from the author's computer. Locate a working Python 3.9+ interpreter: prefer the host's configured Python, otherwise python3. Run "<PY>" "<SKILL_DIR>/scripts/video.py" doctor; read the output, not just the exit code. Fix missing dependencies as per setup.md; never wrap failures as successes.

Read the following modules as needed; these modules are libraries of this package and do not require sub-agent functionality:

ModuleWhen to CallInput → Output
Material CheckEvery time work startsLocal video → probe metadata, keyframes
Transcription & Segment SelectionWhen accurate text timeline is missingtranscribe → transcription, word-level timestamps; select complete thoughts per editing.md
Remove PausesUser wants compact video or speech has many gapssilence → candidate retention intervals; review with word-level timestamps
SubtitlesSpeech exists and subtitles are requestedcaptions split sentences by word-level timestamps → SRT, correction, choose source/output timeline
Composite ExportWhen a valid edit plan existsvalidate, render → MP4, SRT, actual edit plan, machine checks
Delivery CheckAfter renderingquality sample frames, decode fully + visual and audio review
Dubbing/Image ExpansionUser wants to turn an article or slides into a videoextensions.md; first obtain images and dubbing, then composite

All commands, parameters, and edit plan formats are in engine.md. Use subprocess argument arrays or host-safe file/command invocations; paths containing Chinese characters, spaces, or quotes must not be concatenated into unescaped shell commands. Core editing requires local Python and FFmpeg; no online video service is needed. If the user provides subtitles or segment selections, the transcription model can be skipped and the video exported directly.

Content and Subtitle Constraints

At least view the beginning, middle, and end of the selected segment to verify faces, orientation, text, and audio track. Having a transcription does not mean the visuals have been reviewed. The selected segment must deliver a comprehensible thought, preserving qualifiers, negations, arguments, and the speaker's identity. Do not concatenate segments from different parts to simulate original speech, and do not use silence detection to guess highlights. If shortening to the target duration would break the meaning, make it slightly longer and explain why.

The output of silence is a suggestion; do not delete all pauses outright. Keep buffers around word boundaries, and do not remove all pauses between sentences. The raw transcription may consist of very long segments; before burning subtitles, split using word-level timestamps into usually 10–18 Chinese characters, at most two lines. Do not guess speech duration based on character count. When only sentence-level timestamps are available, keep the sentence timing or request finer transcription; do not claim word-level alignment. After cross-cutting, map source subtitles to the output timeline; for multiple sources, use output subtitles.

Verify names, numbers, and terminology against the audio and the user's vocabulary. Preserve the original meaning; do not add speech the speaker never said. By default, place subtitles at approximately 78% of the frame height and keep width under 78%—these are universal margins but still need to be checked against platform UI and face positions.

Resumable Work and Delivery

Create a new project directory; keep source material read-only. Record brief.md (requirements and defaults), edit-rationale.md (reasons for selecting/deleting segments, original timecodes), and edit-plan.json (a rerunnable plan). Use a new out-vN directory for each render. On failure, preserve diagnostics; retry at most twice with a clear cause. If still failing, state the specific blocker and any usable intermediate artifacts.

machine_pass in the render output must be true before declaring the encoding and decoding checks passed. Open review sample frames to check subtitles, faces, and black borders. Listen to the beginning, transitions, and end; check audio-video sync, word clipping, and volume. The machine cannot judge semantics or missing font glyphs; mark unchecked items in the delivery note as pending review, do not check all as passed. When conditions allow, submit manual check conclusions and evidence in quality.json.

Deliver: final.mp4, subtitles.srt (if subtitles were requested), edit-plan.json, edit-rationale.md, quality.json. Provide the user with clickable paths and a one-line result summary. Titles/intros are optional copywriting services and cannot replace the finished video.

Local editing does not upload source material by default. The model's first download may access the model hosting site; explain the size and offline alternatives. Online text-to-speech dubbing will send the text; obtain authorization for that content first. Do not call paid services, clone voices, or auto-publish without authorization. When sharing the skill, share only the package itself; do not include private materials, keys, transcriptions, or personal fonts.

相关技能