# Youtube Script

> |

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

## Install

```sh
agentstack add skill-jesamkim-oh-my-skills-youtube-script
```

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

## About

# YouTube Transcript Extractor

Extract subtitles/captions from YouTube videos using the `youtube_transcript_api` library.

## Prerequisites

The skill uses a bundled Python script that requires `youtube_transcript_api`.
Check if the package is available:

```bash
pip show youtube-transcript-api 2>/dev/null || pip install youtube-transcript-api
```

If a known working venv exists at `~/QCLI/youtube-script/venv/`, use that Python directly:
```bash
~/QCLI/youtube-script/venv/bin/python ${SKILL_DIR}/scripts/extract_transcript.py 
```

## Workflow

### Step 1: Parse the YouTube URL

Extract the video ID from the URL. Supported formats:
- `https://www.youtube.com/watch?v=VIDEO_ID`
- `https://youtu.be/VIDEO_ID`
- `https://www.youtube.com/embed/VIDEO_ID`
- URLs with additional parameters (playlist, timestamp, etc.)

### Step 2: Run the extraction script

```bash
python ${SKILL_DIR}/scripts/extract_transcript.py  [OPTIONS]
```

Options:
- `--language` / `-l`: Preferred language code (default: auto-detect). Examples: `ko`, `en`, `ja`
- `--output` / `-o`: Output file path (default: `{video_id}_transcript.txt` in CWD)
- `--with-timestamps`: Include timestamps in output
- `--json`: Output as JSON with timestamps and metadata

The script tries to fetch captions in this order:
1. Manual captions in the preferred language
2. Auto-generated captions in the preferred language
3. Any available captions (fallback)

### Step 3: Report results

After extraction, report:
- Video ID
- Language detected
- Character count / word count
- Output file path
- First ~200 characters as preview

If the transcript is needed for further processing (e.g., enriching lecture notes, summarizing),
read the saved file and proceed with the downstream task.

## Error Handling

- **No captions available**: Some videos have captions disabled. Inform the user and suggest
  alternatives (e.g., downloading audio and using Whisper via `/yonsei transcribe`).
- **Video unavailable**: Private, deleted, or age-restricted videos may fail. Report the error clearly.
- **Rate limiting**: If YouTube blocks requests, wait and retry once after a short delay.

## Examples

**Example 1: Basic extraction**
```
User: "이 유튜브 영상 스크립트 뽑아줘 https://youtu.be/Z6-QSTia1tY"
→ Run extract_transcript.py with the URL
→ Save to Z6-QSTia1tY_transcript.txt
→ Report: language, length, preview
```

**Example 2: With specific language**
```
User: "Extract the English transcript from https://www.youtube.com/watch?v=abc123"
→ Run with --language en
→ Save and report
```

**Example 3: For lecture note enrichment**
```
User: "이 유튜브 영상 내용을 Week 3 노트에 추가해줘 https://youtu.be/xyz"
→ Extract transcript
→ Read transcript content
→ Summarize key points
→ Add to the relevant notes file
```

## Source & license

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

- **Author:** [jesamkim](https://github.com/jesamkim)
- **Source:** [jesamkim/oh-my-skills](https://github.com/jesamkim/oh-my-skills)
- **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-jesamkim-oh-my-skills-youtube-script
- Seller: https://agentstack.voostack.com/s/jesamkim
- 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%.
