文字起こしから YouTube チャプターを作成・検証

YouTube chapters from a transcript

タイムスタンプ付きの文字起こしを読みやすくまとめ、エージェントが提案したチャプターを YouTube の条件(0:00 開始・3つ以上・各10秒以上)で検証して、概要欄に貼れる形に整えます。

ClaudeHermes AgentCodexCursorMIT(改変・再配布・商用利用可)Python

できること

動画の文字起こしから、YouTube の概要欄に貼るチャプター(目次)を作ります。話題の切れ目とタイトルはエージェントが考え、付属スクリプトが形式面を確認します。

  • SRT・VTT 字幕、音声認識の JSON(start/end/text)、0:00 テキスト 形式や YouTube の文字起こしをコピーしたテキストを読み込み
  • 長い文字起こしを30秒ごとなどにまとめ、エージェントが動画全体を読めるようにする
  • 提案されたチャプターを YouTube の条件で検証:最初が 0:00、3つ以上、各チャプター10秒以上、動画の長さを超えない
  • 各チャプターの開始を近くの発話の区切りに合わせる(スナップ)
  • 重複タイトル・長すぎるタイトルなどを参考情報として表示
  • 1時間未満は 00:00、1時間以上は 0:00:00 形式にそろえて出力

使い方

python scripts/chapters.py parse transcript.srt --window 30 --out condensed.txt
python scripts/chapters.py validate chapters.txt --transcript transcript.srt --snap 5

エージェントに「この文字起こしからチャプターを作って」と頼むと、まとめた文字起こしを読んでチャプター案を作り、検証で OK になるまで直してから、貼り付け用の一覧を返します。

必要な環境

  • Python 3(標準ライブラリのみ)

注意点

  • YouTube や動画ファイルには接続しません。概要欄への貼り付けはご自身で行ってください。
  • テキスト形式の文字起こしには動画の長さが含まれないため、--duration で長さを指定すると最後のチャプターも確認できます。
  • 自動生成の文字起こしが不正確な場合、タイトルの質もそれに左右されます。
English description

Condense a timestamped transcript, then validate the chapters your agent proposes against YouTube's rules (start at 0:00, 3 or more, 10 s minimum) and format them for the description.

What it does

Builds the chapter list (table of contents) for a YouTube description from the video's transcript. Your agent finds topic changes and writes titles; the bundled script handles the format checks.

  • Reads SRT/VTT captions, speech-to-text JSON (start/end/text), 0:00 text lines and transcripts copied from YouTube
  • Condenses long transcripts into windows (for example 30 s) so the agent can read the whole video
  • Validates the proposed chapters against YouTube's rules: first at 0:00, at least 3, each at least 10 seconds, none after the end
  • Snaps each chapter start to the nearest sentence start in the transcript
  • Shows style hints such as duplicate or very long titles
  • Prints 00:00 style under one hour and 0:00:00 for longer videos, consistently

How to use

python scripts/chapters.py parse transcript.srt --window 30 --out condensed.txt
python scripts/chapters.py validate chapters.txt --transcript transcript.srt --snap 5

Ask your agent to make chapters from a transcript. It reads the condensed transcript, proposes chapters, fixes them until validation passes and returns a paste-ready list.

Requirements

  • Python 3 (standard library only)

Caveats

  • It does not connect to YouTube or read video files; you paste the result into the description yourself.
  • Plain text transcripts have no video length; pass --duration so the last chapter can be checked too.
  • If an automatic transcript is inaccurate, the titles can only be as good as the transcript.

インストール方法

  1. ダウンロードしたZIPを展開します(中に video-chapters-from-transcript/ フォルダと SKILL.md があります)。
  2. フォルダごと、使うエージェントのスキル置き場にコピーします。
    • Claude:~/.claude/skills/(プロジェクト単位なら .claude/skills/)
    • Hermes Agent:~/.hermes/skills/
    • Codex:~/.agents/skills//Cursor:~/.cursor/skills/
    • Claude アプリ(claude.ai):「カスタマイズ → スキル」からZIPをアップロード
  3. エージェントを再起動し、スキル一覧に表示されることを確認します。

Windows・Mac 別、エージェント別のインストール手順

出品者

AI Skill Market 公式

出品スキル 44 件

出品者のプロフィールとスキル一覧