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 从公开仓库中收录这些内容。

举报或申请下架