Distill a set of sources (YouTube/video transcripts, web URLs, local documents, notes) into a new AgentSkill: ingest content, organize citations, and generate a skill folder with SKILL.md +...
Turn a pile of source material into a reusable AgentSkill.
Before ingesting YouTube sources, verify yt-dlp is installed:
which yt-dlp || echo "NOT INSTALLED"
If not installed, prompt the user to install it before proceeding with YouTube ingestion:
brew install yt-dlppip install yt-dlpwinget install yt-dlpIf the user only has URLs and local files (no YouTube), skip this check.
Collect:
Scope check β should this be one skill or many?
If the topic covers 3+ distinct categories or 5+ independent tactics, split it:
SKILL.md with a quick-reference table + priority tiers)rules/ directory (each with: why it matters, bad example, good example)Example pattern (see vercel-react-best-practices for a live implementation):
my-skill/
βββ SKILL.md # Index: categories, priority table, rule list
βββ rules/
βββ rule-one.md # Why + bad + good
βββ rule-two.md
βββ ...
The agent loads SKILL.md first (lightweight), then pulls individual rule files only when relevant. This keeps context lean and lets each rule be self-contained.
Use the bundled ingestion scripts to create a local corpus you can cite and reuse.
YouTube transcript β text
python3 ~/.claude/skills/skill-distiller/scripts/get_youtube_transcript.py "https://www.youtube.com/watch?v=VIDEO_ID" > out.txt
URL β rough readable text
python3 ~/.claude/skills/skill-distiller/scripts/extract_url_text.py "https://example.com/article" > out.txt
Local file β text
python3 ~/.claude/skills/skill-distiller/scripts/read_text_file.py /path/to/file.md > out.txt
Save raw output directly into the new skill's folder (not /tmp β it needs to persist):
<new-skill>/
references/
sources.md
knowledge.md
raw/
001-*.txt
002-*.txt
Coverage check before distilling: After ingesting, ask yourself β do the sources actually cover the topic well enough? If there are obvious gaps (e.g. you have tactics but no data on results, or theory but no practical examples), fetch additional sources before moving on. Better to have complete coverage than to distill incomplete material.
Create references/knowledge.md with:
Create references/sources.md with:
Keep SKILL.md lean; put depth in references/.
For detailed guidance on skill structure, writing style, and best practices, read ../skill-creator/SKILL.md.
Create the new skill folder (name must match the skill):
<new-skill>/SKILL.md (frontmatter: name, description)references/ for the distilled knowledgerules/ if the topic was split into individual rules (see scope check above)scripts/ only when deterministic tooling is neededassets/ for templates, images, or files used in output (not loaded into context)Description format: Write the description in third-person with trigger keywords. The agent uses it to decide when to activate the skill β it should say when to use it, not what it does:
# Good β tells the agent when to activate
description: "React performance optimization guidelines. This skill should be used when writing, reviewing, or refactoring React components."
# Bad β describes the skill instead of triggering it
description: "Contains best practices for React performance."
Dry-run with 2β3 realistic prompts and verify it:
yt-dlp in PATH. Install with:brew install yt-dlppip install yt-dlp or check yt-dlp releaseswinget install yt-dlp or download from releasesextract_url_text.py is intentionally dependency-light (stdlib only); it's "good enough" for most articles but not perfect.