Communitygithub.com

jsath/claude-skills

自動將原始長片 YouTube 錄製內容(螢幕錄影輸出、攝影機檔案,或兩者加上獨立麥克風)剪輯成可發布的影片,類似 Descript 但全自動:帶時間戳記轉錄、移除重拍並保留最後一次、收緊空白片段同時保留無聲的螢幕動作、將人聲壓製到 -14 LUFS / -1.5 dBTP(無背景音樂)、為最終渲染重新轉錄生成逐字 SRT(可選內嵌字幕)、草擬章節、標題與描述,並在品質閘門失敗時大聲提醒。

claude-skills 是什麼?

這個 AI 代理技能專為 Claude Code 設計,能將原始長片 YouTube 錄製內容自動剪輯成可發布的影片。它會自動轉錄並加上時間戳記,智慧移除重拍(只保留最後一次)、收緊空白片段(同時保留螢幕上的無聲動作並加速長時間等待),並將人聲壓製到 -14 LUFS / -1.5 dBTP,完全不使用背景音樂。最終渲染後會重新轉錄以產生逐字 SRT 字幕,可選內嵌字幕,並自動產生章節、標題、描述,甚至聯絡表與剪輯差異圖。它也包含嚴格的品質閘門,檢查畫面完整性、字詞還原率、影音同步、字幕同步與音量,並在失敗時產生明確的錯誤報告。使用者只需將原始檔案放入資料夾,執行一個命令,就能得到已剪輯、壓製、加上字幕的影片,以及一份詳細說明每個剪輯決策的 REVIEW.md 檔案。

相容平台✓Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/jsath/claude-skills/tree/HEAD/skills/video/longform-edit

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

longform-edit

將原始檔案放入資料夾,執行一個命令,就能得到已剪輯、壓製、加上字幕的影片,以及一份詳細說明每個剪輯決策的 REVIEW.md 檔案。短版相關技能:edit-style(Reels)。轉錄設定:use-local-whisper。縮圖:thumbnail-generator。各平台剪輯字幕:reel-captions。

需求(先檢查,只有在使用者同意後才安裝)

ffmpeg -version | head -1                       # 任何 6.x+;只有需要 --burn-captions 時才需要 libass
whisper-cli --help >/dev/null && echo WHISPER_OK   # whisper.cpp(brew install whisper-cpp)
ls ~/models/whisper/ggml-small.en.bin           # 或設定 paths.whisper_model
python3 -m pip install -r scripts/requirements.txt  # numpy, pillow, opencv-python-headless
which claude                                     # 選用:標題 + 章節名稱

模型:curl -L -o ~/models/whisper/ggml-small.en.bin https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.en.bin (466 MB;慢速機器用 ggml-base.en,非英文用多語系 ggml-small)。也可以使用其他轉錄工具:傳入 --words words.json,格式為 [{"w": "word", "s": 0.12, "e": 0.40, "p": 0.9}]。 Claude.ai 沒有 ffmpeg:在那裡,只接受帶時間戳記的轉錄文字,並回傳剪輯清單、重拍表格、章節和 SRT 檔案。清楚地說明沒有任何東西被渲染。

設定(一次性)

將 config.example.json 複製到 ~/longform/config.json,設定 paths.inbox、paths.outbox、paths.whisper_model、transcribe.prompt 和 publish.word_fixes 中的名稱,並可選 publish.cta_line + publish.cta_keywords(草稿會標記沒有中段行動呼籲的影片)。以下所有閾值都位於該檔案中。

執行

S=~/.claude/skills/longform-edit/scripts/longform_edit.py
python3 $S ~/longform/inbox/<slug>/ --config ~/longform/config.json             # 單一影片
python3 $S --config ~/longform/config.json                                      # 所有還沒有 REVIEW.md 的 inbox 資料夾
python3 $S <folder> --plan-only      # 約 1 分鐘內產生剪輯計畫 + REVIEW.md,不渲染
python3 $S <folder> --mic voice.wav  # 獨立麥克風,透過交叉相關同步(開頭拍手有幫助)
python3 $S <folder> --kind camera    #  talking head:每個靜默都視為閒置(自動從動作或檔案名稱偵測)
python3 $S <folder> --burn-captions  # 同時產生 <slug>.captioned.mp4,內嵌 2-5 字字幕
python3 $S <folder> --no-llm         # 啟發式章節標題,不呼叫 claude CLI

Inbox:<inbox>/<slug>/ 包含一個影片(最大的檔案獲勝)、一個可選音訊檔案(用作語音)和一個 config.json(用來覆蓋每個影片的設定)。輸出:<outbox>/<slug>/。一個 15 分鐘的原始影片大約需要 6-12 分鐘;在背景執行並監看 <outbox>/<slug>/run.log。重新執行時會使用快取:只有變更的階段會重做。

它決定的內容(詳細資訊與所有數字在 references/method.md)

  1. 重拍,保留最後一次。 明確的提示,作為獨立短語說出("let me say that again"、"retake"、"scratch that",config 中有 22 個提示)會剪掉放棄的嘗試和提示本身。從頭重新開始的一行(相同的開頭詞,相似度 >= 0.8,時間間隔 45 秒內)會剪掉先前的嘗試。連續重複的片語會刪除第一個副本。以沉默分隔的 um/uh 會被剪掉。任何較弱的情況都會被標記,而非剪掉。
  2. 策略性處理空白片段。 每個 >= 0.7 秒的靜默都會根據畫面進行檢查(8 fps 的幀差異,忽略游標大小的區塊,遮罩網路攝影機泡泡,整體首次到最後的變化能夠捕捉慢速打字)。 靜態螢幕:句子中間收緊至 0.28 秒,句子結尾收緊至 0.40 秒,保留呼吸聲。僅有游標:0.6 秒。 真實螢幕動作:保留,兩側的閒置部分被修剪;如果動作持續 > 4.5 秒,則以 1.5-3 倍速播放,最後 0.9 秒以 1 倍速播放,讓結果平順落地。剪輯只落在測量到的靜默中,絕不在字詞中間。
  3. 人聲壓製,無音樂背景。 HPF 75 Hz、從測量到的噪聲底層進行 FFT 降噪、切除中低頻、增加臨場感、空氣感、去噝聲、2.5:1 壓縮、增益至 -14 LUFS、限制器至 <= -1.5 dBTP、濾波延遲經測量並移除。
  4. 從最終音訊產生字幕。 最終渲染會重新轉錄;SRT 由此構建,絕不來自來源轉錄,並且字幕開始時間會對齊語音起點。每個字詞都被覆蓋(經閘門檢查)。
  5. 發布草稿。 章節(結構性提示,如 "the first"、"next"、長時間停頓、大螢幕變化;>= 3 個,第一個在 0:00,每個 >= 40 秒)、3 個標題選項、描述、置頂評論、標籤和事實查核旗標(透過 claude CLI,如果有;否則使用啟發式)。3 個候選縮圖幀(每三分之一中最銳利、色彩最豐富的)。

閘門(如果任何失敗,exit code 2 並產生 <slug>.FAILED-GATES.mp4)

閘門通過條件
frames每個區塊的 EDL 幀數完全正確;影片和音訊長度差異在 1.5 幀內
words最終重新轉錄還原 >= 93% 的保留來源字詞,無遺失連續 >= 6 個字詞
av_sync10 個探測點:音訊延遲 <= 25 ms 且幀匹配來源影像的誤差小於 +-0.5 秒
captions每章節,字幕開始時間與音訊起點:中位數 <= 0.12 秒,p95 <= 0.25 秒
caption_coverage>= 98% 的最終字詞位於字幕內
loudness-14 +-1 LUFS 整合值,真實峰值 <= -1 dBTP

執行之後(代理的任務,不可跳過)

  1. Exit code。 0 = 所有閘門通過。2 = 絕對不要將檔案視為完成交付;REVIEW.md 會說明哪個閘門失敗及原因。
  2. 查看 contact-sheet.jpg 和 cuts-sheet.jpg(開啟圖片):每個格子都有畫面,沒有黑幀,每個剪輯點的前後看起來像是連續狀態。
  3. 閱讀 REVIEW.md:已剪掉的重拍(前/後文字)、已標記但未剪掉的清單、保留的螢幕動作、音量、每章節的字幕同步、影音探測點、字詞檢查。要更改決策,請撰寫 <outbox>/<slug>/overrides.json 並重新執行相同命令(時間是來源秒數,即 src 欄位):
    {"keep_retakes": ["R03"], "cut_retakes": ["R07"], "keep_ranges": [[312.0, 330.5]],
     "force_cut": [{"s": 100.2, "e": 104.9, "why": "cough"}]}
    
  4. PUBLISH.md 是草稿。 改寫較弱的標題,事實查核每個被標記的數字(測量過、相同來源、相同時間範圍),在 publish.word_fixes 中修正姓名拼寫,然後重新執行,讓 SRT 正確。
  5. 絕對不要上傳或排程。 回傳路徑;由人類發布。

以此格式回報

LONGFORM EDIT: <slug>
Runtime   14:32 -> 11:05 (24% cut): 6 retakes, 11 fillers, 3 speed-ups, 41 pauses tightened
Gates     6/6 PASS (words 97.8%, max A/V lag 4 ms, captions median 0.05 s, -14.0 LUFS / -1.6 dBTP)
Flags     R04 at 03:12 restart? similarity 0.62, kept; "saves 10 hours" at 07:40 needs a source
Files     <outbox>/<slug>/<slug>.mp4, .srt, chapters.txt, PUBLISH.md, REVIEW.md, thumbs/
Looked at contact-sheet.jpg and cuts-sheet.jpg: clean. Nothing uploaded.

當缺少某些東西時

  • 沒有 whisper 模型:停止並印出上述的下載指令;或者接受來自任何其他轉錄工具的 --words。
  • 沒有 opencv:仍然執行,但每個靜默都會被視為閒置(會在 run.log 中說明);為螢幕錄製安裝它。
  • 沒有 claude CLI:使用啟發式章節標題,並在 PUBLISH.md 中標記需要改寫。
  • ffmpeg 沒有 libass:跳過 --burn-captions 並附註說明;SRT 仍然會輸出(上傳為 YouTube CC)。
  • 麥克風同步信心低於 4:停止並要求在開頭拍手或放下麥克風。

讓剪輯效果更好的錄製習慣

在重做一行之前,將 "retake"(或 "let me say that again")作為獨立的句子說出來:這是唯一被信任用來剪掉整個句子的提示。在等待載入時,保持沉默並讓游標靜止(會被剪掉),或直接敘述(會被保留)。在顯示靜態圖表時沉默地注視,會被收緊:展示圖表時說些什麼。每個檔案保持連續拍攝。

可選階段(圖形面板、場景切換、風格設定檔、外部攝影機同步、重拍揭示)在 references/optional-stages.md 中有描述;它們不在這些腳本中。

Individual skills in this repo

This repo contains 11 individual skills — each has its own dedicated page.

jsath/claude-skills

Writes captions for a finished video from its transcript: pulls the line worth repeating, writes first-line options, writes per-platform versions (Instagram, TikTok, YouTube title and description, others on request), keeps the creator's voice using their best past captions, and checks the call to action matches what the video actually says. Use when a creator asks for captions, a caption hook, a YouTube title and description, or a CTA check. Drafts only; never posts or schedules.

jsath/claude-skills

Write CAPTIONS-PLATFORMS.md for one finished short video: a per-platform post caption for Instagram, TikTok, YouTube Shorts (title + description), Facebook, Threads, Bluesky and X, each within that platform's limits, with your comment-keyword CTA on the platforms where it belongs and never on X. Keyword, CTA, platforms, hashtags and limits come from a config file; a checker script fails the file on any miss. Use after an edit is finished, when asked to 'write the captions', 'caption this reel for every platform', or before scheduling.

jsath/claude-skills

Transcribe audio or video on your own machine with Whisper (mlx-whisper, faster-whisper or whisper.cpp) and get word-level timestamps as words.json, a plain .txt and an .srt. No API key, nothing uploaded. This is the transcription step the editing skills (edit-style, longform-edit, reel-captions) depend on. Use when asked to transcribe a take, get word timings, make an SRT, re-transcribe a final render for a caption sync check, or 'run whisper locally'.

jsath/claude-skills

Turns one published long-form video or podcast transcript into up to thirty pieces: 10 clips with new hooks and exact timestamps, 8 X posts, 4 LinkedIn posts, 3 carousels, 2 threads, a newsletter, a community post and a blog post, laid out on a two-week plan, all built only from what was said. In Claude Code it also cuts, reframes and captions the clips with ffmpeg. Use when someone wants to repurpose a long video, find clips, or write social posts from a transcript. Never posts or schedules.

jsath/claude-skills

Turn a raw talking-head take into a dynamically edited 1080x1920 reel: full-face, full-graphic and split layouts that switch every 2 to 5 seconds, real UI and official-logo panels, captions on every word timed by Whisper, voice plus synthesised SFX (no music bed) mastered to -14 LUFS, and hard QA gates (caption sync on the final render, A/V length, loudness, colour, framing, contact sheet, claims). Also covers writing the script so it does not read as AI. Use when asked to 'edit this reel', 'make it look edited', 'add captions / dynamic layout / graphics', or 'write a reel script'.

jsath/claude-skills

Turns one podcast episode transcript into a week of written content: an Episode Prep agent that checks the transcript and speaker names, a Clip Spotter that picks the best short-clip moments with exact timestamps and hooks for an editor to cut, a Show Notes Writer that writes show notes and chapter markers, a Repurpose Writer that turns the big ideas into a newsletter, a LinkedIn post and Instagram captions, and an Episode Planner that spreads it all over the week. Works from a transcript the user supplies or exports from their transcription tool. It does not edit audio or video and does not cut clips. Use when a podcaster asks for show notes, chapters, clip timestamps, or posts from an episode, or says \"repurpose this episode\". Drafts only; never posts.

jsath/claude-skills

Turns one raw talking-head take into a finished 1080x1920 vertical reel in Claude Code with free local tools (ffmpeg, whisper.cpp, headless Playwright): transcribes, keeps the last take of repeated lines, cuts pauses, captions every word, adds real screenshots and official logos, and runs measured QA gates. Use when someone wants a raw phone take edited into a Reel, TikTok or Short, retakes and silences cut, word-by-word captions, or a finished video checked. In Claude.ai it only produces a cut list, shot plan and .srt from a pasted transcript.

jsath/claude-skills

Turns notes, voice-note transcripts and half ideas into Reel, TikTok and YouTube scripts in the creator's own voice: ranks an idea bank, writes ten hooks per idea, writes the script at the right length, rewrites anything that sounds like AI using transcripts of the creator's past videos, and fact-checks every claim with a source and date. Use when someone wants a video script, hooks, a ranked list of what to film, a voice pass, a claims check, or a record sheet to read from while filming.

jsath/claude-skills

Reviews and rewrites a video script (YouTube long-form, a short, or a talking-head reel) so it sounds like one person talking to one friend and holds attention: kills forced analogies and presenter phrases, fixes framing, checks hooks, open loops and re-engagement beats, and suggests titles. Use when someone says fix this script, polish my script, make it sound like me, tighten this before I film, or asks for a hook or title for a video. Returns the rewritten script plus a short change log.

jsath/claude-skills

Make a 1280x720 YouTube thumbnail (or a banner/cover) that reads at phone size: a text-free background plate (generated or from a real frame), a real cutout of the person, 1 to 3 words in tight colour blocks, an official logo, composed by a script that checks overlaps and frame edges and renders the 320px and 168px views you must look at. Use when asked for a thumbnail, cover, banner, 'make this clickable', or to fix a thumbnail that looks cluttered or small.

jsath/claude-skills

Runs five agents that keep a YouTube channel's titles and descriptions matched to what people search for now: a Channel Reader that pulls the user's own video list and stats with their YouTube Data API key, YouTube Analytics OAuth or a pasted YouTube Studio export, a Niche Watcher that finds what is working right now for similar-size channels from public search results the API returns or the user provides, a Title Writer that drafts titles, descriptions and chapters for new videos, a Back Catalogue agent that picks old videos worth a refresh and drafts new versions, and a Change Tracker that records every change the user makes and compares before and after on matched windows. Use when a creator asks for YouTube SEO, better titles or descriptions, what is working in their niche, a back catalogue refresh, or says \"seo run\". Never invents search volumes or stats and never changes a video; drafts only.

相關技能