Subhadip Sarkar

YouTube Transcript (yt-dlp captions)

Data Analysisv1.0.5
By Subhadip SarkarUpdated 2026-05-176 versions · latest released 2026-02-14youtube-transcript-yt-dlp@clawhub_itzsubhadip/youtube-transcript-yt-dlp
Web Scraping#Sqlite

According to AlphaMoat, as of 2026-09, YouTube Transcript (yt-dlp captions) has 3,713 downloads and 0 stars — ranked #2,885 of 5,078 AI skills overall, and #219 of 399 in Data Analysis.

Installs
118
Downloads
3.7K
Stars
-
Overall Rank
#2,885
Top 57% overall · Top 55% in Data Analysis
PlatformInstallsDownloadsStarsComments
ClawHub ↗1183.7K--
SkillHub ↗1173.7K-—

Platforms count differently and update at different times.

What this skill does

It uses yt-dlp, preferring manual subtitles before auto-generated captions, and may try YouTube’s transcript panel when captions are unavailable. The primary says this version does not call third-party transcript providers and contacts YouTube directly. Treat any cookies file as a secret.

Profile published 2026-10-29

What you can do with it

  • Turn existing YouTube captions into text for summarization or search
  • Keep timestamps or cache results when needed

When to use it

  • When the user provides a YouTube link and needs caption text or input for a summary

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Explain how this skill obtains text from existing captions and what happens when captions are unavailable; do not access the video.

Monthly Trend

Downloads3.7K
1.8K2.8K3.9K2026-03 · Downloads 1.9K2026-05 · Downloads 2.9K2026-06 · Downloads 3.1K2026-07 · Downloads 3.4K2026-08 · Downloads 3.6K2026-09 · Downloads 3.7K26-0326-09
Stars-
0112026-03 · Stars -2026-05 · Stars -2026-06 · Stars -2026-07 · Stars -2026-08 · Stars -2026-09 · Stars -26-0326-09

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-093.7K—-
2026-083.6K+5.3%-
2026-073.4K+10.3%-
2026-063.1K+5.5%-
2026-052.9K—-
2026-031.9K—-

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

3.8 KB · ClawHub v1.0.5
---
name: yt_transcript
description: Extract YouTube video transcripts from existing captions (manual or auto-generated) using yt-dlp, with optional timestamps and local SQLite caching. Use when the user asks for a YouTube transcript, captions, subtitles, or wants to turn a YouTube link into text for summarization/search.
metadata: {"openclaw":{"requires":{"bins":["python3","yt-dlp"]},"os":["linux","darwin","win32"]}}
user-invocable: true
---

# YouTube Transcript (Captions-Only)

This skill extracts transcripts from **existing** YouTube captions.
Show all (95 lines)

**Primary behavior**
- Prefer **manual subtitles** when available.
- Fall back to **auto-generated captions**.
- Output either:
  - **JSON** segments (default) or
  - **plain text** (`--text`)
- Cache results locally in **SQLite** for speed.

**Reliability behavior**
- If YouTube blocks anonymous access (bot-check), provide **cookies.txt**.
- If `yt-dlp` reports no captions for a video, the script tries a fallback:
  1) YouTube’s **transcript panel** (youtubei `get_transcript`) when accessible

This published version intentionally **does not** call third-party transcript providers.

**Privacy note:** This published version only contacts YouTube directly (via `yt-dlp` and the transcript panel fallback). It does **not** send video IDs/URLs to third-party transcript providers.

**Cookies:** Cookies are treated as secrets.
- The script supports `--cookies` / `YT_TRANSCRIPT_COOKIES`, but does **not** auto-load cookies from inside the skill directory.
- Store cookies under `~/.config/yt-transcript/`.

**Path safety:** This skill restricts `--cookies` and `--cache` paths to approved directories.
- cookies allowed under: `~/.config/yt-transcript/`
- cache allowed under: `{baseDir}/cache/` and `~/.config/yt-transcript/`

## How to run

Script path:
- `{baseDir}/scripts/yt_transcript.py`

Typical usage:
- `python3 {baseDir}/scripts/yt_transcript.py <youtube_url_or_id>`
- `python3 {baseDir}/scripts/yt_transcript.py <url> --lang en`
- `python3 {baseDir}/scripts/yt_transcript.py <url> --text`
- `python3 {baseDir}/scripts/yt_transcript.py <url> --no-ts`

Cookies (optional, but often required on VPS IPs):
- `python3 {baseDir}/scripts/yt_transcript.py <url> --cookies /path/to/youtube-cookies.txt`
- or set env var: `YT_TRANSCRIPT_COOKIES=/path/to/youtube-cookies.txt`

**Publishing safety note:** Cookies are optional, so `YT_TRANSCRIPT_COOKIES` is intentionally **not required** by skill metadata. Only set it if you need authenticated access.

**Best practice:** store cookies **outside** the skill folder (so you never accidentally publish them), e.g. `~/.config/yt-transcript/youtube-cookies.txt`, and point to it via `--cookies` or `YT_TRANSCRIPT_COOKIES`.

## What the script returns

### JSON mode (default)
A JSON object:
- `video_id`: 11-char id
- `lang`: chosen language
- `source`: `manual` | `auto` | `panel`
- `segments`: list of `{ start, duration, text }` (or text-only when `--no-ts`)

### Text mode (`--text`)
A newline-separated transcript.
- By default timestamps are included as `[12.34s]`.
- Use `--no-ts` to output only the text lines.

## Caching

Default cache DB:
- `{baseDir}/cache/transcripts.sqlite`

Cache key includes:
- `video_id`, `lang`, `source`, `include_timestamp`, `format`

## Cookie handling (important)

- Cookies must be in **Netscape cookies.txt** format.
- Treat cookies as **secrets**.
- **Never commit / publish cookies** to ClawHub.

Recommended local path (ignored by git/publish):
- `{baseDir}/cache/youtube-cookies.txt` (chmod 600)

## Notes (safety + reliability)

- Only accept a YouTube URL or an 11-character video ID.
- Do not forward arbitrary user-provided flags into the command.
- If `yt-dlp` is missing, instruct the user to install it (recommended):
  - install pipx
  - `pipx install yt-dlp`
  - ensure `yt-dlp` is on PATH

Popular in Data Analysis

Data month: 2026-09 · Downloads, stars and installs are aggregated monthly from public skill registries (ClawHub, SkillHub). See methodology.