zephyrwang6/myskill/youtube-transcript-cn
Claude Code and agent skill by zephyrwang6/myskill
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
从 YouTube 视频链接提取字幕并转换为中文文字稿。支持自动生成字幕和手动字幕。 使用场景:(1) 用户提供 YouTube 链接并要求提取字幕/文字稿,(2) 用户要求将 YouTube 视频内容转为文字, (3) 用户说"帮我把这个 YouTube 视频转成文字"或类似请求。 触发词:YouTube 字幕、视频转文字、提取字幕、YouTube transcript、视频文字稿。
Install
npx vskill@latest install zephyrwang6/myskill/youtube-transcript-cnSKILL.md
YouTube 字幕提取技能
从 YouTube 视频提取字幕,输出中文文字稿。
快速使用
工作流程
- 获取视频链接:从用户消息中提取 YouTube URL
- 运行脚本:执行
scripts/get_transcript.py提取字幕 - 处理输出:
- 如果字幕是中文:直接输出
- 如果字幕是英文:翻译为中文后输出
- 保存结果:根据用户需求保存为 Markdown 文件
脚本参数
| 参数 | 说明 | 默认值 | |
|---|---|---|---|
url | YouTube 视频链接或 ID | 必填 | |
-f, --format | 输出格式: text, markdown, json | markdown | |
-t, --timestamps | 包含时间戳 | 否 | |
-l, --lang | 首选语言(逗号分隔) | zh,en | |
-o, --output | 输出文件路径 | stdout |
使用示例
基本用法
带时间戳输出
保存到文件
JSON 格式(便于后处理)
支持的 URL 格式
https://www.youtube.com/watch?v=VIDEO_IDhttps://youtu.be/VIDEO_IDhttps://www.youtube.com/embed/VIDEO_ID- 直接使用 Video ID
语言优先级
脚本按以下顺序查找字幕:
- 简体中文 (zh-Hans)
- 繁体中文 (zh-Hant)
- 中文 (zh)
- 英文 (en)
- 自动生成字幕
翻译处理
如果获取到的是英文字幕,需要翻译为中文:
- 运行脚本获取英文字幕
- 使用 Claude 内置能力翻译为流畅的中文
- 保持原文结构和段落划分
错误处理
| 错误 | 原因 | 解决方案 | |
|---|---|---|---|
| No captions available | 视频无字幕 | 告知用户该视频没有可用字幕 | |
| Cannot extract video ID | URL 格式错误 | 请求用户提供正确的 YouTube 链接 | |
| 网络超时 | 网络问题 | 重试或检查网络连接 |
输出格式示例
Markdown 格式
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingyoutube-transcript-cn/SKILL.md
Popularity
- Repository stars
- 120
- Repository forks
- 36
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 29 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/zephyrwang6/myskill/youtube-transcript-cn)