К основному содержанию
команда CX Codex

youtube — команда для Claude Code: что делает и как установить

Извлекает расшифровку, метаданные и популярные комментарии YouTube, затем сохраняет сводку в Obsidian. Флаг --visual добавляет анализ кадров.

MIT ★ 5 412 обновлён 2026-10-24

Установить в Claude Code · Через маркетплейс плагинов Все способы и платформы ↓
/plugin marketplace add eugeniughelbur/obsidian-second-brain
/plugin install obsidian-second-brain@obsidian-second-brain
Открыть на GitHub

Что делает youtube

Команда принимает ссылку на YouTube или ID видео, получает расшифровку через youtube-transcript-api и сохраняет заметку в Research/YouTube/YYYY-MM-DD - <video-title-slug>.md. При заданном YOUTUBE_API_KEY она также забирает название, канал, просмотры, лайки и популярные комментарии. Для сводки использует Gemini с GEMINI_API_KEY, а при его отсутствии — Grok.

Флаг --visual скачивает видео через yt-dlp в качестве до 720p и выбирает кадры по смене сцен с помощью ffmpeg, а не через фиксированный интервал. Ключевые кадры попадают в заметку и остаются на диске. Без yt-dlp и ffmpeg в PATH визуальный слой пропускается, но текстовая сводка всё равно сохраняется. Команда рассчитана на заметки Obsidian и добавляет данные для последующих запросов Dataview.

Какие задачи решает

  • собрать расшифровку YouTube-видео в заметку
  • сохранить сводку видео в хранилище Obsidian
  • получить метаданные и популярные комментарии
  • разобрать содержимое слайдов, интерфейса и демонстраций по кадрам

Примеры запросов агенту

  • Сделай сводку видео по ссылке [url] и сохрани её в хранилище.
  • Посмотри, что показано в этом видео: /youtube [url] --visual.
  • Извлеки расшифровку и ключевые мысли из видео через /youtube [url].

Как установить youtube

1Через маркетплейс плагинов

/plugin marketplace add eugeniughelbur/obsidian-second-brain
/plugin install obsidian-second-brain@obsidian-second-brain

2Вручную: положить файлы

.claude/commands/youtube.md

Вызов — /youtube. Для всех проектов — ~/.claude/commands/

Вопросы о youtube

Как установить youtube в Claude Code?

Выполните /plugin marketplace add eugeniughelbur/obsidian-second-brain и затем /plugin install obsidian-second-brain@obsidian-second-brain в Claude Code.

Что делает команда youtube?

Она извлекает расшифровку, метаданные и популярные комментарии YouTube, отправляет материалы на сводку через Gemini или Grok и сохраняет результат в заметке Obsidian.

Что нужно для режима --visual?

В PATH должны быть yt-dlp и ffmpeg. Их можно установить командой brew install yt-dlp ffmpeg; при сбое загрузки визуальный анализ пропускается.

Исходный текст

youtube.md · MIT
---
description: Extract transcript, metadata, and top comments from a YouTube video - summarized via Gemini (free tier) or Grok and saved to vault. Add --visual to also read the video's frames (scene detection)
category: research
triggers_en: ["summarize youtube", "youtube transcript", "extract video", "youtube to vault", "watch this video", "what's on screen in this video"]
triggers_de: ["YouTube zusammenfassen", "YouTube-Transkript", "Video auswerten", "YouTube in den Vault", "dieses Video ansehen", "was ist in diesem Video auf dem Bildschirm"]
triggers_es: ["resume este vídeo de youtube", "transcripción de youtube", "extrae este vídeo", "youtube al vault", "mira este vídeo", "qué se ve en este vídeo"]
triggers_pt: ["resuma este vídeo do youtube", "transcrição do youtube", "extraia este vídeo", "youtube para o vault", "assista a este vídeo", "o que aparece neste vídeo"]
triggers_zh: ["总结这个 YouTube 视频", "提取视频字幕", "把这个视频整理进知识库", "这个视频讲了什么", "看看视频画面里有什么"]
---

Use the obsidian-second-brain skill. Execute `/youtube [url] [--visual]`:

1. Resolve the YouTube URL or video ID from the user's argument. Accept any of: full URL (`https://www.youtube.com/watch?v=...`), `https://youtu.be/...`, `https://www.youtube.com/shorts/...`, or just the 11-character video ID. If no input given, ask: "Which YouTube video?"

2. Run the script from the skill root (its absolute path was given at session start as **Skill root**; substitute it for `SKILL_ROOT`):
   ```bash
   uv run --directory "SKILL_ROOT" -m scripts.research.youtube_extract "<url-or-id>"
   ```
   Add `--visual` when the user wants the video watched, not just transcribed (demos, whiteboards, slides, UI walkthroughs, b-roll, "what's on screen"). Optional `--max-frames N` caps how many frames are read (default 24):
   ```bash
   uv run --directory "SKILL_ROOT" -m scripts.research.youtube_extract "<url-or-id>" --visual
   ```

3. The script:
   - Extracts the transcript via `youtube-transcript-api` (free, no API key).
   - If `YOUTUBE_API_KEY` is set, also fetches title, channel, view/like counts, top comments. Otherwise skips metadata silently.
   - Sends the transcript (and optional comments) for AI-first summarization: Gemini (`gemini-2.5-flash`, generous free tier) when `GEMINI_API_KEY` is set, otherwise Grok; a Gemini failure falls back to Grok automatically.
   - Returns: TL;DR, Key Points, Notable Quotes, Themes & Topics, Comment Sentiment, Worth Following Up On.
   - With `--visual`: downloads the video (yt-dlp, <=720p) and extracts one frame per scene change (ffmpeg scene detection, not a fixed timer), so visual substance is captured. Hero frames are copied into the vault and embedded in the note; the full keyframe set is left on disk for you to read. Requires `yt-dlp` and `ffmpeg` on PATH (`brew install yt-dlp ffmpeg`). If either is missing or download fails, the visual layer is skipped with a warning and the transcript summary still saves.

4. Show the script output verbatim to the user.

5. **Default save behavior: saves automatically.** AI-first note written to `Research/YouTube/YYYY-MM-DD - <video-title-slug>.md`. Frontmatter includes video ID, channel, view counts, `visual`, `frame-count`, etc. for future Dataview queries.

6. **If `--visual` was used:** the script prints a `FRAMES-FOR-CLAUDE` JSON block (to stderr) listing each extracted keyframe with its timestamp and local path, plus the saved note path. Do this:
   - Read each frame image with the read-files tool (they are local JPGs). This is your own vision doing the watching - there is no extra vision-API call.
   - Then edit the saved note: replace the `<!-- CLAUDE: ... -->` comment in the `## Visual notes` section with a concise, timestamp-keyed reading of what the frames add over the transcript: on-screen text, code, diagrams, slides, UI, demos, b-roll, scene transitions. Cross-reference the Summary; do not restate the audio.
   - Keep the `## Visual timeline` hero-frame embeds intact.
   - If `--max-frames` is high and reading every frame would be excessive, read the hero frames plus an even sample across the timeline, and say in the note that you sampled.

7. Plain English triggers: "summarize this YouTube video", "what's in this video", "extract this YouTube link", "transcribe this video", "watch this video", "what's on screen", or just pasting a YouTube URL with a question about content. When the ask is about what is *shown* (not just said), use `--visual`.

8. If the video has no captions (transcript unavailable) AND no metadata (no API key), the script will fail with a clear message - surface it. Suggest the user picks a different video, adds a `YOUTUBE_API_KEY`, or tries `--visual` (which can read the video even without captions).

9. If the user asks to research something mentioned in the "Worth Following Up On" section, route that to `/research [topic]`.

---

**AI-first rule:** Every note created or updated by this command MUST follow `references/ai-first-rules.md` - `## For future agent` preamble, rich frontmatter (`type`, `date`, `tags`, `ai-first: true`, plus type-specific fields), recency markers per external claim, mandatory `[[wikilinks]]` for every person/project/concept referenced, sources preserved verbatim with URLs inline, and confidence levels where applicable. If that path does not resolve from your working directory, search upward for it; if you still cannot read it, say so before writing rather than producing a note that silently skips the rule. The vault is for future agent retrieval - not human reading.

**Anti-fabrication:** Search exhaustively before claiming any note, person, or file is absent - false absence is the most common failure mode - and never invent facts, entities, or dates (mark unknowns as `TBD`). See the anti-fabrication and search-completeness hard rules in `references/ai-first-rules.md`.

© Eugeniu Ghelbur · MIT · eugeniughelbur/obsidian-second-brain

Похожие слэш-команды

Все слэш-команды по теме «Наука и исследования» →
youtube-transcript glebis Скилл youtube-transcript извлекает субтитры и метаданные видео с YouTube, сохраняет в Markdown с YAML-заголовком в хранилище Obsidian. CX Codex +1 258установок youtube-fetcher JimmySadek Скилл youtube-fetcher для Claude Code и ещё пяти агентных сред достаёт субтитры и распознаёт речь из видео. По голой ссылке на ролик сохраняет заметку для Obsidian, а вопрос по содержанию разбирает без записи файла. CX Codex +1 ★ 546звёзд репо youtube-notes Nick Nisi Скилл youtube-notes для Claude Code превращает субтитры YouTube в заметки по главам со ссылками на таймкоды. Подключается к ссылке на YouTube или просьбе разобрать видео. CX Codex +1 ★ 114звёзд репо YouTube Research MCP coyaSONG MCP-сервер YouTube Research MCP для Claude Code и других агентов: достаёт из YouTube-ролика нужный фрагмент с таймкодом и прямой ссылкой на момент. Агент забирает цитату, а не весь транскрипт. CX Codex +1 ★ 27звёзд репо youtube-seo illyism Скилл youtube-seo для Claude Code превращает записи видео в заголовки, описания с таймкодами 00:00 и посты для соцсетей. CX Codex +1 404установок youtube-full therohitdas Плагин youtube-full для Claude Code: достаёт транскрипты видео, ищет ролики, читает плейлисты и отслеживает новые выпуски каналов через RSS. Ключи не нужны — работает на yt-dlp и youtube-transcript-api. ★ 30 251звёзд репо

Из того же набора51

Весь набор →
obsidian-retrieval-eval Команда obsidian-retrieval-eval оценивает качество поиска по хранилищу Obsidian метриками recall@k и MRR. Помогает проверить алгоритм ранжирования на реальных вопросах до внедрения векторных баз. CX Codex +1 ★ 5 412звёзд репо obsidian-projects Команда obsidian-projects для Claude Code собирает статус проектов из заметок Obsidian, Git и локальных документов. Она запускается по запросу обзора проектов или статуса конкретного проекта. CX Codex +1 ★ 5 412звёзд репо obsidian-brainstorm Команда obsidian-brainstorm для многоходового интервью об идее: агент задаёт вопросы по одному, пока идея не сойдётся, потом пишет дизайн-ноту с вариантами и рекомендацией. Подходит, если нужно продумать концепцию вместе, а не одним ударом. CX Codex +1 ★ 5 412звёзд репо podcast Команда podcast извлекает метаданные, расшифровку и саммари эпизода подкаста, сохраняя готовую заметку в хранилище Obsidian. CX Codex +1 ★ 5 412звёзд репо obsidian-architect Команда obsidian-architect сканирует проект и генерирует набор архитектурных заметок в хранилище: обзор, заметки по модулям, ключевые решения. Переустановка обновит документацию без потери ваших правок. CX Codex +1 ★ 5 412звёзд репо obsidian-reconcile Команда obsidian-reconcile для Claude Code выявляет противоречия в Obsidian-vault и разрешает их автоматически или выносит на решение. Сканирует всё хранилище или отдельную тему, сверяя утверждения и свежесть источников. CX Codex +1 ★ 5 412звёзд репо obsidian-visualize Команда obsidian-visualize строит интерактивную карту вашего хранилища Obsidian: показывает, как связаны заметки, находит центральные узлы и выявляет изолированные записи. Полезна, чтобы увидеть структуру своей второй мозг целиком. CX Codex +1 ★ 5 412звёзд репо obsidian-distill Команда obsidian-distill сжимает длинную заметку или статью до списка тезисов, каждый с отметкой, откуда он взят — параграф, секция или timestamp. CX Codex +1 ★ 5 412звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой