---
name: ytx
description: Fetch a YouTube video transcript. Use when the user shares a YouTube URL or video ID and wants the transcript, captions, or subtitles.
argument-hint: <url-or-video-id> [-t] [-l lang]
allowed-tools: Bash(ytx *)
---

Fetch the transcript for the given YouTube video using the `ytx` CLI.

## Usage

```
ytx $ARGUMENTS
```

If the user just provides a URL/ID with no flags, default to stdout (no `-o`). Pass `-t` if they want timestamps, `-l <code>` for a specific language.

## Handling results

- If the transcript is long, summarize it or present key points unless the user asked for the full text.
- If the user asked to save it, use `-o <path>` or write the output to a file.
- On error, report the error message and suggest fixes (e.g., wrong video ID, no captions available, try a different language with `-l`).
