Claude-skill-registry extract-videos
Extract video metadata from a YouTube channel and save to CSV for tracking. Use when adding a new channel, extracting conference videos, populating video lists, or when the user mentions "extract videos", "get videos from channel", "add channel", or "video metadata".
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/extract-videos" ~/.claude/skills/majiayu000-claude-skill-registry-extract-videos && rm -rf "$T"
skills/data/extract-videos/SKILL.mdExtract Videos from YouTube Channel
Why? Manually tracking YouTube videos is tedious and error-prone. This skill automates extracting video metadata (titles, durations, URLs) into a CSV for systematic transcript downloading and analysis.
Quick Start
# Recurring channel (adds to channels.yaml for future syncs) mkdir -p data/<channel-name> transcript-extract https://www.youtube.com/@ChannelName/videos \ --count 50 \ --append-csv data/<channel-name>/videos.csv \ --register-channel # One-time extraction (conferences, playlists) mkdir -p data/<name> transcript-extract <youtube_url> --count 100 --append-csv data/<name>/videos.csv
Workflow
1. Determine Extraction Type
| Scenario | Use ? | Typical Count |
|---|---|---|
| New channel for ongoing tracking | Yes | 50-200 initial, then 20-50 for syncs |
| Conference talks (one-time) | No | 50-500 |
| Specific playlist/topic | No | As needed |
| Testing/exploration | No | 5-10 |
[!TIP] Use
only for channels you want to sync regularly. It adds the channel to--register-channelfor thedata/channels.yamlskill.sync-all-channels
2. Create Directory Structure
mkdir -p data/<channel-name>
Naming conventions:
- Use lowercase with hyphens:
,aws-reinvent-2025
,veritasiumlexfridman - Match the YouTube handle when possible:
becomes@veritasiumveritasium - For conferences, include year:
,pycon-2025kubecon-eu-2024
3. Run Extraction Command
transcript-extract <channel_url> \ --count <N> \ --append-csv data/<channel-name>/videos.csv \ [--register-channel]
Parameters:
| Option | Description | Default | When to Use |
|---|---|---|---|
| Number of latest videos | 10 | Always specify explicitly |
| CSV file path | Required | Always use for tracking |
| Add to | False | Recurring channels only |
| Save video IDs to text file | - | Rarely needed |
| Enable verbose output | False | Debugging |
[!CAUTION] The
in the command sets the INITIAL extraction count. The--countincount(set bychannels.yaml) controls FUTURE sync counts. These are independent values.--register-channel
4. Verify Extraction
# Check CSV was created with expected columns head -3 data/<channel-name>/videos.csv # Count extracted videos wc -l data/<channel-name>/videos.csv
Expected CSV columns:
- Full YouTube video URLurl
- Video titletitle
- Video lengthduration_minutes
- Number of viewsview_count
- Video descriptiondescription
- Tracking field (initially empty)transcript_downloaded
- Tracking field (initially empty)summary_done
Examples
Adding a New Channel for Regular Syncing
# 1. Create directory mkdir -p data/veritasium # 2. Extract initial batch with registration transcript-extract https://www.youtube.com/@veritasium/videos \ --count 100 \ --append-csv data/veritasium/videos.csv \ --register-channel # Result: 100 videos extracted, channel added to channels.yaml with count: 100
One-Time Conference Extraction
# Extract AWS re:Invent talks (won't be synced later) mkdir -p data/aws-reinvent-2025 transcript-extract https://www.youtube.com/@AWSEventsChannel/videos \ --count 200 \ --append-csv data/aws-reinvent-2025/videos.csv # No --register-channel = not added to channels.yaml
Re-running on Existing CSV (Incremental Update)
# Running again only adds NEW videos (duplicates auto-skipped) transcript-extract https://www.youtube.com/@veritasium/videos \ --count 20 \ --append-csv data/veritasium/videos.csv # Safe to run multiple times - existing videos preserved
Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
| "No videos found" | Wrong URL format | Use (include ) |
| CSV not created | Directory doesn't exist | Run first |
| Duplicate videos appearing | Running with different URL variants | Always use canonical format |
Channel not in | Forgot | Re-run with flag, or manually add to YAML |
Wrong video count in | Flag uses command's value | Edit manually to adjust future sync count |
| Permission denied | File locked or read-only | Close any apps using the CSV |
Common Mistakes
-
Forgetting
in URL/videos- Wrong:
https://www.youtube.com/@veritasium - Right:
https://www.youtube.com/@veritasium/videos
- Wrong:
-
Using
for one-time extractions--register-channel- This pollutes
with channels you won't syncchannels.yaml - Only use for channels you want in the regular sync rotation
- This pollutes
-
Expecting transcripts to download
- This skill ONLY extracts video metadata to CSV
- Use
skill to actually fetch transcriptsdownload-transcripts
-
Not creating directory first
- The
path requires parent directory to exist--append-csv - Always run
before extractionmkdir -p data/<name>
- The
-
Confusing command
with--count
countchannels.yaml- Command
: How many videos to extract NOW--count channels.yaml
: How many videos for FUTURE syncscount- Initial extraction might be 200, but sync count might be 30
- Command
Quality Checklist
Before considering extraction complete:
- Directory created in
with proper namingdata/ - CSV exists with expected video count
- CSV has all required columns (url, title, duration_minutes, etc.)
- If recurring channel: entry exists in
channels.yaml - If recurring channel:
count is set appropriately for future syncschannels.yaml
Next Steps
After extracting videos:
- Download transcripts: Use the
skilldownload-transcripts - Sync channels later: Use
for registered channelssync-all-channels - Add summaries: Use
after downloadingsummarize-transcripts