agentleFS
ringalls2020ringalls2020/podcast-transcript/skills/youtube-transcript/SKILL.md

youtube-transcript

Skill1 starsChanged 2 months agoMITView on GitHub

Fetch the transcript or captions of a YouTube video from a URL or 11-character video id. Use when the user asks to "get the transcript", "fetch the captions", "fetch the subtitles", "what does this video say", "transcribe this YouTube video", pastes a youtube.com, youtu.be, or YouTube Shorts link and wants the spoken words, or runs /youtube-transcript. Covers manual and auto-generated captions. No YouTube API key and no browser.

36 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use markdown-converter, context7 and 6 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.
  • bongartzdiazSkill

    markdown-converter

    Convert documents and files to Markdown using markitdown. Use when converting PDF, Word (.docx), PowerPoint (.pptx), Excel (.xlsx, .xls), HTML, CSV, JSON, XML, images (with EXIF/OCR), audio (with transcription), ZIP archives, YouTube URLs, or EPubs to Markdown format for LLM processing or text analysis.

    Also in 3 projects that use this

  • bongartzdiazSkill

    context7

    Retrieve up-to-date documentation for software libraries, frameworks, and components via the Context7 API. This skill should be used when looking up documentation for any programming library or framework, finding code examples for specific APIs or features, verifying correct usage of library functions, or obtaining current information about library APIs that may have changed since training.

    Also in 4 projects that use this

  • LangChainSkill

    file-organizer

    Intelligently organizes your files and folders across your computer by understanding context, finding duplicates, suggesting better structures, and automating cleanup tasks. Reduces cognitive load and keeps your digital workspace tidy without manual effort.

    Also in 3 projects that use this

  • ttmouseSkill

    notebooklm

    Automate Google NotebookLM - create notebooks, add sources, generate podcasts/videos/quizzes, download artifacts. Supports browser-based content extraction for anti-crawler platforms (Twitter/X, LinkedIn, etc.). Activates on explicit /notebooklm or intent like "create a podcast about X

    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

  • MicrosoftSkill

    skill-creator

    Guide for creating effective GitHub Copilot skills (.github/skills/) in this repository. Use when creating a new skill, updating an existing skill, or when asked about skill structure, format, or best practices for the vscode-documentdb project.

    Also in 7 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 30 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run the script by its absolute path.

    line 23
  2. Distinctive:

    Default format is plain text, one caption line per row.

    line 33
  3. Very specific:

    Read the stderr status line for the language code and whether the track is manual or generated.

    line 35
  4. Very specific:

    When the video id starts with -, put -- before it:

    line 50
  5. Very specific:

    When stderr says youtube-transcript-api is not available, install the CLI and run the same fetch once more:

    line 58

“Common” is measured: kept by at least 6 in 10 of the 30 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

Fetch captions with scripts/fetch_transcript.py, which sits beside this file. Pass a YouTube URL or an 11-character video id. Stdout is the transcript. Stderr is a one-line status. The process exit code is the result.

Run the script by its absolute path. youtube_transcript_api accepts only a video id and exits 0 when YouTube rejects the request, so use this script's exit code.

Run

python3 <skill-dir>/scripts/fetch_transcript.py "<url-or-id>"

<skill-dir> is the directory that contains this SKILL.md.

Default format is plain text, one caption line per row. When the user asked for the transcript, return stdout. When they asked for a summary, fetch first and summarize from stdout. Every quoted line comes from that stdout.

Read the stderr status line for the language code and whether the track is manual or generated.

AskCommand
spoken wordspython3 <skill-dir>/scripts/fetch_transcript.py "<url>"
timestampsadd --format json
caption fileadd --format srt or --format webvtt
language orderadd --languages es en
available tracksadd --list
translated captionsadd --translate de

Pass several URLs in one command. Text output for more than one video starts each transcript with # <video-id>.

With no --languages value, the script tries English and then the first remaining track. With --languages, it uses that order only.

When the video id starts with -, put -- before it:

python3 <skill-dir>/scripts/fetch_transcript.py -- "-abc1234567"

Missing CLI

When stderr says youtube-transcript-api is not available, install the CLI and run the same fetch once more:

uv tool install youtube-transcript-api

youtube_transcript_api must be on PATH. uv installs it to ~/.local/bin. When uv is missing:

pipx install youtube-transcript-api

Failures

Return the stderr line.

stderrAction
not a YouTube video URL or idAsk for a watch URL, a youtu.be link, a Shorts URL, or an 11-character id
IpBlocked or RequestBlockedOpen references/cli.md and configure a proxy, then run the fetch once more. A second block ends the task
an age-restriction errorReport it. Cookie login in youtube-transcript-api is disabled upstream
any other exceptionReport the exception name and message

--list prints a tab-separated table: code, language, kind (manual or generated), translatable (yes or no). --list ignores --format and --translate.

Proxy and extra flags

references/cli.md owns proxy environment variables, Webshare, generic proxies, exclude flags, and the JSON shape.

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.