From claude-resources
Fetches transcript/caption text from YouTube videos using youtube-transcript-api. Supports multiple URLs, timestamps, and language fallback.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-resources:youtube-text-fetchThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Fetch transcript/caption text from YouTube videos.
Fetch transcript/caption text from YouTube videos.
Note: For full video processing (download, frame capture, transcript, and article
writing), use the /youtube-guide-writer skill instead. This skill is for quick
transcript-only extraction.
Requires youtube-transcript-api Python package:
pip3 install youtube-transcript-api
If not installed, install it automatically before proceeding.
Extract video IDs from provided URLs. Supported formats:
https://youtu.be/<ID>https://youtu.be/<ID>?si=...https://www.youtube.com/watch?v=<ID>https://youtube.com/watch?v=<ID>&...Check if --timestamps flag is present (include timestamps in output).
For each video ID, run:
With timestamps (default when --timestamps flag is used, or when writing guide articles):
python3 -c "
from youtube_transcript_api import YouTubeTranscriptApi
snippets = YouTubeTranscriptApi().fetch('VIDEO_ID')
for s in snippets:
minutes = int(s.start // 60)
seconds = int(s.start % 60)
print(f'[{minutes:02d}:{seconds:02d}] {s.text}')
"
Plain text (default):
python3 -c "
from youtube_transcript_api import YouTubeTranscriptApi
snippets = YouTubeTranscriptApi().fetch('VIDEO_ID')
for s in snippets:
print(s.text)
"
If the default language fails, try fetching with specific language codes:
python3 -c "
from youtube_transcript_api import YouTubeTranscriptApi
snippets = YouTubeTranscriptApi().fetch('VIDEO_ID', languages=['en', 'ja'])
for s in snippets:
print(s.text)
"
Determine the log directory first:
LOGDIR=$(node $HOME/.claude/scripts/get-logdir.js)
mkdir -p "$LOGDIR"
Save each transcript to $LOGDIR/youtube-<VIDEO_ID>.txt.
If multiple videos are provided, also create a combined file $LOGDIR/youtube-combined.txt with clear separators between each video's transcript.
Print a summary of what was fetched:
If the project has the sub-packages/yt-tools/ sub-package, it provides a more
comprehensive workflow including video download and frame capture:
cd sub-packages/yt-tools
pnpm download <youtube-url> # Downloads video + metadata + transcript
pnpm capture:auto <video-id> # Auto-captures frames at intervals
Use yt-tools when you need the full video processing pipeline (download, capture,
transcript). Use this skill (/youtube-text-fetch) when you only need the transcript
text.
npx claudepluginhub takazudo/claude-resources --plugin claude-resourcesDownloads YouTube video transcripts as timestamped text files via youtube-transcript-api. Use for extracting transcripts from videos for analysis, documentation, or content review.
Fetches the transcript text for a given YouTube video URL using the youtube-to-docs process_video tool.
Extracts YouTube video subtitles/transcripts via yt-dlp CLI or Chrome automation, converting to timestamped plain text files.