Skills youtube-archiver
Archive YouTube playlists into markdown notes with metadata, transcripts, AI summaries, and tags. Use when a user asks to import/sync YouTube playlists, archive Watch Later or Liked videos, enrich YouTube notes, batch process video notes, or automate recurring YouTube-to-markdown sync jobs with cron.
git clone https://github.com/openclaw/skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/benmillerat/youtube-archiver" ~/.claude/skills/openclaw-skills-youtube-archiver && rm -rf "$T"
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/benmillerat/youtube-archiver" ~/.openclaw/skills/openclaw-skills-youtube-archiver && rm -rf "$T"
skills/benmillerat/youtube-archiver/SKILL.mdYouTube Archiver
Use this skill to import YouTube playlists into markdown files and optionally enrich notes with transcript, summary, and tagging.
Requirements
- Python 3.7+
(yt-dlp
orpip install yt-dlp
)brew install yt-dlp- A browser signed into YouTube (for private playlists like Liked/Watch Later)
- macOS: terminal needs Full Disk Access to read browser cookies
- Windows: browser cookie extraction can be flaky;
export is the safer pathcookies_file - Linux: works on desktop installs; headless servers need
cookies_file
First-run setup flow (interactive)
If no config exists at
<output>/.config.json, ask these questions before running scripts.
Required questions
- Where should archived notes be stored?
- Default:
./YouTube-Archive
- Default:
- Which playlists should be archived?
- Accept playlist IDs or URLs
- Default:
(Liked Videos),LL
(Watch Later)WL
- Which browser is signed into YouTube for cookie auth?
- Default:
chrome
- Default:
Optional enrichment questions
Ask only if the user wants summaries/tags.
- Generate AI summaries? (yes/no)
- Summary provider? (
,openai
,gemini
,anthropic
,openrouter
,ollama
)none - Summary model name?
- API key env var name?
- Enable auto-tagging? (yes/no)
- Tagging provider/model/env var?
- Keep default tags or define custom vocabulary?
First-run execution sequence
- Run init:
python3 <skill>/scripts/yt-import.py --output <output-dir> --init
- Edit
from the user’s answers.<output-dir>/.config.json - Verify auth with dry run:
python3 <skill>/scripts/yt-import.py --output <output-dir> --dry-run
- Run real import.
- Run enrichment (optional):
python3 <skill>/scripts/yt-enrich.py --output <output-dir> --limit 10
One-shot quick start
Use this for immediate manual sync:
python3 <skill>/scripts/yt-import.py --output <output-dir> python3 <skill>/scripts/yt-enrich.py --output <output-dir> --limit 10
Useful import flags:
--dry-run
(repeatable)--playlist <ID>--no-summary--no-tags--cookies <path/to/cookies.txt>--browser <name>
Useful enrich flags:
--dry-run--limit <N>--strict-config
Idempotency and safety behavior
- Import skips already archived videos by
.video_id - Filenames include video ID:
.Title [video_id].md - Enrichment skips notes where frontmatter has
.enriched: true - Lockfile prevents concurrent runs:
.<output-dir>/.yt-archiver.lock
Automation with cron (single-agent default)
Offer cron only after one successful manual run.
Example schedule (daily 11:00):
- Import new videos
- Enrich a bounded batch
Example task text:
Run yt-import.py for <output-dir>, then run yt-enrich.py --limit 10 for the same output.
Keep it single-agent by default. Do not assume multi-agent routing.
Troubleshooting and provider details
Read these references when needed:
- Provider setup, model suggestions, cost:
references/providers.md - Common failures and fixes:
references/troubleshooting.md - Default summary prompt template:
references/default-summary-prompt.md