Communitygithub.com

ロングフォーム編集

生の長時間YouTube録画(画面収録、カメラ動画、または別マイク音声)を、自動で公開可能な動画に編集します。トランスクライブ、リテイク削除、無音圧縮、音声マスタリング、キャプション生成、公開用下書き作成を一貫して行います。

ロングフォーム編集 とは?

このスキルは、Claude Codeを使用して長時間の録画(画面収録、カメラ映像、または別マイク音声)を自動編集します。Deskriptのような自動パイプラインを提供し、トランスクライブ(単語タイムスタンプ付き)、リテイクの削除(最後のテイクを保持)、無音部分の戦略的圧縮(画面上のアクションは維持、待機時間は高速化)、音声のマスタリング(-14 LUFS / -1.5 dBTP)、最終レンダリングからの再トランスクライブによるSRT生成(オプションで字幕焼き込み)、チャプター・タイトル・説明文の下書き作成、および品質ゲート(単語精度、音声/映像同期、キャプション同期、ラウドネス)チェックとコンタクトシート出力を行います。ffmpeg、whisper.cpp、Python 3が必要です。

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

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

longform-edit

生の動画ファイルをフォルダに入れ、1つのコマンドを実行するだけで、カット・マスタリング・字幕付きの動画と、すべてのカットを説明するREVIEW.mdが生成されます。 ショートフォーム版: edit-style(リール向け)。 トランスクライブ設定: 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             # 1本の動画
python3 $S --config ~/longform/config.json                                      # REVIEW.mdがまだないすべての受信フォルダを処理
python3 $S <folder> --plan-only      # 約1分でカット計画 + REVIEW.md、レンダリングなし
python3 $S <folder> --mic voice.wav  # 別マイクを使用、相互相関で同期(最初の拍手が効果的)
python3 $S <folder> --kind camera    # 話している人物のみ: すべての無音はアイドル状態(モーションまたはファイル名から自動検出)
python3 $S <folder> --burn-captions  # さらに <slug>.captioned.mp4(2~5単語の字幕を焼き込み)
python3 $S <folder> --no-llm         # ヒューリスティックなチャプタータイトル、claude CLI呼び出しなし

受信: <inbox>/<slug>/ に1つの動画(最大ファイルが優先)と、オプションで1つの音声ファイル(音声として使用)および、動画ごとの上書き設定を持つ config.json を配置します。出力: <outbox>/<slug>/。15分の生データで約6~12分かかります。バックグラウンドで実行し、<outbox>/<slug>/run.log を確認してください。再実行はキャッシュされます: 変更されたステージのみがやり直されます。

決定内容(詳細とすべての数値は references/method.md にあります)

  1. リテイク、最後のテイクを保持。 明示的な合図(「もう一度言います」、「リテイク」、「なかったことに」、設定で22の合図)が独立したフレーズとして発話された場合、放棄された試行と合図をカットします。冒頭から再開された行(同じ冒頭の単語、類似度0.8以上、45秒以内)は、以前の試行をカットします。連続して繰り返されたフレーズは最初のコピーを削除します。um/uhが無音で区切られている場合はカットされます。それより弱いものはフラグが立てられ、カットされません。
  2. 無駄な時間、戦略的に。 0.7秒以上のすべての無音を画像と照合します(8fpsでのフレーム差分、カーソルサイズのブロブは無視、ウェブカムバブルはマスク、正味の最初から最後までの変化でゆっくりしたタイピングを検出)。静的画面: 文中では0.28秒、文末では0.40秒に短縮、呼吸は維持。カーソルのみ: 0.6秒。実際の画面上のアクション: 維持、アイドル部分は両側をトリミング。4.5秒以上続く場合は、最後の0.9秒を1倍速にして1.5~3倍速で再生し、結果が自然に着地するようにします。カットは測定された無音の間でのみ行われ、単語の途中では決して行われません。
  3. 音声マスタリング、音楽なし。 HPF 75 Hz、測定されたノイズフロアからのFFTノイズ除去、マッドカット、プレゼンス、エアー、デエッサー、2.5:1圧縮、-14 LUFSへのゲイン調整、リミッター<= -1.5 dBTP、フィルター遅延を測定して除去。
  4. 最終音声からのキャプション。 最終レンダリングを再トランスクライブします。SRTはソーストランスクリプトからではなく、そこから構築され、キューの開始は音声の開始時点にスナップされます。すべての単語がカバーされます(ゲートチェックあり)。
  5. 公開用下書き。 チャプター(「最初に」、「次に」などの構造的な合図、長いポーズ、大きな画面の変化。3つ以上、最初は0:00、それぞれ40秒以上)、3つのタイトル候補、説明文、ピン留めコメント、タグ、ファクトチェックフラグを、claude CLIが利用可能な場合はそれを使用、それ以外はヒューリスティックで生成。3つのサムネイル候補フレーム(3分の1ごとに最もシャープで最も色鮮やかなもの)。

ゲート(いずれかが失敗した場合、exit code 2 かつ <slug>.FAILED-GATES.mp4 が生成される)

ゲート合格条件
framesすべてのチャンクがEDLフレーム数と正確に一致し、動画と音声の長さが1.5フレーム以内
words最終再トランスクライブが保持されたソース単語の93%以上を再現し、6単語以上の連続消失がない
av_sync10回のプローブ: 音声遅延が25ミリ秒以内で、フレームがソースと±0.5秒以内で一致
captionsチャプターごとに、キューの開始と音声の開始の中央値が0.12秒以内、p95が0.25秒以内
caption_coverage最終的な単語の98%以上がキャプション内にある
loudness統合ラウドネス -14 ±1 LUFS、トゥルーピーク -1 dBTP以下

実行後(エージェントの仕事、スキップしないこと)

  1. 終了コード。 0 = すべてのゲートに合格。2 = ファイルを完了として渡さないでください。REVIEW.mdにどのゲートとその理由が記載されています。
  2. contact-sheet.jpg と cuts-sheet.jpg を確認する(画像を開く): すべてのタイルに画像が存在し、黒フレームがなく、各編集ポイントのビフォー/アフターが連続した状態に見えること。
  3. REVIEW.md を読む: カットされたリテイク(ビフォー/アフターのテキスト)、フラグはあるがカットされていないリスト、保持された画面上のアクション、ラウドネス、チャプターごとのキャプション同期、A/Vプローブ、単語チェック。決定を変更するには <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/
Looking at contact-sheet.jpg and cuts-sheet.jpg: clean. Nothing uploaded.

何かが不足している場合

  • whisperモデルがない場合: 停止し、上記のダウンロード行を表示するか、他のトランスクライバーからの --words を受け付けます。
  • opencvがない場合: とにかく実行されますが、すべての無音がアイドルとして扱われます(run.logにその旨が表示されます); 画面収録の場合はインストールしてください。
  • claude CLIがない場合: ヒューリスティックなチャプタータイトルを使用し、PUBLISH.mdで書き換えが必要であることがフラグされます。
  • libassがないffmpeg: --burn-captions はスキップされ、その旨が通知されます; SRTは引き続き生成されます(YouTube CCとしてアップロードしてください)。
  • マイク同期の信頼度が4未満: 停止し、最初に拍手をするか、マイクを落とすように要求します。

編集をより良くするための録音習慣

行をやり直す前に、「リテイク」(または「もう一度言います」)を独立した文として言ってください。これが文全体をカットする唯一の信頼できる合図です。読み込み待ちの間は、カーソルを動かさずに黙っているか(カット)、ナレーションを入れてください(保持)。静かなチャートを見つめて黙っているのは短縮されます: 表示中に何か言ってください。ファイルは1テイクで連続して撮影してください。

オプションのステージ(グラフィックパネル、シーン切り替え、スタイルプロファイル、外部カメラ同期、リテイクの表示)は 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.

関連スキル