/tradecraft:youtube-video-to-knowledgefrom tradecraft
Extracts transcripts, keyframes, metadata, and AI-powered summaries from YouTube videos. Routes extracted knowledge to related skills in parallel. Triggered by YouTube URLs or requests to summarize, analyze, or take notes on video content.
Ships in tradecraft. 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.
None: SKILL.md is the whole skill.
Transform any YouTube video into structured knowledge — transcripts, visual keyframes, AI-powered summaries, flashcards, mind maps, and more.
Trigger whenever:
YouTube URL
│
├── [1] Metadata Extraction (yt-dlp) — title, channel, chapters, tags
│
├── [2] Transcript Extraction (3-tier fallback):
│ ├── youtube-transcript-api (fastest, no download)
│ ├── yt-dlp subtitle download (VTT parse)
│ └── Whisper local transcription (audio download + ASR)
│
├── [3] Visual Extraction (optional):
│ ├── Scene-change keyframes (OpenCV histogram diff)
│ ├── Interval-based frames (fixed time steps)
│ └── FFmpeg scene detection
│
├── [4] Knowledge Synthesis (Claude):
│ ├── Comprehensive Notes
│ ├── Executive Summary
│ ├── Flashcards
│ ├── Mind Map (Mermaid)
│ ├── Blog Article
│ ├── Technical Analysis
│ └── Visual Analysis (with keyframe images)
│
└── [5] Skill Routing (PARALLEL — always do this):
├── Identify related skills from video topic
├── Update existing skills with new knowledge
└── Cross-reference between skills
After extracting and summarizing a YouTube video, you MUST do two things in parallel:
Step A — Identify related skills (during synthesis): While reading the transcript, identify the video's domain topics. Match against existing skills:
Step B — Update skills in parallel: Use the Agent tool to spawn parallel subagents that:
> Source: "Video Title" by Channel (Date)Step C — Report to user: After both the summary and skill updates complete, tell the user:
Updated X related skills:
- skill-name-1: added [concept] section
- skill-name-2: added cross-reference to [concept]
pip install yt-dlp youtube-transcript-api webvtt-py --break-system-packages -q
These are lightweight. OpenCV and FFmpeg are pre-installed in the environment.
Read and execute the extraction script:
python3 /path/to/scripts/youtube_extractor.py "YOUTUBE_URL" \
--work-dir /home/claude/yt_work \
--output /home/claude/yt_work/video_knowledge.md
Common options:
| Flag | Purpose | Default |
|---|---|---|
--frames | Extract keyframe images | Off |
--frame-method | scene / interval / ffmpeg | scene |
--max-frames | Max keyframes to extract | 15 |
--languages en ar | Preferred transcript languages | en + 9 others |
--whisper | Enable Whisper fallback (slow) | Off |
--whisper-model | tiny/base/small/medium | base |
After extraction, you'll have:
*_knowledge.md — Human-readable knowledge document*_raw.json — Structured data for programmatic usekeyframes/ directory (if --frames was used)Read the markdown to understand the content, then proceed to analysis.
You ARE Claude. After extracting the transcript, you have the full content in context. Now analyze it directly based on what the user wants:
If user wants notes/summary: Read the transcript and produce structured notes yourself.
If user wants flashcards: Generate Q&A pairs from the content.
If user wants a mind map: Create a Mermaid diagram showing concept relationships.
If user wants visual analysis + --frames was used: Use the view tool to look at the extracted keyframe images, then describe what's shown at each timestamp.
The scripts/knowledge_synthesizer.py script exists for API-based synthesis (useful in artifacts or automated pipelines), but in most cases you should just analyze the transcript content directly.
This is the 80% case — user shares a URL and wants to know what the video says.
# In your Python execution:
import sys
sys.path.insert(0, '/path/to/scripts')
from youtube_extractor import extract_video_id, get_video_metadata, extract_transcript_api
video_id = extract_video_id(url)
metadata = get_video_metadata(url)
transcript = extract_transcript_api(video_id)
# Now you have metadata['title'], transcript['text'], transcript['segments']
# Analyze directly in your response
Or use the CLI:
python3 scripts/youtube_extractor.py "URL" --work-dir /home/claude/yt_work
cat /home/claude/yt_work/*_knowledge.md
For tutorial videos, presentations, or demos where slides/screens matter:
python3 scripts/youtube_extractor.py "URL" \
--frames --frame-method scene --max-frames 15 \
--work-dir /home/claude/yt_work
Then use the view tool to examine each keyframe image, correlating what's shown with the transcript timestamps.
Some videos have no captions at all. Enable Whisper fallback:
python3 scripts/youtube_extractor.py "URL" \
--whisper --whisper-model base \
--work-dir /home/claude/yt_work
Warning: Whisper downloads a model (~140MB for base) and transcribes the full audio. This is slow (real-time ratio ~0.3x on CPU). Only use when subtitles are unavailable.
Specify preferred languages:
python3 scripts/youtube_extractor.py "URL" \
--languages ar en fr \
--work-dir /home/claude/yt_work
The transcript API tries each language in order. Arabic (ar) is supported for auto-generated captions on most videos.
For multiple videos, loop over URLs:
urls = ["URL1", "URL2", "URL3"]
for i, url in enumerate(urls):
result = extract_youtube_knowledge(
url=url,
work_dir=f'/home/claude/yt_work/video_{i}',
)
# Process each result
When using scripts/knowledge_synthesizer.py or when the user asks for a specific format:
| Type | Description | Best For |
|---|---|---|
comprehensive_notes | Full structured notes with all details | Study, reference |
executive_summary | Concise 500-word summary | Busy professionals |
flashcards | 15-25 Anki-style Q&A cards | Learning/review |
mindmap | Mermaid mindmap diagram | Concept overview |
blog_article | Rewritten as blog post | Content repurposing |
technical_analysis | Deep technical breakdown | Engineering/research |
visual_analysis | Analysis of slides/screens | Presentation videos |
youtube-transcript-api needs access to YouTube's serversyt-dlp needs access to YouTube for downloadsAlways clean up working directories after extraction:
rm -rf /home/claude/yt_work
| Error | Cause | Fix |
|---|---|---|
| "Could not extract video ID" | Malformed URL | Ask user to verify URL |
| "Transcripts disabled" | Channel disabled captions | Use --whisper fallback |
| "Video unavailable" | Private/deleted/geo-blocked | Inform user, cannot extract |
| "No subtitles available" | No captions in any language | Use --whisper fallback |
| OpenCV can't open video | Download failed or corrupt | Try --frame-method ffmpeg |
| Whisper OOM | Video too long for memory | Use --whisper-model tiny |
After installing this skill, scripts are at:
youtube-video-to-knowledge/
├── SKILL.md ← You are here
├── scripts/
│ ├── youtube_extractor.py ← Main extraction pipeline
│ └── knowledge_synthesizer.py ← Claude API synthesis (for artifacts)
├── references/
│ └── prompt_templates.md ← Customizable prompt templates
└── assets/
└── (empty — for user templates)
--frames for tutorial/presentation videos — slides contain info not in speech.--languages ar en.--frame-method interval --frame-interval 60.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
youtube, transcript, video-summary, knowledge-extraction, flashcards, mind-map
npx claudepluginhub mahmoud20138/tradecraft --plugin tradecraft169 skills in this plugin
/agent-developmentThis skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins./agentic-storageAgentic storage architecture — persistent memory for AI agents using MCP, immutable versioning, sandboxing, and intent validation. Covers the stateless problem in LLM agents, RAG limitations (read-only), MCP protocol (JSON-RPC, resources, tools), storage safety layers, and agent file system design. Source: IBM Technology (Martin Keen), March 2026. Use this skill for "agentic storage", "agent memory", "persistent agent state", "MCP storage", "agent file system", "agent hard drive", "stateless agent problem", "agent work product", "immutable versioning", "agent sandboxing", "intent validation", "agent safety layers", "agent context window limits", "storage for AI agents", "agent persistence", "autonomous agent storage", "agent audit trail". Works with mcp-integration, trading-brain, agents, trade-psychology-coach.
Other plugins' skills for the same job