One-stop overview (long-form → short-form → dual-format info)
This Skill completes three major stages in one go, with 3 STOP checkpointsin between, and each checkpoint muststop and wait for the user to make the call; do not rush ahead automatically:
階段 1 長片:剪口播 → 轉字幕 → 🛑STOP1 疑慮字幕確認 → 時間碼硬關卡 → 標題 → 封面 → 長片 metadata → 打包
階段 2 短片:讀完整字幕 → 亮點偵測 → 🛑STOP2 三候選確認 → 切片組片 → 短片 metadata → 打包
(標題候選為 🛑STOP3,已含在各階段內)
- 🛑 STOP 1(Stage 1 step 3): list questionable terms and wait for the user to proofread; only proceed after applying them.
- 🛑 STOP 2(Stage 2): 3 candidate short-form versions, wait for the user to choose a number.
- 🛑 STOP 3(step 4 / short-form step): title candidates, wait for the user to choose.
- Hard checkpoint:
validate_srt.pynot passed (inconsistent segment count / timecodes don't match) → abort delivery and report back, must not force output. - Prevent word breaks: subtitle sentence splitting relies on
resegment.pycut-point priority order; short-form clips must always align to subtitle paragraph boundaries,must not cut in the middle of a sentence。
The short-form stage is not mandatory: if the user doesn't want short-form, stop at the end of Stage 1. Only proceed to Stage 2 if short-form is wanted.
Read first
HANDOFF.mdCLAUDE.mdassets/style/reference-thumbnails.pngassets/style/cover-style.mdassets/persona/三師爸人物形象照.png
Claude Code-specific rules
- Cover uses
skills/cover-image/draw.pyor Claude global~/.claude/skills/draw/draw.py。 - Requires OpenAI API Key:
OPENAI_API_KEYor~/.openai.env。 - Cover generation must include
--edit assets/persona/三師爸人物形象照.png。 - Every cover must reuse the person's base reference photo; the person must not be carried over from the previous cover or a derivative image.
- Claude's signature color is orange:
#FF8C42、#FFA500、#FF6B35。 - Claude output folders always have
[Claude]suffix added.
Workflow
-
Intake
- Find
raw/new videos. - Create
working/<video-id>/。
- Find
-
Cut talking-head
- Read
skills/smart-cut/SKILL.md。 - Run
skills/smart-cut/scripts/smart_cut.py。 - this speaker's tested sweet spot:
--threshold 0.06 --margin "0sec,0.1sec"(cut about 80%, crisp pacing, no silence left at the start). - Starting suggestion: first run once with the tested sweet spot, show the user
cut.mp4to confirm the pacing; too aggressive → threshold 0.05, margin "0.2sec,0.2sec"; too loose → threshold 0.07. - Output
working/<video-id>/<video-id>.cut.mp4。 - After running, report "original length X:XX → new length X:XX (cut X%)".
- Read
-
Transcribe subtitles
- You can feed cut.mp4 directly to
transcribe_groq.py(internally uses ffmpeg automatically), no need to extract audio first. Files < 25MB are taken directly by Groq; > 25MB will be automatically downsampled. - Read
skills/audio-to-srt/SKILL.md。 - Workflow: transcribe_groq.py → resegment.py → apply_vocab.py → Claude personally cleans the text segment by segment(read vocab.srt, fix typos per the rules, add punctuation, don't touch timecodes, keep segment count unchanged) → 🛑 STOP 1 questionable term confirmation(see below) → validate_srt.py [hard checkpoint] → srt_to_txt.py.
- First create
_subtitles/subfolder, otherwiseresegment.pywillFileNotFoundError。 - 🛑 STOP 1: Confirmation of questionable terms (no skipping allowed)
- Run
python skills/video-editing-and-subtitles/scripts/find_dubious_terms.py "working/<video-id>/_subtitles/<video-id>.vocab.srt" --out "working/<video-id>/_subtitles/dubious_terms.md"to automatically extract paragraphs containing proper nouns (Claude/Gemini/Agent…) and common transliteration typos. - Read
dubious_terms.md, list the questionable paragraphs in the conversation, and stop to ask the user how to fix them. Do not guess and keep going. - After the user replies, use
python skills/video-editing-and-subtitles/scripts/finalize_subtitles.py "<vocab.srt>" --out "<clean.srt>" --replace "舊->新" --replace "段號:舊->新"to apply the corrections (for specific paragraphs, use only the390:AGE->Agentformat to avoid accidentally damaging things like the Gem in Gemini).
- Run
- Timecode hard gate:
validate_srt.py --raw <vocab.srt> --clean <clean.srt>If the segment counts are inconsistent or the timecodes do not match → abort, report the discrepancies, and do not deliver。 - Common Whisper misrecognitions(remember to fix these when cleaning the text):
- "燭光國中 / 竹光國中" → "光武國中"
- "稅教材" → "數學教材"
- "AI-Aging / AI 阿真 / AI 安進" → "AI Agent"
- "租寫的範本" → "填寫的範本"
- "微填" → "微調"
- "半年段另存心" → "按年段另存新檔"
- Cloud / Claude / Codex are easily confused (apply_vocab already handles most of this)
- Output
working/<video-id>/<video-id>.srtand.txt, and also copy out the .srt for convenient use in step 8.
- You can feed cut.mp4 directly to
-
Generate titles and pause
- After reading the cleaned text,
.txt。 - generate 10 title candidates to
working/<video-id>/titles.md。 - The title strategy should be grouped (to make it easy for the user to compare): pain point/liberation type, teaching/Know-how type, contrast/rhetorical question type, and concrete/case study type, with 2–3 of each.
- Report the title list to the user,stop and wait for the user to choose a number. Do not pick one yourself and do not keep running.
- After reading the cleaned text,
-
Create the Claude output folder
- Clean Windows-illegal characters from the title:
?!:/\?!:/\\<>|"*。 - Create
output/<清洗後標題> [Claude]/。 - Do not add
[Claude]。
- Clean Windows-illegal characters from the title:
-
Generate cover
- Pre-cover SOP (all are required, do this every time):
a.
Read assets/style/reference-thumbnails.png(look at the channel's existing 12 covers) b.Read assets/style/cover-style.md(read the full style guide) c.Read assets/persona/三師爸人物形象照.png(re-read the character reference photos every time; do not reuse old covers) d. Decide the main color based on the video's main subject: Claude=orange / Codex=blue / both=orange+blue - Claude version main color is fixed:
#FF8C42、#FFA500、#FF6B35 - Prompt template(already tested and effective; fine-tune according to the video content):
YouTube 封面 16:9,三師爸頻道科技教學風格。本支影片主角為 {AI_NAME},採用{COLOR}主題配色。 背景:深海軍藍 (#0A1628) 漸層底,左下與右上有 {THEME_LIGHT_COLOR} 放射光線與粒子特效,細微網格紋理,整體科技未來感、強烈呼喚點擊感。 人物:畫面右側放置這位男性教師(戴眼鏡、黑色連帽外套),姿勢為{POSE},臉部表情自信微笑,看向鏡頭。{COLOR} rim light 打在邊緣輪廓。人物樣貌、五官、髮型、外套、眼鏡全部延續輸入的人物基準照,不要更動。 主視覺(左側中下方):{TOPIC_VISUAL}。電腦周圍有發光暈。 文字(左半邊): - 集數標籤(左上):『{SERIES_LABEL}』白色細字 - 主標題(左中央):『{TITLE_LINE_1}\\n{TITLE_LINE_2}』兩行排列,亮黃色 (#FFD700) 超粗黑體中文字,粗黑色描邊 5px,佔畫面寬度約 45% - 副標題(主標下方):『{SUBTITLE}』白色細字,搭配兩側裝飾橫線 整體:高對比、教學頻道氣口、適合教師受眾。 不要:純白底、自然風景、寫實生活感、3D 浮雕字。 - Standard call:
python skills\cover-image\draw.py "<prompt>" --edit "assets\persona\三師爸人物形象照.png" --size 1536x1024 --quality low --name cover --outdir "output\<標題> [Claude]" - Run the cleanup: delete the timestamped filename version, keep
cover.pngone copy; use the Read tool to take a look at the cover and confirm the character's appearance is correct.
- Pre-cover SOP (all are required, do this every time):
a.
-
Write metadata (according to marketing specifications)
- First Read
references/marketing-spec.md(the merged version of the txt v1.5 main specification + channel supplementary fields), and always use it as the standard. - Takeafter cleaning the text
.txttranscriptgenerate; the material must echo the actual subtitle content. For long videos,metadata.mdmust include at least:- 10 title candidates(Curiosity/Value/Pain Point three styles interspersed)
- Video description ≤300 characters: Hook (first two lines eye-catching) + 3 key knowledge points in bullet list + CTA; the first paragraph echoes the emotional tone of the title type selected by the user.
- Social post(FB / IG / Threads):Emoji strictly prohibited, each paragraph ≤3 lines, long video 150–200 characters, sincere teacher tone, end with an interactive question.
- 15–20 SEO keywords + "Paste all at once" integrated tag block(separated by half-width commas, so the user can paste directly into YouTube backend).
- Chapter timestamps(based on subtitle segments, advisory in nature).
- Pre-publish checklist(title/thumbnail/subtitles/first 100 characters of description contain main keyword/tags/playlist/social sync).
- Detailed formatting and short-video override rules are entirely based on
references/marketing-spec.md.
- First Read
-
Packaging and self-check
- The output folder should contain 5 files(file names without the
[Claude]suffix):<標題>.mp4(copied from working/ and renamed)<標題>.srt<標題>.txtcover.pngmetadata.md
- Self-check checklist(check item by item after running):
- The folder name ends with the
[Claude]suffix - The folder contains all 5 files
- The video file name equals the YouTube title (without the suffix)
- cover.png opens and the person's appearance continues from the reference photo (take a look with Read)
- cover.png main color is orange (not blue)
- metadata.md contains the "paste all at once" integrated tag block
- HANDOFF.md has been updated with this video's status
- The folder name ends with the
- PowerShell reminder: when the path contains
[Claude], PowerShell treats square brackets as wildcards; use-LiteralPathor add single quotes. Bash does not have this problem.
- The output folder should contain 5 files(file names without the
-
Update handoff
- Update
HANDOFF.md: completed items, output location, cover status, pending review items, next steps.
- Update
Pitfalls
OPENAI_API_KEYdoes not exist or the account is not verified, the cover will fail. Check order: environment variables →~/.openai.env. Bash loading:export $(cat ~/.openai.env | xargs)。skills/cover-image/draw.pyrequires theopenaiPython package.- gpt-image-2 requires OpenAI Individual verification; if unverified it will return
403 Organization must be verified。 auto-editornot being in PATH does not matter,smart_cut.pywill automatically fall back topython -m auto_editor。- Groq transcription uploads audio to a third-party service; if the content is sensitive, stop first and ask the user.
- Groq 25MB limit:
transcribe_groq.pybuilt-in ffmpeg automatically downsamples to 16kHz mono 32kbps. resegment.pywill not automatically create the output folder, firstmkdir _subtitles。- Chinese file names, spaces,
[Claude]square-bracket paths: in PowerShell use-LiteralPathor single quotes; in Bash double quotes are enough. - Contradictory cover prompt (for example, saying the person wears blue but the reference photo is a black jacket) → gpt-image-2 will compromise; in the prompt describe only position and scene, do not re-describe facial features or clothing attributes.
- Every cover must re-read the reference photo, you cannot use the previous cover as input; the model will amplify the error, and the more it generates, the less it resembles the original.
Stage 2: Short clip highlights (only run if a short clip is needed)
After the long video finishes (already has cut.mp4 + clean.srt), if the user wants a short clip,take over skills/short-video-workflow/SKILL.md the complete workflow. Key checkpoints:
- Mandatory full read of
working/<video-id>/<video-id>.srt: before extracting highlights, you must first read the entire subtitle file and understand the timecodes; it is not allowed to just look at a segment and grab it. - Highlight detection: score each segment 0–3 according to the checklist such as pain points/rhetorical questions/numeric promises/strong assertions/twist reveals.
- 🛑 STOP 2: Confirm three candidate versions
- Create 3 versions (A pain-point type / B curiosity type / C promise type hook), each with a three-act structure, ≤120s, written into
working/<video-id>/shorts-candidates.md。 - list the timecodes and three-act scripts of the three versions for the user, stop and wait for the user to choose A/B/C(or the user provides their own timecodes). Do not choose on your own.
- Create 3 versions (A pain-point type / B curiosity type / C promise type hook), each with a three-act structure, ≤120s, written into
- Slice and assemble:
clip_cut.pyslices (align to subtitle segment boundaries, do not cut in the middle of a sentence) → confirm ≤120s →add_end_card.pyending title card →burn_subtitles.pyburn subtitles →make_vertical.pyproduce a 9:16 vertical version. - Short clip title (🛑 STOP 3): produce 3 shorter and more sensational candidates and wait for the user to choose.
- Short clip metadata: likewise Read
references/marketing-spec.md, apply the "C. Short clip differences" overrides (3 titles, description ≤150 characters,#Shortsrequired, add at the end of tagsShorts,短影片)。
Specs: 16:9 edit, ≤120s, primary color Claude orange, output output/<短片標題> [Claude] (Short)/, cover/person reference photos use the same set.
Each short clip must also produce a 9:16 vertical version(for YouTube Shorts publishing): after burning subtitles, run make_vertical.py(blurred background fill, content not cropped, 1080×1920), output filename <短片標題>_直式9x16.mp4, the short clip folder has 7 files in total.
Example: result parameters of this project's first video
So you know what parameters have been tested OK:
- Video:
你還在手動填課程計畫嗎 AI Agent 教師工作流實演 - original length 14:00 → smart-cut (threshold 0.06, margin "0sec,0.1sec") → 1:42 (cut 88%)
- Subtitles 37 segments, 530 characters, total duration 1:41
- 10 title candidates, divided into four strategy groups, user chose #7
- Cover: orange theme, left side Claude AI interface + red X paper document, right side person pointing left
- Complete final product:
output/你還在手動填課程計畫嗎 AI Agent 教師工作流實演 [Claude]/