agentleFS
mthinesmthines/agent-skills/skills/analysis/youtube-transcript/SKILL.md

youtube-transcript

Skill20 starsChanged 13 days agoMITView on GitHub

Fetches a YouTube video's transcript as plain text (optional [mm:ss] timestamps) with a stdlib-only Python script that works from cloud IPs where yt-dlp and youtube-transcript-api are blocked. Use before summarising or quoting a video; triggers on a youtube.com / youtu.be link plus "transcript", "summarise this video", or "/youtube-transcript".

  • Installs packages

59 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use research-prompt, ship-learn-next and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • matyasstochSkill

    research-prompt

    Write a single-paragraph Deep Research prompt to hand to a human researcher (or a deep-research AI). Use when the user wants a research brief, a "deep research prompt", a one-paragraph task for a researcher, or asks "what should our researcher look for". Produces ONE tight paragraph with full context, numbered sub-questions, and per-finding output format.

    Also in 3 projects that use this

  • michalparkolaSkill

    ship-learn-next

    Transform learning content (like YouTube transcripts, articles, tutorials) into actionable implementation plans using the Ship-Learn-Next framework. Use when user wants to turn advice, lessons, or educational content into concrete action steps, reps, or a learning quest.

    Also in 4 projects that use this

  • huskerjeffSkill

    youtube-search

    Search YouTube and extract video metadata and captions using yt-dlp. Use when the user wants to search YouTube, find video transcripts, research topics via YouTube, or feed video content into other tools like NotebookLM.

    Also in 4 projects that use this

  • michalparkolaSkill

    article-extractor

    Extract clean article content from URLs (blog posts, articles, tutorials) and save as readable text. Use when user wants to download, extract, or save an article/blog post from a URL without ads, navigation, or clutter.

    Also in 3 projects that use this

  • MicrosoftSkill

    web-search

    Also in 3 projects that use this

  • ArogyaReddySkill

    changelog-generator

    Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 50 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the script with the URL or the 11-character video id:

    line 26
  2. Very specific:

    Read transcript.txt from disk.

    line 36
  3. Distinctive:

    Never paste a long transcript back to the user verbatim: summarise or quote short passages.

    line 37
  4. Distinctive:

    If it still fails, tell the user the transcript is unobtainable from this IP.

    line 60

“Common” is measured: kept by at least 6 in 10 of the 50 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

YouTube Transcript

Gets a YouTube video's captions as text in one command. Why the script takes this route, and what fails instead: references/why-innertube.md.

Procedure

  1. Run the script with the URL or the 11-character video id:

    python3 -I <skill_dir>/scripts/yt_transcript.py "<url-or-id>" > transcript.txt
    • --lang <code> picks the caption language (default en). It prefers a human-made track and falls back to an auto-generated (asr) one, then to any track.
    • --timestamps emits one [mm:ss] text line per caption instead of one paragraph.
    • stderr carries # <title> [<lang>, <manual|asr>]; stdout carries only the transcript.
  2. Read transcript.txt from disk. Never paste a long transcript back to the user verbatim: summarise or quote short passages.
  3. Tell the user when the track is asr: auto-captions mishear names and jargon, so quote them with that caveat.
# ✓ Right — one call, output to a file
python3 -I scripts/yt_transcript.py "https://youtu.be/J9NQTYUP6k0" --timestamps > transcript.txt

# ✗ Wrong — these are bot-blocked from cloud IPs; do not try them first
pip install youtube-transcript-api && youtube_transcript_api J9NQTYUP6k0
yt-dlp --write-auto-subs --skip-download "https://youtu.be/J9NQTYUP6k0"

When it fails

Exit message containsDo this
LOGIN_REQUIRED / not a bot on both clientsBump clientVersion and the matching User-Agent for ANDROID and IOS in CLIENTS to the current app versions, then retry once
HTTP 429Wait a minute and retry once; the IP is rate-limited
any other HTTP <code> or network errorRetry once; if it repeats, the host is unreachable from this session — report it verbatim
unreadable caption track or unexpected responseRetry once; if it repeats, YouTube is serving a block page to this IP — treat it as unobtainable (below). The video may still have captions, so never say it has none
UNPLAYABLE / ERROR with a reasonThe video is private, removed, or age/region-restricted; report the reason to the user
no captionsThe video has no caption tracks; say so — do not invent content

If it still fails, tell the user the transcript is unobtainable from this IP. Offer three ways forward: run the script on a residential IP (a local machine), set a proxy, or paste the transcript from YouTube's "Show transcript" panel. The video title is always available without a block from https://www.youtube.com/oembed?url=<url>&format=json.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.