youtube-to-skill
npx skills add https://github.com/yfe404/youtube-to-skill --skill youtube-to-skill
Agent 安装分布
Skill 文档
YouTube to Skill Transformer
Convert YouTube video content into effective, verified, up-to-date agent skills.
â ï¸ Before You Generate ANY Skill
You MUST read reference.md first.
It contains the critical understanding of what makes skills actually work vs useless text files. Without this knowledge, you will create skills that the agent ignores.
â° CRITICAL: Check Current Date
LLMs are trained on historical data and often assume outdated dates.
Before verifying ANY technology:
- Check today’s date from your environment/system
- Use this date when searching for “current” documentation
- Compare video publish date against TODAY’s date (not your training cutoff)
Example: If today is December 2025 and a video was published in January 2024, that’s ~2 years old â significant API changes may have occurred.
When searching, always include the current year:
- â
"React hooks 2025"or"FastAPI latest version December 2025" - â
"React hooks"(may return outdated results)
ð¬ CRITICAL: No Hallucinated Data
Never include numbers, estimates, or claims you haven’t verified.
This applies to:
- Version numbers â Always look them up
- Performance claims â Only include if from official docs/benchmarks
- Cost estimates â Only if you’ve calculated from real pricing
- Time estimates â Don’t guess, omit if unknown
- Statistics â Must have a verifiable source
The scientific method:
- If you don’t know â Look it up or omit it
- If you can’t verify â Don’t include it
- If it’s an estimate â Label it clearly with your methodology
- If the video claims something â Verify before including
Bad: “This approach is 10x faster” (unverified claim from video) Good: “The video claims improved performance” or omit entirely Best: Verify with benchmarks and cite source
The Pipeline
EXTRACT âââ¶ IDENTIFY âââ¶ VERIFY âââ¶ TRANSFORM âââ¶ GENERATE
â â â â â
transcript tools & current? narrative effective
+ meta versions enriched? âââ¶ action skill
Step 1: Extract Transcript
python .claude/skills/youtube-to-skill/scripts/extract_youtube.py "<URL>"
- Single videos:
youtube.com/watch?v=...oryoutu.be/... - Playlists:
youtube.com/playlist?list=...
Output: JSON with title, publish date, channel, and transcript.
Note the publish date â older videos need more verification.
Step 2: Identify Technologies
Scan transcript and list ALL mentioned:
| Category | Examples |
|---|---|
| Languages | Python 3.9, TypeScript, Rust |
| Frameworks | React 18, Next.js 14, FastAPI |
| Libraries | axios, lodash, pandas |
| Tools | Docker, kubectl, terraform |
| Services | AWS S3, Stripe API, OpenAI |
| CLIs | npm, cargo, pip commands |
Create a verification checklist with version numbers if mentioned.
Step 3: Verify & Update (CRITICAL)
Videos get outdated. Your skill must not.
For Libraries/Frameworks â Use Context7 MCP
1. mcp__context7__resolve-library-id
â Find the library ID (e.g., "react" â "/reactjs/react.dev")
2. mcp__context7__get-library-docs
â Fetch current documentation for specific topics
â Use mode='code' for API/examples, mode='info' for concepts
Example:
- Video mentions “React useEffect cleanup”
- Resolve:
/reactjs/react.dev - Fetch: topic=”useEffect cleanup” mode=”code”
- Compare video content with current docs
For Tools/Services/APIs â Use WebSearch
WebSearch: "<tool name> documentation <current year>" or "<api> latest version <current month year>"
Always include the current date in searches to avoid stale results.
When You Find Outdated Information
STOP and ask the user:
â ï¸ Outdated content detected in video (published <date>):
[Library/Tool] v<old> â Current: v<new>
Breaking changes found:
⢠<specific change 1>
⢠<specific change 2>
How should I proceed?
A) Update to current version (recommended)
B) Keep original with deprecation warnings
C) Skip this section
Ask About Enrichment
Would you like me to enrich this skill with current official documentation?
This would add:
⢠Updated API references from Context7
⢠Additional code examples
⢠Edge cases not covered in the video
[Yes / No / Ask me for each topic]
Step 4: Transform Content
This is where most skill generation fails.
See reference.md for the deep understanding, but the core principle:
You are not transcribing. You are creating executable instructions.
| â Video Narration | â Skill Instruction |
|---|---|
| “So what we’re gonna do here is…” | (delete) |
| “You want to open your terminal and type…” | bash -c "command" |
| “The cool thing about this is…” | (delete or convert to a note) |
| “Make sure you don’t forget to…” | â ï¸ Warning: … |
| “If you see this error…” | Troubleshooting: … |
| “I usually structure it like…” | Recommended structure: |
The test: Can the agent follow these instructions without watching the video?
Step 5: Choose Skill Structure
First, decide: Single file or multi-file?
âââââââââââââââââââââââââââââââââââââââ
â Analyze Content â
ââââââââââââââââââââ¬âââââââââââââââââââ
â
âââââââââââ´ââââââââââ
â¼ â¼
Short/Simple? Complex/Long?
â â
â¼ â¼
Single SKILL.md Multi-file structure:
âââ Theory â references/
âââ Code â scripts/
âââ Variants â examples/
Decision Criteria
| Criterion | Single File | Multi-File |
|---|---|---|
| Video length | < 10 min | > 20 min |
| Code examples | 1-2 small snippets | Complete runnable scripts |
| Theory vs practice | Mostly practical | Heavy theory + practice |
| Estimated word count | < 2000 words | > 3000 words |
| Multiple workflows | No | Yes (different use cases) |
Multi-File Structure (Progressive Disclosure)
skill-name/
âââ SKILL.md # Core instructions (<5k words, always loaded)
âââ references/ # Deep docs (loaded on-demand, saves tokens)
â âââ concepts.md # Theory, explanations
â âââ api.md # API documentation
âââ scripts/ # Executable code (can run without loading)
â âââ example.py # Complete runnable examples
âââ assets/ # Templates, images (used in output)
Why this matters:
- SKILL.md is always loaded (~tokens cost)
- references/ only loaded when Claude needs them (saves tokens)
- scripts/ can be executed directly without loading into context
- assets/ copied to output, never loaded
Step 6: Generate the Skill
Use template: templates/skill_template.md
Output Format
For SINGLE FILE output: Start directly with the YAML frontmatter:
---
name: skill-name
description: ...
---
# Content...
For MULTI-FILE output: Use file markers to separate content:
<!-- FILE: SKILL.md -->
---
name: skill-name
description: ...
---
# Skill Title
Core actionable instructions here (keep under 5000 words).
For detailed concepts, see [concepts reference](references/concepts.md).
<!-- FILE: references/concepts.md -->
# Theoretical Concepts
Deep explanations, formulas, theory...
<!-- FILE: scripts/example.py -->
#!/usr/bin/env python3
Complete runnable code...
Pre-delivery Checklist
- Description has trigger words users actually say
- Description includes “Use when…” â This is how the agent discovers the skill
- One skill = one capability (split if video covers multiple)
- Instructions are executable (commands, code, steps)
- No narrator voice (“so”, “basically”, “gonna”)
- Sources documented (video URL + docs used)
- Versions specified for all tools/libraries
- Required sections present: Source, Prerequisites, Instructions, Troubleshooting
YAML Frontmatter Rules
ONLY these fields are allowed:
---
name: lowercase-with-hyphens
description: ACTION VERB + what it does. Use when user needs X, wants to Y, or asks about Z.
---
name: lowercase, hyphens only, max 40 charsdescription: Must include “Use when…” trigger phrase
Ask for Placement
Where should I save this skill?
A) .claude/skills/<name>/ â Project skill (shared via git)
B) ~/.claude/skills/<name>/ â Personal skill (your machine only)
Available Tools Reference
| Need | Tool | Example |
|---|---|---|
| Library docs | mcp__context7__resolve-library-id |
Find React library ID |
| Library docs | mcp__context7__get-library-docs |
Fetch React hooks docs |
| General search | WebSearch |
“docker compose v2 migration” |
| Specific URL | WebFetch |
Fetch a specific doc page |