youtube-transcript

youtube-transcript is a skill for Claude Code from mthines/agent-skills. It costs 114 tokens per session (871 once invoked), scanned A, original, MIT.

A command-line tool that downloads a YouTube video's captions as plain text, with optional timestamps. Captions are the spoken words shown as subtitles, and they may be written by a person or generated automatically.

In plain words
What is it for?
Use it before summarising, quoting, or analysing a YouTube video, and save the transcript to a file for later processing.
Why use it?
It provides a direct way to obtain transcript text when common download libraries or the YouTube page are blocked. It also identifies when the text came from automatic captions, which can mishear names and technical terms.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the mthines-agent-skills plugin — 57 skills, 5 agents shipped together

Good fit Use it before summarising, quoting, or analysing a YouTube video, and save the transcript to a file for later processing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mthines/agent-skills/youtube-transcript
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mthines/agent-skills --skill youtube-transcript
Clone the repo
git clone --depth 1 https://github.com/mthines/agent-skills

Made for: Claude Code.

Or install mthines-agent-skills, the plugin that ships this one along with the rest of its 57 skills, 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for youtube-transcript

README.md
[![agentmods](https://agentmods.dev/badge/skills/mthines/agent-skills/youtube-transcript/github.svg)](https://agentmods.dev/skills/mthines/agent-skills/youtube-transcript)
Your own site
<a href="https://agentmods.dev/skills/mthines/agent-skills/youtube-transcript"><img src="https://agentmods.dev/badge/skills/mthines/agent-skills/youtube-transcript/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for youtube-transcript

Your own site · 80×15
<a href="https://agentmods.dev/skills/mthines/agent-skills/youtube-transcript"><img src="https://agentmods.dev/badge/skills/mthines/agent-skills/youtube-transcript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 871 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00114 $0.00871
Opus 5.5 $0.00046 $0.00348
Sonnet 5.5 $0.00023 $0.00174
Haiku 4.5 $0.00011 $0.00087

Measured today against content hash e9f96267fc0c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

youtube-transcript scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/yt_transcript.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/analysis/youtube-transcript/SKILL.md · 68 lines

How it starts

The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 contains Do this
LOGIN_REQUIRED / not a bot on both clients Bump clientVersion and the matching User-Agent for ANDROID and IOS in CLIENTS to the current app versions, then retry once
HTTP 429 Wait a minute and retry once; the IP is rate-limited
any other HTTP <code> or network error Retry once; if it repeats, the host is unreachable from this session — report it verbatim
unreadable caption track or unexpected response Retry 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 reason The video is private, removed, or age/region-restricted; report the reason to the user
no captions The video has no caption tracks; say so — do not invent content

Read the full file on GitHub · 68 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 68 lines · 114 tokens per session scan A e9f96267fc0c

Subscribe to this mod's changes

youtube-transcript is a skill published in the GitHub repository mthines/agent-skills (19 stars, last pushed today), licensed MIT. It adds 114 tokens to every session and 871 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-19.

Related

Other skills, from other repositories

skill-body

Call help() or help("page.click") to print signatures and uncommon options of APIs named below; it prints by itself, so do not wrap it in console.log. For installation or connection problems, read references/install.md in the ego-browser Skill directory.

citrolabs/ego-lite · 0 tokens

ego-browser

When you need a browser, read this Skill by default. Use it to open and operate websites, fill forms, click buttons, take screenshots, extract page data, sign in, and perform other browser automation tasks, as well as web app testing, dogfooding, QA, bug investigation, and app-quality review. ego-browser (ego-lite) is…

citrolabs/ego-lite · 125 tokens

ego-lite-simplify

Find and implement evidence-backed simplifications in the ego-lite repository. Use when reviewing the codebase for dead code, duplicated state or APIs, speculative abstractions, unnecessary compatibility layers, hand-written infrastructure, excessive tests or documentation, or when the user asks to reduce code size or…

citrolabs/ego-lite · 68 tokens

temporal-developer

Develop, debug, and manage Temporal applications across Python, TypeScript, Go, Java, .NET, Ruby, and Rust. Use when the user is building workflows, activities, workers, or background job queues with a Temporal SDK, debugging issues like non-determinism errors, stuck workflows, or activity retries, using Temporal CLI…

temporalio/skill-temporal-developer · 165 tokens

custom-icons

Create or refine custom icon assets as native or traced SVGs and transparent PNG/WebP files. Use when the user asks for a bespoke icon or cohesive icon set, wants an image traced into a clean vector, or needs a detailed or 3D icon with transparency.

JKc66/custom-icons-skill · 57 tokens

geekx-gate

A review framework for deciding whether an engineering idea or technical commitment is necessary, too broad, or premature. It examines the real problem, complexity, evidence, non-goals, and ease of reversal.

geekjourneyx/geekx-skills · 155 tokens