youtube-to-markdown
Skill1 starsChanged 4 months agoMITView on GitHub
Convert one or more YouTube video URLs into markdown documents containing the title, channel, URL, upload date, duration, view count, full description, and a reflowed plain-text transcript (auto-captions if no manual subs exist). Use this skill whenever the user wants to archive, summarize, study, or analyze YouTube videos as text — phrases like 'turn this video into markdown', 'get the transcript', 'extract the description and captions', 'pull these YouTube videos into notes', or any time a list of YouTube URLs needs to become readable text files. Also trigger when the user passes a file containing YouTube URLs (e.g. videos.md, links.txt) and asks for transcripts or summaries.
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- vre/flow-statetheir own version, first seen Jan 13, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- vre/flow-state★ 11same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- flexokiSkill
- pixelarticonsSkill
- update-todosSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Run the bundled script. It accepts URLs as positional args, a file containing URLs via -f, or both.
- Very specific: line 19
Use the script's path relative to the skill directory — don't reimplement the workflow inline.
- Very specific: line 34
If a video has no captions at all (creator disabled them and YouTube didn't auto-generate any), the transcript section reads _(no captions …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
YouTube → Markdown
Convert YouTube URLs into one markdown file per video. Each file is named after the (sanitized) video title and contains the metadata header plus a transcript reflowed to a fixed column width so it reads like prose, not subtitle fragments.
How to use this skill
Run the bundled script. It accepts URLs as positional args, a file containing URLs via -f, or both. It writes one .md per video into --outdir (default: cwd).
python3 scripts/yt2md.py <url> [<url> ...] [-o OUTDIR] [-w WIDTH]
python3 scripts/yt2md.py -f videos.md -o videos/Use the script's path relative to the skill directory — don't reimplement the workflow inline. If the user has a file like videos.md with mixed text and URLs, point -f at it; the script extracts every https?:// URL it finds.
Requirements
yt-dlpon PATH (brew install yt-dlpon macOS). The script checks this and exits with a clear error if missing.- Python 3.9+ (uses only stdlib:
argparse,json,re,subprocess,tempfile,textwrap).
What the script does, and why
yt-dlp --write-info-json --write-auto-subs --write-subs --sub-langs en.*,en --convert-subs srtinto a temp dir. We grab both manual and auto subs because many videos only have one of the two; theen.*glob also catchesen-orig(auto-generated original-language captions YouTube emits).- Parse
info.jsonfor title, channel, URL, upload date, duration, views, description. - Parse the SRT by stripping cue indices,
-->timestamps, and inline<...>tags, then dropping consecutive duplicate lines. YouTube auto-captions emit each phrase twice as the rolling caption window advances — without the dedupe, transcripts come out doubled. - Reflow the joined transcript with
textwrap.fill(width=80). This produces the same shape asvim'sgqqon a single joined paragraph, but without shelling out to vim, so the script works in headless environments. - Sanitize the title for the filename (
/ \ : * ? " < > |removed, whitespace collapsed, capped at 200 chars) and write<title>.md.
If a video has no captions at all (creator disabled them and YouTube didn't auto-generate any), the transcript section reads _(no captions available)_ rather than failing the whole run.
Output format
Each file uses this exact structure:
# <title>
- **Channel:** <channel>
- **URL:** <webpage_url>
- **Uploaded:** YYYY-MM-DD
- **Duration:** <seconds>s
- **Views:** <count>
## Description
<raw description from YouTube, including links and hashtags>
## Transcript
<reflowed plain text, paragraph-style, ~80 cols>Common variations
- Different reflow width (e.g., for narrow terminals or wide editors):
-w 100. - Single video, dump to current dir:
python3 scripts/yt2md.py <url>. - Bulk archive from a notes file:
python3 scripts/yt2md.py -f notes.md -o archive/. - Failures don't abort the batch: each URL is processed independently; the script prints errors per-URL and exits non-zero only if at least one failed.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

