---
name: youtube
description: "YouTube content: transcripts, summaries, analysis, notes, and action plans — merged from youtube-content + youtube-content-analysis."
version: 1.0.0
author: Hermes Agent
license: MIT
platforms: [linux, macos, windows]
metadata:
  hermes:
    tags: [youtube, transcripts, video-analysis, content-extraction, summarization]
    related_skills: [obsidian]
triggers:
  - "Summarize this YouTube video"
  - "Get the transcript for [URL]"
  - "Analyze the content of this video"
  - "Extract text from this YouTube link"
  - "Turn this video into blog post / thread / notes"
---

# YouTube Content Tool

Extract transcripts from YouTube videos and convert them into useful formats — summaries, chapters, threads, blog posts, action plans.

## Triggers
Use when the user shares a YouTube URL or video link, asks to summarize a video, requests a transcript, or wants to extract and reformat content from any YouTube video.

## Workflow

### 1. Extraction Strategy
- **Primary**: Attempt `web_extract` for direct markdown/text content.
- **Secondary**: If `web_extract` fails or returns empty, use `browser_navigate` to the URL.
- **Tertiary (Transcript)**: Use `youtube-transcript-api` or browser-based transcript extraction.

### 2. Helper Script
The skill directory contains a script that accepts any standard YouTube URL format, short links (youtu.be), shorts, embeds, live links, or a raw 11-character video ID:

```bash
# JSON output with metadata
uv run python3 SKILL_DIR/scripts/fetch_transcript.py "https://youtube.com/watch?v=VIDEO_ID"
```

### 3. Analysis
- Summarize key points
- Extract specific entities, technical terms, or actionable items
- Cross-reference with other research if required
- Convert to chapters with timestamps
- Reform as thread, blog post, or notes

## Tips
- **Empty Extraction**: `web_extract` often fails on YouTube due to dynamic loading. Fall back to `browser_navigate` + `browser_snapshot`/`browser_console`.
- **Transcript Panel State**: The transcript panel is NOT open by default. You MUST explicitly click the "Show transcript" button before scraping transcript segments.
- **Bot Detection**: YouTube is aggressive against headless browsers. If navigation fails, provide a proxy or manual intervention.
- **Dynamic Ref IDs**: Element `ref` IDs (e.g., `@e179`) are transient per session. Use text-based selectors or `browser_console` with `document.querySelector`.

## Output Formats
- **Summary**: Key points in 3-5 bullet sentences
- **Chapters**: Timestamped sections with titles
- **Thread**: Twitter/X thread format
- **Blog post**: Full article with intro/body/conclusion
- **Notes**: Structured markdown notes
- **Action plan**: Extractable tasks, code snippets, learnings

## Pitfalls
- Don't skip the secondary browser-based transcript extraction if `web_extract` returns empty — YouTube requires JS rendering
- Always fallback to `browser_navigate` + `browser_console` for dynamic content
- Check for browser_navigate availability before depending on it

## References
- `references/youtube-scraping-patterns.md` — Common DOM selectors and JS snippets for transcript extraction (from original youtube-content-analysis skill)
