stets avatar

youtube-summarize

Summarize YouTube videos by extracting and analyzing their transcripts. Use when a user shares a You

提供方 stets|开源

YouTube Summarize Skill for Claude Code

A Claude Code skill that extracts transcripts from YouTube videos and generates intelligent summaries. Summaries can be saved to an Obsidian vault and previewed in your browser.

What is a Claude Code Skill?

Skills are reusable capabilities you can add to Claude Code. They extend what Claude can do by providing specialized workflows, scripts, and context. Learn more:

Tip: You can use the /skill-creator skill in Claude Code to help create or modify skills interactively!

Features

  • Extract transcripts from any YouTube video (including Shorts)
  • Support for 100+ languages
  • Multiple output formats: plain text, timestamped, or JSON
  • Generates summaries based on your needs (TLDR, key points, detailed explanation)
  • Saves summaries to an Obsidian vault with proper frontmatter
  • Opens a styled HTML preview in your browser

Installation

  1. Clone this repository into your Claude Code skills directory:
git clone https://github.com/stets/nifty_claude_skills.git ~/.claude/skills/youtube-summarize
  1. Set up the Python virtual environment and install dependencies:
cd ~/.claude/skills/youtube-summarize
python3 -m venv venv
source venv/bin/activate
pip install youtube-transcript-api
  1. (Optional) Customize the Obsidian vault path in scripts/save_summary.py:
# Edit this line to point to your preferred location
VAULT_PATH = Path.home() / "Documents" / "YouTube-Summaries"

Usage

Once installed, simply share a YouTube URL with Claude Code and ask it to summarize:

Claude will automatically:

  1. Extract the video transcript
  2. Generate a summary based on your request
  3. Save it to your Obsidian vault
  4. Open a styled preview in your browser

Customization

Obsidian Vault Location

Edit scripts/save_summary.py and change the VAULT_PATH variable to your preferred directory:

VAULT_PATH = Path.home() / "path" / "to" / "your" / "vault"

Disable Features

When invoking the save script, you can disable features:

  • --no-save: Skip saving to Obsidian vault
  • --no-preview: Skip opening browser preview

Supported URL Formats

  • youtube.com/watch?v=VIDEO_ID
  • youtu.be/VIDEO_ID
  • youtube.com/shorts/VIDEO_ID
  • youtube.com/embed/VIDEO_ID
  • Direct video IDs

Error Handling

ErrorCauseSolution
TranscriptsDisabledVideo has no captionsCannot extract - inform user
NoTranscriptFoundNo transcript in requested languageTry without specifying language
VideoUnavailablePrivate/deleted videoVideo cannot be accessed

Creating Your Own Skills

Want to create your own Claude Code skills? Use the Skill Creator skill:

/skill-creator

This will guide you through creating effective skills that extend Claude's capabilities.

License

MIT