youtube-skills
A Claude skill
that gets the subtitles of any YouTube video.
- The video has subtitles: you get them as they are.
- The video has only auto-generated captions: Claude fixes the mis-heard words
and adds punctuation, then gives you the corrected version.
- The video has no captions at all: the audio is transcribed on your own
computer with Whisper, then
corrected by Claude the same way.
Paste a link and ask:
Get the subtitles of https://youtu.be/8jPQjjsBbIc
No API key is needed. The Claude you are already chatting with does the correcting,
and audio is transcribed on your own computer.
What you can ask for
| You say | You get |
|---|
| "Get the transcript of …" | A .txt file with clean paragraphs |
| "…with timestamps" | [mm:ss] lines, about one every 30 seconds |
| "Give me the .srt for …" | A subtitle file with the original timing |
| "…as JSON" | Every caption cue with its start time and duration |
| "English subtitles for …" | The English track, or YouTube's translation if there is none |
| "Which subtitle languages does it have?" | The list of tracks |
| "…the raw auto-captions" | YouTube's captions exactly as they are, uncorrected |
| "Transcribe this file" (an mp4, mp3, m4a, wav…) | The same outputs, from a video or audio file on your computer |
After that, keep talking to Claude: "summarize it in 5 points", "translate it to
Vietnamese", "what did he say about passports?". Claude answers from the
transcript, so there is no separate summary command.
Install
You need Python 3.9 or newer. Everything else installs itself on first use.
Videos without captions need a little more, only the first time one comes up: a
speech model is downloaded (1.6 GB on a computer with 8 or more CPU cores, 0.5 GB
otherwise), and YouTube downloads need Node.js 22+ or
Deno installed.
Claude Code (terminal, IDE, and the desktop app's Code tab)
/plugin marketplace add enderphan94/youtube-skills
/plugin install youtube-skills@youtube-skills
Start a new session and paste a YouTube link.
Without the plugin system
git clone https://github.com/enderphan94/youtube-skills.git ~/youtube-skills
mkdir -p ~/.claude/skills && ln -s ~/youtube-skills/skills/youtube-sub ~/.claude/skills/
Claude desktop app (Chat) and claude.ai
- Build the zip file:
git clone https://github.com/enderphan94/youtube-skills.git && cd youtube-skills && ./tools/build.sh
- Open Settings → Capabilities. Turn on Code execution and file creation.
- In the same place, allow network access to these domains (or to all domains):
youtube.com, www.youtube.com, pypi.org, files.pythonhosted.org,
yougist.kuberscan.com.
- Go to Settings → Capabilities → Skills, click Upload skill, and choose
dist/youtube-sub.zip.
- Start a new chat and paste a YouTube link.
The chat sandbox runs on a cloud server, and YouTube usually refuses to send
audio to those. So for a video with no captions, the link alone is not enough
there: download the video yourself, attach the file to the chat, and ask Claude
to transcribe it. For that, also allow huggingface.co in step 3 (the speech
model is downloaded from it), or allow all domains. In Claude Code on your own
computer the link alone works.
How it works
flowchart TD
U([A YouTube link]) --> F[fetch_transcript.py<br/>lists the video's caption tracks.<br/>If YouTube blocks this machine, it asks<br/>the hosted YouGist backend instead]
F --> Q{What captions<br/>does the video have?}
Q -- "human-made subtitles" --> H[Download them.<br/>Final as they are]
Q -- "only auto-generated" --> A[Download the auto-captions]
Q -- "none at all" --> G{GEMINI_API_KEY set?}
G -- "yes" --> GM[Gemini fetches the video itself<br/>and transcribes the audio.<br/>No per-line timing]
G -- "no" --> D{Can yt-dlp download<br/>the audio here?}
D -- "yes: your own computer" --> W[faster-whisper transcribes<br/>the audio locally, with timing]
D -- "no: chat sandbox,<br/>blocked network" --> X([You download the video<br/>and attach the file])
L([An audio or video file]) --> W
X --> W