Youtube Content

作者 nousresearch25a71a744cb9MIT252K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫今天更新

YouTube transcripts to summaries, threads, blogs.

包含腳本Writing & Content
AI 產生的概覽

擷取 YouTube 字幕並重新格式化為摘要、章節、推文串或部落格文章。

功能
此技能使用隨附的 Python 輔助指令碼從 YouTube 影片擷取字幕,支援標準網址、短連結、Shorts、嵌入、直播連結或原始影片 ID。它可以輸出帶中繼資料的 JSON、純文字或帶時間戳記的文字,並支援語言回退鏈。接著將字幕轉換為所需格式,例如章節、摘要、分章摘要、Twitter/X 推文串、部落格文章或重要引述。它也能透過分塊與合併摘要來處理長字幕。
適用情境
當使用者分享 YouTube 網址或影片連結並要求摘要、字幕或重新格式化的內容時使用此技能。它也適用於使用者希望從任何 YouTube 影片擷取內容並重新組織為章節、推文串、部落格文章或引述的情境。
執行需求
需要一個透過 Hermes 套件管理工作流程準備的 Python 環境,並安裝 youtube 額外相依項目,包括 youtube_transcript_api 套件。此技能隨附可執行輔助指令碼 scripts/fetch_transcript.py 和參考檔案 references/output-formats.md。從 YouTube 擷取字幕需要網路存取。

YouTube Content Tool

When to use

Use when the user shares a YouTube URL or video link, asks to summarize a video, requests a transcript, or wants to extract and reformat content from any YouTube video. Transforms transcripts into structured content (chapters, summaries, threads, blog posts).

Extract transcripts from YouTube videos and convert them into useful formats.

Setup

Use terminal with the Python from a PM-prepared Hermes source checkout. The youtube extra declares the helper's dependency; do not install packages into Hermes with raw pip or project-discovering uv run.

From that checkout, first follow the isolated development-home setup in Package Management, then prepare the extra and reactivate before running the helper:

bash
source ./activatepython -c "import pm; pm.sync_venv(['youtube'], explicit=True)"source ./activatepython -c "import youtube_transcript_api; print(youtube_transcript_api.__file__)"

On Windows, use . .\activate.ps1 instead of source ./activate. If the terminal runs on a different host or in a sandbox, use an explicitly isolated helper environment there, not the agent's production environment. Run every command below with the interpreter whose import check succeeded.

Helper Script

SKILL_DIR is the directory containing this SKILL.md file. The script accepts any standard YouTube URL format, short links (youtu.be), shorts, embeds, live links, or a raw 11-character video ID.

bash
# JSON output with metadatapython SKILL_DIR/scripts/fetch_transcript.py "https://youtube.com/watch?v=VIDEO_ID"
# Plain text (good for piping into further processing)python SKILL_DIR/scripts/fetch_transcript.py "URL" --text-only
# With timestampspython SKILL_DIR/scripts/fetch_transcript.py "URL" --timestamps
# Specific language with fallback chainpython SKILL_DIR/scripts/fetch_transcript.py "URL" --language tr,en

Output Formats

After fetching the transcript, format it based on what the user asks for:

  • Chapters: Group by topic shifts, output timestamped chapter list
  • Summary: Concise 5-10 sentence overview of the entire video
  • Chapter summaries: Chapters with a short paragraph summary for each
  • Thread: Twitter/X thread format — numbered posts, each under 280 chars
  • Blog post: Full article with title, sections, and key takeaways
  • Quotes: Notable quotes with timestamps

Example — Chapters Output

00:00 Introduction — host opens with the problem statement03:45 Background — prior work and why existing solutions fall short12:20 Core method — walkthrough of the proposed approach24:10 Results — benchmark comparisons and key takeaways31:55 Q&A — audience questions on scalability and next steps

Workflow

  1. Fetch the transcript using terminal and the prepared Python with --text-only --timestamps.
  2. Validate: confirm the output is non-empty and in the expected language. If empty, retry without --language to get any available transcript. If still empty, tell the user the video likely has transcripts disabled.
  3. Chunk if needed: if the transcript exceeds ~50K characters, split into overlapping chunks (~40K with 2K overlap) and summarize each chunk before merging.
  4. Transform into the requested output format. If the user did not specify a format, default to a summary.
  5. Verify: re-read the transformed output to check for coherence, correct timestamps, and completeness before presenting.

Error Handling

  • Transcript disabled: tell the user; suggest they check if subtitles are available on the video page.
  • Private/unavailable video: relay the error and ask the user to verify the URL.
  • No matching language: retry without --language to fetch any available transcript, then note the actual language to the user.
  • Dependency missing: repeat PM preparation and reactivation above, then verify the helper uses that Python. Do not repair the selected generation with pip.

來源與署名

來源:nousresearch/hermes-agent位於skills/media/youtube-content提交25a71a7

授權條款: MIT

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架