Agent skill

yt-transcript

Fetch transcripts from YouTube videos. Use when user asks to get, download, extract, or retrieve YouTube video transcripts, captions, or subtitles. Also activates for video content analysis, summarizing YouTube videos, or processing video content.

Stars 2
Forks 1

Install this agent skill to your Project

npx add-skill https://github.com/nibzard/skills-kit/tree/main/skills/yt-transcript/skills/yt-transcript

SKILL.md

YouTube Transcript Skill

Fetch transcripts from YouTube videos for analysis, summarization, or content processing.

When This Skill Activates

This skill automatically activates when:

  • User asks to get, download, or extract YouTube transcripts
  • User wants to summarize or analyze YouTube video content
  • User mentions video captions or subtitles
  • User needs to process YouTube video text content

Quick Start

Prerequisites

The skill requires youtube-transcript-api to be installed:

bash
pip install youtube-transcript-api

Or with uv:

bash
uv pip install youtube-transcript-api

Basic Usage

Fetch a single transcript (outputs to stdout):

bash
python ${CLAUDE_PLUGIN_ROOT}/skills/yt-transcript/scripts/get_transcript.py "https://youtu.be/dQw4w9WgXcQ"

Save to file:

bash
python ${CLAUDE_PLUGIN_ROOT}/skills/yt-transcript/scripts/get_transcript.py "https://youtu.be/dQw4w9WgXcQ" --output transcript.txt

Fetch multiple videos:

bash
python ${CLAUDE_PLUGIN_ROOT}/skills/yt-transcript/scripts/get_transcript.py \
  "https://youtu.be/VIDEO_ID_1" \
  "https://youtu.be/VIDEO_ID_2" \
  --output transcripts.txt

Get transcript without timestamps:

bash
python ${CLAUDE_PLUGIN_ROOT}/skills/yt-transcript/scripts/get_transcript.py "https://youtu.be/dQw4w9WgXcQ" --no-timestamps

Supported URL Formats

The skill handles various YouTube URL formats:

  • Short links: https://youtu.be/dQw4w9WgXcQ
  • Standard URLs: https://www.youtube.com/watch?v=dQw4w9WgXcQ
  • Embed URLs: https://www.youtube.com/embed/dQw4w9WgXcQ
  • Video IDs only: dQw4w9WgXcQ
  • URLs with parameters: https://youtu.be/dQw4w9WgXcQ?si=abcd1234

Output Format

Default output includes timestamps:

# Transcript for https://youtu.be/dQw4w9WgXcQ (Video ID: dQw4w9WgXcQ)

0.00  First line of the transcript
2.50  Second line of the transcript
5.00  Third line of the transcript

Without --no-timestamps flag, plain text output:

# Transcript for https://youtu.be/dQw4w9WgXcQ (Video ID: dQw4w9WgXcQ)

First line of the transcript
Second line of the transcript
Third line of the transcript

Common Workflows

Analyze Video Content

bash
# Fetch transcript
python ${CLAUDE_PLUGIN_ROOT}/skills/yt-transcript/scripts/get_transcript.py "https://youtu.be/VIDEO_ID" --output video.txt

# Now Claude can read and analyze the content

Summarize Multiple Videos

bash
# Fetch all transcripts to one file
python ${CLAUDE_PLUGIN_ROOT}/skills/yt-transcript/scripts/get_transcript.py \
  "https://youtu.be/VIDEO1" \
  "https://youtu.be/VIDEO2" \
  "https://youtu.be/VIDEO3" \
  --output all_transcripts.txt

Extract Quotes or Key Points

bash
# Get clean text without timestamps for easier processing
python ${CLAUDE_PLUGIN_ROOT}/skills/yt-transcript/scripts/get_transcript.py "https://youtu.be/VIDEO_ID" --no-timestamps > clean.txt

Troubleshooting

No Transcript Available

Some videos don't have transcripts available. The script will report:

Error: Could not fetch transcript for: <url>

This can happen when:

  • The video has no captions/subtitles
  • The video is private or restricted
  • The transcript is disabled by the uploader

Transcripts Not Auto-Generated

YouTube auto-generates transcripts for many videos, but not all. If a video has no manual captions and no auto-generated captions, the transcript won't be available.

Rate Limiting

For bulk operations, you may encounter rate limiting. The script fetches one transcript at a time to minimize issues.

Requirements

  • Python 3.8+
  • youtube-transcript-api package
  • Network access to YouTube's transcript servers

Script Options

usage: get_transcript.py [-h] [-o OUTPUT] [--no-timestamps] urls [urls ...]

positional arguments:
  urls                  YouTube video URL(s)

options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        Output file (default: stdout)
  --no-timestamps       Exclude timestamps from output

Examples

Get transcript for analysis

bash
python ${CLAUDE_PLUGIN_ROOT}/skills/yt-transcript/scripts/get_transcript.py "https://www.youtube.com/watch?v=tgbNymZ7vqY" --output talk.txt

Fetch clean text for summarization

bash
python ${CLAUDE_PLUGIN_ROOT}/skills/yt-transcript/scripts/get_transcript.py "https://youtu.be/VIDEO_ID" --no-timestamps > summary_input.txt

Batch process a playlist's videos

bash
# Build URLs from a list of video IDs
for vid in VIDEO_ID1 VIDEO_ID2 VIDEO_ID3; do
  python ${CLAUDE_PLUGIN_ROOT}/skills/yt-transcript/scripts/get_transcript.py "https://youtu.be/${vid}" --output "transcript_${vid}.txt"
done

Expand your agent's capabilities with these related and highly-rated skills.

nibzard/skills-kit

brand-illustrator

Generate Builder Methods hand-drawn line art illustrations (icons, scenes, periphery) with a single accent color (Coral/Teal/Indigo/Amber). Use for blog headers, thumbnails, course graphics, social posts, and on-brand UI/tech metaphors.

2 1
Explore
nibzard/skills-kit

brand-illustrator

Generate Builder Methods hand-drawn line art illustrations (icons, scenes, periphery) with a single accent color (Coral/Teal/Indigo/Amber). Use for blog headers, thumbnails, course graphics, social posts, and on-brand UI/tech metaphors.

2 1
Explore
nibzard/skills-kit

pentest-toolkit

AI-Powered Security Testing Toolkit - Professional penetration testing scripts for discovering vulnerabilities, analyzing application structure, and generating context-aware security tests. All scripts return structured JSON for agent consumption.

2 1
Explore
nibzard/skills-kit

pentest-toolkit

AI-Powered Security Testing Toolkit - Professional penetration testing scripts for discovering vulnerabilities, analyzing application structure, and generating context-aware security tests. All scripts return structured JSON for agent consumption.

2 1
Explore
nibzard/skills-kit

cli-tmux

Use tmux to run and test our interactive CLI/TUI end-to-end. Includes how to start, send keys, capture output, and cleanly stop (double Ctrl+C).

2 1
Explore
nibzard/skills-kit

marimo

Assistant for creating, editing, and debugging reactive Python notebooks with marimo. Use when you need to build marimo notebooks, debug reactive execution, add interactive UI elements, or convert traditional notebooks to marimo format. Provides code patterns, utility functions, and best practices for marimo development.

2 1
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results