# Youtube Transcript

> Search YouTube for relevant videos by topic, and/or pull a clean text transcript from any YouTube video or Short by URL, so the model can actually read/process a video instead of just its title. Use whenever a YouTube link needs to be watched, summarized, fact-checked, or turned into notes — and whenever the user wants the agent to FIND videos itself ("найди видео про X", "поищи на ютубе", "find…

- **Type:** Skill
- **Install:** `agentstack add skill-grigorytal-youtube-transcript-skill-youtube-transcript-skill`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [grigorytal](https://agentstack.voostack.com/s/grigorytal)
- **Installs:** 0
- **Category:** [Content & Media](https://agentstack.voostack.com/c/content-and-media)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [grigorytal](https://github.com/grigorytal)
- **Source:** https://github.com/grigorytal/youtube-transcript-skill

## Install

```sh
agentstack add skill-grigorytal-youtube-transcript-skill-youtube-transcript-skill
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# YouTube transcript & search

Two capabilities, both backed by `yt-dlp`, no API key and no quota:

1. **Search** YouTube by topic → ranked candidate list (find videos yourself).
2. **Transcribe** a known URL → clean plain text (read a video).

The natural pipeline: `search.sh "topic"` → pick the relevant hits → `get_transcript.sh` on each → summarize / give verdicts.

The point: an agent that can only see a video's *title* is guessing. With this it reads what was actually said, so "watch these 20 videos and tell me which are worth my time" becomes a real instruction.

## Requirements

`yt-dlp` must be on `PATH`:

```bash
brew install yt-dlp        # macOS
pipx install yt-dlp        # anything with Python
```

Keep it fresh — YouTube changes things and a stale `yt-dlp` starts failing (`brew upgrade yt-dlp` / `pipx upgrade yt-dlp`).

## Search

```bash
/search.sh "" [count] [today|week|month|year]
```

- `query` – free-text topic, quote it. Works in any language (Cyrillic fine).
- `count` – how many results (default 10).
- `when` – optional freshness window. Omit for relevance, all-time.

Output: a numbered list, each entry = title, then `channel · duration · views` (and the upload date when a window is set), then the full `youtube.com/watch?v=…` URL on its own line (ready to pipe into `get_transcript.sh`).

Two modes:
- **No window** → relevance order, flat & fast, no dates shown.
- **With window** (`today`/`week`/`month`/`year`) → uses YouTube's own `sp=` upload-date filter and full extraction, so real upload dates appear. Slightly slower (worth it — that's the point of asking for fresh). Use this for "what's new in this niche" sweeps.

Note: `ytsearchdate` is unsupported in many packaged `yt-dlp` builds, so freshness goes through the `sp=` filter instead — which is richer anyway (time windows, not just sort).

## Transcribe

```bash
/get_transcript.sh [--save] "" [sub-langs]
```

**Prefer `--save` when you (the agent) will read the transcript.** Without it the full transcript streams to stdout, and a long one (tens of KB) gets spilled by the harness into a random-hash file that's awkward to track. With `--save` the script writes to `/.cache/ [].txt` and prints only a short summary plus that path, so you then `Read` a file named after the actual video. It doubles as a cache: re-running the same URL rewrites the same well-named file.

- `url` – full video or Short URL (`youtu.be/…`, `youtube.com/watch?v=…`, `youtube.com/shorts/…`).
- `sub-langs` – optional `yt-dlp --sub-langs` override. **By default no language is needed:** the script reads the video's original audio language from YouTube metadata (`%(language)s`) and fetches that track, preferring the original `-orig` captions over auto-translations. If metadata has no language, it falls back to a Cyrillic-in-title heuristic (→ `ru`), then English. Pass a spec (e.g. `ru.*,ru` or `.*`) only to force something.

Output: a header line (`title · channel`), the URL, a blank line, then the transcript as one flowing text block. Exit code `2` + `NO_SUBTITLES` on stderr means the video has no captions at all — retry with an explicit `--sub-langs ".*"`.

## Notes

- Auto-generated captions have no punctuation-perfect formatting; the cleaner strips timestamps, inline tags, and rolling duplicate lines, but the text stays spoken-language rough. Good enough to read and summarize, not a polished quote source.
- Works on any video that has captions — including auto-generated ones, which is most of YouTube. Videos with captions disabled entirely are the exception, and the script tells you so instead of failing silently.
- This is for **reading** YouTube content. Transcribing arbitrary audio files is a different job — use a speech-to-text tool for that.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [grigorytal](https://github.com/grigorytal)
- **Source:** [grigorytal/youtube-transcript-skill](https://github.com/grigorytal/youtube-transcript-skill)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-grigorytal-youtube-transcript-skill-youtube-transcript-skill
- Seller: https://agentstack.voostack.com/s/grigorytal
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
