youtube-transcribe-skill
Extract subtitles/transcripts from YouTube videos via CLI or browser automation
View on GitHubTable of content
Extract subtitles/transcripts from YouTube videos via CLI or browser automation
Installation
npx claude-plugins install @feiskyer/claude-code-settings/youtube-transcribe-skill
Contents
Folders: skills
Included Skills
This plugin includes 1 skill definition:
youtube-transcribe-skill
‘Extract subtitles/transcripts from YouTube videos. Triggers: “youtube transcript”, “extract subtitles”, “video captions”, “视频字幕”, “字幕提取”, “YouTube转文字”, “提取字幕”.’
View skill definition
YouTube Transcript Extraction
Extract subtitles/transcripts from a YouTube video URL and save them as a local file.
Input YouTube URL: $ARGUMENTS
Step 1: Verify URL and Get Video Information
Verify URL Format: Confirm the input is a valid YouTube URL (supports
youtube.com/watch?v=oryoutu.be/formats).Get Video Information: Use WebFetch or firecrawl to fetch the page and extract the video title for subsequent file naming.
Step 2: CLI Quick Extraction (Priority Attempt)
Use command-line tools to quickly extract subtitles.
Check Tool Availability: Execute
which yt-dlp.- If
yt-dlpis found, proceed to subtitle download. - If
yt-dlpis NOT found, skip immediately to Step 3.
- If
Execute Subtitle Download (Only if
yt-dlpis found):- Tip: Always add
--cookies-from-browserto avoid sign-in restrictions. Default tochrome. - Retry Logic: If
yt-dlpfails with a browser error (e.g., “Could not open Chrome”), ask the user to specify their available browser (e.g.,firefox,safari,edge) and retry.
# Get the title first (try chrome first) yt-dlp --cookies-from-browser=chrome --get-title "[VIDEO_URL]" # Download subtitles yt-dlp --cookies-from-browser=chrome --write-auto-sub --write-sub --sub-lang zh-Hans,zh-Hant,en --skip-download --output "<Video Title>.%(ext)s" "[VIDEO_URL]"- Tip: Always add
Verify Results:
- Check the command exit code.
- **Exit code 0 (
…(truncated)