/claw-skills:youtube-summarizerfrom claw-skills
下载 YouTube 视频字幕并生成结构化总结。当用户分享 YouTube 链接并要求总结视频、提取字幕或获取内容洞察时使用。支持所有 YouTube URL 格式(watch、youtu.be、shorts、embed、live)。
Ships in claw-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
下载 YouTube 视频字幕,生成包含核心观点、金句摘录和亮点分析的结构化总结。
安装依赖(已安装可跳过):
pip3 install youtube-transcript-api -q
# yt-dlp 用于获取视频元数据(标题、频道、时长)
# 未安装可执行: brew install yt-dlp 或 pip3 install yt-dlp
SKILL_DIR 为本 SKILL.md 所在目录。
# JSON 格式输出(含元数据)
python3 SKILL_DIR/scripts/fetch_transcript.py "https://youtube.com/watch?v=VIDEO_ID"
# 纯文本 + 时间戳(推荐用于总结)
python3 SKILL_DIR/scripts/fetch_transcript.py "URL" --text-only --timestamps
# 指定语言(含回退链)
python3 SKILL_DIR/scripts/fetch_transcript.py "URL" --language en,zh --text-only --timestamps
脚本支持所有标准 YouTube URL 格式:watch?v=、youtu.be/、shorts/、embed/、live/,或直接传入 11 位视频 ID。
获取标题、频道、时长和发布日期:
yt-dlp --skip-download --print "%(title)s|%(channel)s|%(duration_string)s|%(upload_date)s" "URL"
长视频(>30 分钟)的字幕输出可能较大,建议分段读取:
# 前半部分
python3 SKILL_DIR/scripts/fetch_transcript.py "URL" --text-only --timestamps | head -500
# 后半部分
python3 SKILL_DIR/scripts/fetch_transcript.py "URL" --text-only --timestamps | tail -400
分析字幕内容,生成结构化总结。所有内容(包括章节标题、表头、元数据字段)都必须使用指定语言。 只有模板结构(表格、引用块、加粗)保持固定。
模板结构(将每个标签翻译为输出语言):
## [本地化: "视频总结" / "Video Summary"]
**[本地化标签]:** (标题)
**[本地化标签]:** (频道)
**[本地化标签]:** (嘉宾,如可识别)
**[本地化标签]:** (时长) | **[本地化标签]:** (日期)
---
### [本地化: 一句话概括]
(1-2 句概述)
---
### [本地化: "核心观点" / "Key Viewpoints"]
| [本地化: 话题] | [本地化: 观点] |
|-------|-----------|
| ... | ... |
---
### [本地化: "金句" / "Notable Quotes"]
> "原文引用" — 发言者
---
### [本地化: "其他亮点" / "Other Highlights"]
- ...
---
### [本地化: "注意/偏见" / "Notes / Bias"]
- ...
输出语言按以下优先级确定:
| 错误 | 解决方案 |
|---|---|
youtube-transcript-api not installed | 执行 pip3 install youtube-transcript-api |
Transcripts are disabled | 告知用户该视频已禁用字幕 |
No transcript found | 去掉 --language 参数重试,并告知实际语言 |
| 输出为空 | 视频可能没有自动生成的字幕,告知用户 |
yt-dlp: command not found | 执行 pip3 install yt-dlp 或 brew install yt-dlp |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub terryso/claw-skills --plugin claw-skills7 skills in this plugin
/akshare-stockA股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。提供可执行 CLI 脚本,内置重试机制和错误处理。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。/explainer-videoTurn an article or post into a 60-second code-rendered explainer video: a single self-contained HTML timeline rendered frame-by-frame with headless Chromium and assembled with ffmpeg. Use when the user wants a blog post, HN story, or any article distilled into a motion-graphics video with narration, beat-synced motion, and broadcast-loudness audio. Covers 16:9 and 9:16. Not for AI-diffusion video generation or photorealistic footage./peekaboo-climacOS UI automation CLI tool for screen capture, window control, element clicking, text input, and more. Use when users need macOS desktop automation, UI testing, screen capture, window management, or app control./polyv-live-cli管理保利威直播服务,包括频道管理、推流操作、商品管理、优惠券、回放、文档和统计数据。当用户需要管理直播频道、配置推流设置、管理商品、处理优惠券、查看直播数据或管理回放录像时使用。/wechat-channels-video用 ego-browser 在 channels.weixin.qq.com 视频号助手发布任意视频:上传视频、填描述/短标题/话题/位置/封面(waitForFileChooser),可选声明原创与关联活动,保存为草稿。默认终点是「保存草稿」——发表需扫码,留给人完成。调用方自行提供视频路径与文案;内置实战避坑清单。/youtube-subtitle-burner下载 YouTube 视频到本地,提取 word-level 时间轴,翻译为中文,用 PIL 逐帧烧录字幕到视频画面。支持 2x 超采样抗锯齿消除文字锯齿。适用于横屏和竖屏视频。最终输出带中文字幕的 H.264 MP4 文件,可直接上传到国内平台。