简介
YouTube 视频智能摘要,支持自定义聚焦指令,自动提取字幕生成结构化总结
原始描述
Summarize any YouTube video by dropping the link in chat. Supports custom prompts — paste the URL followed by your instructions (e.g. 'focus on the technical...
安装
下载 zip 解压后,把里面的文件放进你的 Agent 的 skills 目录即可使用。
给 Agent 的直链(让它自己下载安装):
https://v110.com/skill/youtube-summary.zip
Claude Code 放 ~/.claude/skills/;Codex、TypingMind 等按各自文档的 skills 目录放置。技能申请什么权限由作者决定,装前请确认。
中文使用说明 来自收录源
核心用法
YouTube Summary 是一款基于 API 的视频内容提取与摘要工具。用户只需粘贴 YouTube 链接(支持标准视频、Shorts、直播回放等多种格式),系统即自动调用 TranscriptAPI.com 服务获取视频字幕,并生成包含 TL;DR、关键要点、引用摘录的结构化摘要。支持自定义提示词追加(如"聚焦技术细节"),实现定向内容提取。
显著优点
- 绕过地域封锁:通过 TranscriptAPI 的住宅 IP 代理解决 YouTube 对云服务器 IP 的屏蔽问题,提取成功率显著高于直接抓取
- 多格式兼容:完整支持 youtube.com/watch、youtu.be、Shorts、移动端 URL、直播回放等变体
- 安全密钥管理:提供
pass密码管理器集成方案,避免 API Key 暴露在进程环境与 shell 历史中 - 智能分块处理:对超长视频(≥50K tokens)自动截断并提示用户,兼顾完整性与模型处理能力
- 结构化输出:固定格式包含元信息头、TL;DR、要点列表、可选引用,便于快速浏览与信息检索
潜在缺点与局限性
- 付费依赖:TranscriptAPI 服务需订阅($5/月,1000 次提取),免费额度未提及
- 字幕可用性约束:无字幕/自动生成字幕关闭的视频无法处理,不支持音频直转录
- 单语言限制:摘要语言强制匹配字幕语言,无自动翻译能力
- 长度硬限制:Telegram 输出截断在 4000 字符,超长内容需分条发送
- 无回退机制:明确禁止 web_search 作为备选,API 失败时直接终止,体验可能生硬
适合人群
- 需要快速消化大量 YouTube 内容的研究者、学生、内容创作者
- 在受限网络环境(云服务器)下仍需稳定提取字幕的技术用户
- 注重 API 密钥安全管理的隐私敏感型用户
常规风险
- API 密钥泄露风险:虽提供
pass方案,但环境变量方式仍暴露于进程空间 - 第三方服务依赖:TranscriptAPI 的可用性与定价策略直接影响技能功能
- 内容准确性:完全依赖 YouTube 原生字幕质量,无事实核查机制
- 速率与配额:高频使用者需关注 1000 次/月的配额消耗
技能正文
name: youtube-summary version: "1.3.2" author: giskard description: "Summarize any YouTube video by dropping the link in chat. Supports custom prompts — paste the URL followed by your instructions (e.g. 'focus on the technical details'). Triggers on YouTube URLs." tags: [youtube, video, summary, transcript] license: MIT homepage: https://github.com/chapati23 metadata: openclaw: emoji: "📺" requires: bins: [python3] env: [TRANSCRIPT_API_KEY] primaryEnv: TRANSCRIPT_API_KEY
YouTube Summary Skill
Summarize YouTube videos by extracting transcripts via TranscriptAPI.com and generating structured summaries.
Setup
Prerequisites
- Python 3.10+
- A TranscriptAPI.com account ($5/mo for 1,000 transcripts)
- Optional:
pass(Unix password manager) for secure key storage
Installation
- Sign up at transcriptapi.com and get your API key
- Provide the API key via one of these methods:
- Environment variable (simplest):
export TRANSCRIPT_API_KEY="your-key-here" passpassword store (most secure):pass insert transcriptapi/api-key
- Environment variable (simplest):
- Install Python dependencies:
pip install -r skills/youtube-summary/requirements.txt
Detection
Trigger on messages containing YouTube URLs matching any of:
youtube.com/watch?v=IDyoutu.be/IDyoutube.com/shorts/IDm.youtube.com/watch?v=IDyoutube.com/live/ID
⚠️ Critical Rules
- NEVER use web_search as a fallback. If transcript extraction fails, report the error and stop.
- NEVER fabricate transcript content. Only summarize what the extraction script returns.
- Always run the extraction script. Do not skip it, even for well-known videos.
Workflow
Step 1: Extract transcript
If using pass:
_yt_key_file=$(mktemp) && pass transcriptapi/api-key > "$_yt_key_file" && python3 skills/youtube-summary/scripts/extract.py "YOUTUBE_URL_OR_ID" --api-key-file "$_yt_key_file"; rm -f "$_yt_key_file"
If using env var:
python3 skills/youtube-summary/scripts/extract.py "YOUTUBE_URL_OR_ID"
(Reads TRANSCRIPT_API_KEY from the environment automatically.)
Security note: The pass + temp file approach avoids exposing the key in ps output or shell history. The env var approach is simpler but the key is visible in the process environment.
Parse stdout:
PROGRESS:lines → relay to user as status updates (optional)ERROR:lines → relay error to user, stopRESULT:line → parse the JSON afterRESULT:— contains:header,transcript,language,tokens,title,channel,duration_str
Step 2: Summarize the transcript
Use the extracted transcript to generate a summary. The summary language must match the transcript language (from the language field).
If tokens < 50000 — single-pass: summarize the full transcript in one request.
If tokens ≥ 50000 — tell the user it's a long video and summarize the first ~40K tokens with a note that it was truncated.
Default summary format (use when no custom prompt given):
{header}
**TL;DR:** 2-3 sentence summary.
**Key Points:**
• Point one
• Point two
• (3-7 total)
**Notable Quotes:** (only if genuinely quotable lines exist)
> "Quote here"
Custom prompt — if the user included text alongside the URL, append it as additional instructions for the summary.
Step 3: Reply
- Keep output under 4000 characters for Telegram
- If the summary would exceed 4000 chars, send the TL;DR first, then the rest as a follow-up
- Always include the header line from the extraction result
Error Handling
ERROR: API_ERROR: Invalid API key→ "TranscriptAPI key is invalid. Checkpass transcriptapi/api-key."ERROR: No transcript available→ "This video doesn't have captions available."ERROR: Video not found→ "Couldn't find that video — double-check the URL."- Any other
ERROR:→ relay the message as-is. Do NOT fall back to web_search.
Why TranscriptAPI?
YouTube aggressively blocks datacenter/IPv6 ranges from accessing transcripts. Most cloud VPS (Hetzner, DigitalOcean, AWS, etc.) are blocked — direct transcript fetching fails for most videos when running from a server.
TranscriptAPI.com proxies requests through residential IPs, bypassing these blocks reliably. The $5/mo plan covers 1,000 transcript fetches.
💡 Tip: Add instructions after the URL to customize the summary (e.g. "focus on the technical details").
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。
其他来源收录
同一技能在不同目录的原始页面: