skills/youtube-master/SKILL.md
YouTube video transcript fetcher + summary/analyzer. ⚠️ MUST use when: (1) User provides YouTube URL + "总结/分析/提取", (2) "总结这个视频"、"视频内容分析"、"这个视频讲了什么", (3) "youtube summary"、"summarize this video"、"video analysis", (4) "YouTube 字幕"、"get transcript", (5) User only provides YouTube URL and context implies processing needed ("看看这个"、"帮我分析"). 🔴 Trigger on ANY YouTube URL when user wants to understand video content.
npx skillsauth add sampx/agent-tools youtube-masterInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
一键获取 YouTube 视频字幕并按意图总结。字幕通过 InnerTube API 直接获取,无 API key,自动处理反爬和缓存。
{baseDir} = SKILL.md 所在目录路径。${BUN_X} 运行时检测:已安装 bun → bun;否则提示安装。
脚本位于 {baseDir}/scripts/:
main.ts — 字幕获取 CLI(主入口)支持多种格式,正则或肉眼识别均可:
https://www.youtube.com/watch?v=VIDEO_IDhttps://youtu.be/VIDEO_IDhttps://www.youtube.com/shorts/VIDEO_IDhttps://www.youtube.com/embed/VIDEO_IDVIDEO_ID(11 字符,字母数字混合)固定输出到 .wopal-space/.tmp/,避免污染工作空间:
${BUN_X} {baseDir}/scripts/main.ts '<youtube-url>' \
--languages zh,en \
--chapters \
--output-dir .wopal-space/.tmp/youtube-transcript
关键点:
? 会触发匹配失败)--languages zh,en --chapters(中文优先、按章节分段).wopal-space/.tmp/youtube-transcript脚本完成后读取:
meta.json — 视频元数据(标题、频道、时长、章节、封面路径)transcript.md — 格式化字幕(按章节分段、带时间戳)路径格式:.wopal-space/.tmp/youtube-transcript/{channel-slug}/{title-slug}/
根据用户请求选择总结模式:
读取 references/summary-templates.md,选择对应模板:
| 模式 | 适用场景 | 输出结构 | |------|----------|----------| | 速览(默认) | 快速了解视频核心观点 | 标题 + 3-5 要点 + 推荐指数 | | 详细 | 深入理解完整内容 | 章节总结 + 要点列表 + 术语解释 | | 分析 | 教程/讲座/技术视频 | 知识点表格 + 实操步骤 + 延伸资源 | | 信息提取 | 回答具体问题 | 直接回答,引用时间戳原文 |
长视频(字幕超 5000 字)优先用速览模式;如需详细分析可分章节处理。
| 选项 | 说明 | 默认 |
|------|------|------|
| --languages <codes> | 语言优先级,逗号分隔 | en |
| --chapters | 按视频描述中的章节分段 | off |
| --no-timestamps | 移除时间戳标记 | off |
| --translate <code> | 翻译字幕(如 zh-Hans) | |
| --list | 列出可用字幕语言(不下载) | |
| --speakers | 输出 speaker-identification 格式 | off |
| --refresh | 强制刷新缓存 | |
| --output-dir <dir> | 输出目录 | youtube-transcript |
常用组合:
# 列出可用字幕
${BUN_X} {baseDir}/scripts/main.ts '<url>' --list
# 英文字幕 + 章节 + 无时间戳
${BUN_X} {baseDir}/scripts/main.ts '<url>' --languages en --chapters --no-timestamps
# 中文翻译
${BUN_X} {baseDir}/scripts/main.ts '<url>' --translate zh-Hans
.wopal-space/.tmp/youtube-transcript/
├── .index.json # 视频ID → 目录映射(缓存查找)
└── {channel-slug}/{title-slug}/
├── meta.json # 元数据(title, channel, duration, chapters)
├── transcript-raw.json # 原始字幕片段(缓存)
├── transcript-sentences.json # 按句子分割的字幕
├── transcript.md # Markdown 字幕(章节分段)
└── imgs/cover.jpg # 视频封面(可选)
缓存机制:首次获取后保存 raw 数据,后续请求直接读取缓存(无需网络请求)。--refresh 强制刷新。
| 场景 | 处理方式 |
|------|----------|
| 无字幕 | 告知用户视频无字幕,建议 --list 查看可用语言 |
| 语言不存在 | 建议先用 --list 查看可用字幕,然后选择正确语言代码 |
| 视频不可用 | 明确报错:已删除/私有/地区限制 |
| 反爬/Blocked | 脚本自动重试 alternate clients + yt-dlp 兜底;如仍失败提示设置 YOUTUBE_TRANSCRIPT_COOKIES_FROM_BROWSER |
| 年龄限制 | 需要登录验证,提示设置浏览器 cookies |
反爬失败时的解决方案:
# 使用浏览器 cookies
YOUTUBE_TRANSCRIPT_COOKIES_FROM_BROWSER=safari \
${BUN_X} {baseDir}/scripts/main.ts '<url>' --languages zh,en
--speakers 模式需要 AI 后处理:
运行脚本获取 raw transcript:
${BUN_X} {baseDir}/scripts/main.ts '<url>' --speakers --output-dir .wopal-space/.tmp/youtube-transcript
读取 {baseDir}/prompts/speaker-transcript.md
处理 raw transcript:识别对话者(从标题/频道/描述提取姓名)、标注对话轮次、按章节分段
输出带 speaker label 的格式化字幕
此模式适用于访谈/对话类视频。
references/summary-templates.md(选择总结模式时读取)prompts/speaker-transcript.md(仅 --speakers 模式读取)tools
Configure ellamaka, a fork of OpenCode with wopal-space mode. MUST use for any task about ellamaka config, agent frontmatter, permission rules, model/provider selection, formatter settings, config loading order, or why config changes are ignored. Trigger on requests about ellamaka or opencode config files, agent permission overrides, restricting subagents, custom/plugin tool permissions (e.g. wopal_task_*), disabling tools, configuring providers or models, formatter setup, config precedence or layering, or debugging settings that do not take effect. Use this skill even when the user says "opencode" if the actual runtime, config path, or behavior is ellamaka. Prefer this skill whenever the answer depends on the difference between ellamaka and upstream opencode, including wopal-space config loading, plugin tool permissions, or agent frontmatter precedence.
development
Plan quality verification for dev-flow. Goal-backward analysis ensures plans WILL achieve their stated goal before execution burns context. ⚠️ MUST use when: (1) Reviewing Plan quality before approve (2) Wopal completes Plan writing and needs quality gate (3) User asks to "check plan", "verify plan", "review plan" (4) Plan enters planning status and needs pre-execution validation 🔴 Trigger automatically when Plan is ready for review, even if user doesn't explicitly say "review". Agent: rook (read-only verification subagent) Mode: verification, not execution
development
Review implementation results for goal achievement and code quality. Supports both Plan-backed review and planless diff review. ⚠️ MUST use when: (1) Wopal delegates rook to review fae implementation output, (2) Prompt contains "review_type: implementation", (3) Prompt contains changed code file list or Plan path + implementation scope, (4) Any code review request from Wopal. 🔴 Trigger even when user does not explicitly mention "review" if the task involves verifying implementation results. This skill is rook-exclusive (only rook agent can load it).
tools
Foundation rules for how Wopal collaborates with sub-agents such as fae and rook. ⚠️ MUST load before ANY delegation — covers delegation tool APIs, task lifecycle, notifications, status handling, and recovery. 🔴 Trigger: "delegate", "let fae implement", "fae task", "rook review", "check task status", "cancel task", "abort task", "agent collaboration", "委派", "让 fae 执行", "fae 任务", "rook 审查", "检查状态", or any intent to hand work to a sub-agent. 🔴 Never delegate without loading this skill first. Skipping it is serious negligence. Note: this skill does not include workflow-specific prompt templates such as dev-flow templates. Those belong to the corresponding workflow skills.