Install
$ agentstack add skill-wanxiao2018-youtube-subtitle-downloader-youtube-subtitle-downloader ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
YouTube Subtitle Downloader
Download subtitles from any YouTube video and convert them into structured, readable Markdown for language learning.
Core Principles
- Manual First — Always prefer manually uploaded subtitles over auto-generated. Better punctuation, fewer errors.
- Clean Output — Merge fragmented SRT lines into readable paragraphs. No broken sentences.
- Universal — Works with any YouTube video, any language.
- One Command — Minimize user friction. Ideally: paste URL, get Markdown.
Prerequisites
Before starting, verify these are installed:
command -v yt-dlp # brew install yt-dlp
command -v python3 # Python 3.8+
command -v jq # brew install jq
command -v gh # brew install gh (optional, for GitHub operations)
Chrome browser must be installed with at least one YouTube login session.
Phase 1: Get Video Info
When the user provides a YouTube URL:
- Extract metadata using yt-dlp with Chrome cookies:
yt-dlp --cookies-from-browser chrome \
--print "%(title)s---%(channel)s---%(channel_url)s---%(duration_string)s" \
--skip-download "URL"
- Parse the
---separated output to get: title, channel name, channel URL, duration.
Phase 2: Detect & Download Subtitles
- Get subtitle list via JSON:
yt-dlp --cookies-from-browser chrome --dump-json --skip-download "URL"
- Check manual subtitles in the
subtitlesfield of the JSON. - Check auto subtitles in the
requested_subtitlesorautomatic_captionsfield. - Match language — handle extended codes like
en-eEY6OEpapPoforen:
# For each code in subtitles, check if code == LANG or code starts with LANG-
- Download with appropriate flag:
- Manual found:
--write-sub --sub-lang CODE --sub-format srt --no-write-auto-sub - Auto only:
--write-sub --sub-lang CODE --sub-format srt --write-auto-sub
- Rename the SRT file to a clean
PREFIX.LANG.srtname (yt-dlp may use extended codes in filename).
Phase 3: Convert to Markdown
Run the converter script at SKILL_DIR/scripts/srt_to_md.py:
python3 SKILL_DIR/scripts/srt_to_md.py \
--srt input.srt \
--title "Video Title" \
--video-url "URL" \
--channel "Channel Name" \
--channel-url "Channel URL" \
--duration "15:04" \
--sub-type "manual (from creator)" \
--output output.md
Output Format
# Video Title
> **Channel:** [Name](url)
> **Video:** URL
> **Duration:** MM:SS
> **Subtitles:** manual / auto-generated
---
**[00:00]**
Merged paragraph text. Fragments joined into readable blocks.
---
Phase 4: Deliver
- Open the Markdown file:
open output.md - Summarize to user:
- Video title and channel
- Subtitle source (manual vs auto)
- Paragraph count and file size
- File location
- If manual subtitles were used, mention this explicitly — it's the quality differentiator.
Pitfalls
| Issue | Solution | |-------|----------| | "Sign in to confirm you're not a bot" | Chrome must be installed with YouTube login | | SSL warnings | Harmless, ignore | | No subtitles for language X | Run --list-subs to show available codes | | Auto subtitles have errors | Expected. Manual always preferred | | yt-dlp puts extended codes in filename | Script auto-renames to clean PREFIX.LANG.srt | | jq not installed | brew install jq required for JSON parsing |
Batch Mode
For multiple videos (e.g., a playlist):
- Get video list from playlist
- Loop through each URL
- Run Phase 1-3 for each
- Report summary of all downloaded files
Supporting Files
| File | Purpose | When to Read | |------|---------|--------------| | [scripts/srttomd.py](scripts/srttomd.py) | SRT → Markdown converter | Phase 3 | | [scripts/download.sh](scripts/download.sh) | Standalone CLI tool (not required for skill) | User direct usage |
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: wanxiao2018
- Source: wanxiao2018/youtube-subtitle-downloader
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.