youtube-fetchlisted
Install: claude install-skill WingedGuardian/GENesis-AGI
## Overview
This skill retrieves YouTube video content (metadata and transcripts)
using yt-dlp. WebFetch does not work reliably for YouTube (dynamic
content, SSL issues). yt-dlp is the reliable alternative.
**Prerequisite:** `yt-dlp` must be installed (`pip install yt-dlp`).
## Workflow
1. Ensure yt-dlp is available (install if needed):
```
which yt-dlp || pip install yt-dlp
```
2. Fetch metadata for each video:
```
yt-dlp --skip-download --print '%(title)s|||%(uploader)s|||%(description)s' 'VIDEO_URL'
```
3. Fetch the auto-generated transcript:
```
mkdir -p /tmp/yt-transcripts
yt-dlp --write-auto-sub --skip-download --sub-lang en -o '/tmp/yt-transcripts/%(id)s' 'VIDEO_URL'
```
The transcript lands at `/tmp/yt-transcripts/VIDEO_ID.en.vtt`.
4. Clean the VTT file into plain text (strip timestamps and tags):
```
sed '/^WEBVTT/d;/^Kind:/d;/^Language:/d;/^[0-9][0-9]:[0-9][0-9]/d;/^$/d;s/<[^>]*>//g' /tmp/yt-transcripts/VIDEO_ID.en.vtt | awk '!seen[$0]++'
```
5. If the transcript is too large to read at once, pipe through
`head -N` / `tail -n +N` to read in chunks.
6. If no English auto-subs are available, try without `--sub-lang`:
```
yt-dlp --write-auto-sub --skip-download -o '/tmp/yt-transcripts/%(id)s' 'VIDEO_URL'
```
Then check `ls /tmp/yt-transcripts/VIDEO_ID.*.vtt` for available languages.
7. If SSL errors occur, add `--no-check-certificate`.
## Output Format
Present results per video as:
```
### Video: [Ti