From hamel-tools
Manages YouTube channels via CLI: upload videos, list/edit metadata, schedule/unschedule, set thumbnails, download private videos, fetch transcripts, generate AI chapters. Use for YouTube upload, scheduling, editing, downloading, transcribing.
How this skill is triggered — by the user, by Claude, or both
Slash command
/hamel-tools:youtubeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use the `youtube` CLI tool to manage your YouTube channel: upload videos, list uploads, edit metadata, schedule/unschedule publication, set thumbnails, download your own videos (including private ones), get transcripts, and generate AI chapter summaries.
Use the youtube CLI tool to manage your YouTube channel: upload videos, list uploads, edit metadata, schedule/unschedule publication, set thumbnails, download your own videos (including private ones), get transcripts, and generate AI chapter summaries.
Three separate systems:
The YouTube Data API does not have a download endpoint for uploaded video files. Download is handled separately via yt-dlp with authenticated cookies. Transcripts are fetched from YouTube's existing captions (no AI needed). Chapter generation uses Google Gemini.
Create OAuth 2.0 credentials in the Google Cloud Console:
Provide credentials via one of:
# Option A: Place the downloaded JSON file at the default path
cp ~/Downloads/client_secret_*.json ~/.youtube_client_secret.json
# Option B: Set env vars
export YOUTUBE_CLIENT_ID="your_client_id"
export YOUTUBE_CLIENT_SECRET="your_client_secret"
# Option C: Point to your JSON file
export YOUTUBE_CLIENT_SECRETS_FILE="/path/to/client_secret.json"
Then authenticate:
youtube auth
This opens a browser for Google login and saves the token to ~/.youtube_oauth_token.json.
pip install yt-dlp
# or
brew install yt-dlp
| Command | Description |
|---|---|
youtube auth | Authenticate via OAuth 2.0 (opens browser) |
youtube upload | Upload a video with metadata |
youtube list | List your uploaded videos |
youtube update | Edit metadata of an existing video |
youtube schedule | Schedule a private video for future publication |
youtube unschedule | Revert a scheduled video to private draft |
youtube reschedule | Change the scheduled publish time |
youtube set-thumbnail | Set or replace a video thumbnail |
youtube download | Download a video using yt-dlp (supports private videos) |
youtube transcribe | Get transcript of a YouTube video (fetches existing captions) |
youtube chapters | Generate AI chapter summaries using Gemini |
Not supported: youtube delete — deletion is explicitly excluded.
Note:
transcribeandchaptersdo NOT require YouTube OAuth.transcribeworks with any public video.chaptersrequiresGEMINI_API_KEY.
# Upload as private (default)
youtube upload --file video.mp4 --title "My Video" --description "Description here"
# Upload with tags and schedule
youtube upload --file video.mp4 --title "My Video" --tags "tag1, tag2" --publish-at 2026-04-10T16:00:00Z
# Upload as public
youtube upload --file video.mp4 --title "My Video" --privacy public -v
# List recent uploads as a table
youtube list
# List more videos
youtube list -n 50
# Output as JSON
youtube list --json
# Verbose mode (shows tags, category)
youtube list -v
# Update title only
youtube update --id VIDEO_ID --title "New Title"
# Update multiple fields
youtube update --id VIDEO_ID --title "New Title" --description "New desc" --tags "a, b, c"
# Change privacy
youtube update --id VIDEO_ID --privacy unlisted
# Change category
youtube update --id VIDEO_ID --category 28
Safe updates: The tool always fetches the current video first, merges your changes, and sends a complete payload — preserving required fields like
titleandcategoryId.
# Schedule a private video
youtube schedule --id VIDEO_ID --publish-at 2026-04-10T16:00:00Z
# Unschedule back to private draft
youtube unschedule --id VIDEO_ID
# Reschedule to a new time
youtube reschedule --id VIDEO_ID --publish-at 2026-04-11T16:00:00Z
Scheduling rules:
publishAtonly works on private videos that have never been published. You cannot reschedule a previously-public video.
youtube set-thumbnail --id VIDEO_ID --file thumbnail.jpg
By default, youtube download automatically extracts cookies from Chrome for authentication.
This means you just need to be logged into YouTube in Chrome — no manual cookie export needed.
# Download a video (auto-extracts Chrome cookies by default)
youtube download --id VIDEO_ID
# Download by URL
youtube download --url "https://youtu.be/VIDEO_ID"
# Save to specific path
youtube download --id VIDEO_ID -o ~/Downloads/video.mp4
# Use Firefox instead of Chrome
youtube download --id VIDEO_ID --cookies-from-browser firefox
# Specify a custom Chrome profile path
youtube download --id VIDEO_ID --cookies-from-browser "chrome:/path/to/profile"
# Use a cookies.txt file instead
youtube download --id VIDEO_ID --cookies ~/cookies.txt
# Skip cookie extraction (public videos only)
youtube download --id VIDEO_ID --no-cookies
# Choose format
youtube download --id VIDEO_ID -f "bestvideo+bestaudio"
How it works: yt-dlp reads cookies directly from Chrome's cookie database on disk. You must be logged into YouTube in Chrome. No browser window is opened — it reads the stored cookies programmatically. For private videos, the Chrome session must be logged into the account that owns the video.
Fetches existing YouTube captions/subtitles — no AI or OAuth needed. For private/unplayable videos, automatically downloads via yt-dlp (with Chrome cookies) and transcribes locally with Whisper.
# Get transcript by URL
youtube transcribe "https://youtu.be/VIDEO_ID"
# Get transcript by video ID
youtube transcribe VIDEO_ID
# Timestamps in seconds format
youtube transcribe "https://youtu.be/VIDEO_ID" --seconds
# Transcribe a local video file (uses Whisper — supports mp4, webm, mkv, etc.)
youtube transcribe video.mp4
# Private videos work too (auto-downloads with Chrome cookies, then transcribes locally)
youtube transcribe "https://youtu.be/PRIVATE_VIDEO_ID"
# Save to file
youtube transcribe "https://youtu.be/VIDEO_ID" > transcript.txt
Uses Google Gemini to generate chapter summaries with timestamps.
# Generate chapters for a YouTube video
youtube chapters "https://youtu.be/VIDEO_ID"
# Generate chapters for a local MP4
youtube chapters video.mp4
Requires:
GEMINI_API_KEYenvironment variable. Get one at https://aistudio.google.com/apikey
| Option | Short | Description |
|---|---|---|
--verbose | -v | Show progress and debug info |
| Option | Short | Description |
|---|---|---|
--file | -f | Path to video file (required) |
--title | -t | Video title (required) |
--description | -d | Video description |
--tags | Comma-separated tags | |
--category | YouTube category ID (default: 22) | |
--privacy | -p | public, private, unlisted (default: private) |
--publish-at | ISO 8601 timestamp for scheduling |
| Option | Short | Description |
|---|---|---|
--id | Video ID (required) | |
--title | -t | New title |
--description | -d | New description |
--tags | New comma-separated tags (replaces existing) | |
--category | New category ID | |
--privacy | -p | New privacy status |
| Option | Short | Description |
|---|---|---|
--id | YouTube video ID | |
--url | -u | YouTube video URL |
--output | -o | Output file path |
--cookies | Path to cookies.txt file | |
--cookies-from-browser | Browser name or path (default: chrome). Examples: chrome, firefox, chrome:/path/to/profile | |
--format | -f | yt-dlp format string |
--no-cookies | Skip automatic cookie extraction |
| Variable | Description |
|---|---|
YOUTUBE_CLIENT_ID | OAuth 2.0 client ID |
YOUTUBE_CLIENT_SECRET | OAuth 2.0 client secret |
YOUTUBE_CLIENT_SECRETS_FILE | Path to client secret JSON (default: ~/.youtube_client_secret.json) |
YOUTUBE_TOKEN_FILE | Path to stored OAuth token (default: ~/.youtube_oauth_token.json) |
GEMINI_API_KEY | Google Gemini API key (required only for youtube chapters) |
hamel package must be installed: pip install hamelyt-dlp must be installed separatelyGEMINI_API_KEY environment variable must be setopenai-whisper and ffmpeg are needed"No OAuth credentials found": Set YOUTUBE_CLIENT_ID and YOUTUBE_CLIENT_SECRET env vars (or place a client_secret JSON file at ~/.youtube_client_secret.json), then run youtube auth.
"Token refresh failed": Your OAuth token has expired. Run youtube auth again to re-authenticate.
"yt-dlp not found": Install with pip install yt-dlp or brew install yt-dlp.
"Video not found or not accessible": Check the video ID is correct and that your authenticated account has access.
"Could not find browser cookies database": Chrome is not at the default location. Specify the profile path: --cookies-from-browser 'chrome:/path/to/profile', or use Firefox: --cookies-from-browser firefox.
"Authentication required for this video": You need to be logged into YouTube in Chrome. Open Chrome, go to youtube.com, sign in, then retry the download.
Scheduling fails: Only private videos that have never been published can be scheduled. If the video was previously public, scheduling will not work.
If you're starting from scratch on a new machine:
pip install hamelpip install yt-dlpexport YOUTUBE_CLIENT_ID='your-client-id.apps.googleusercontent.com'
export YOUTUBE_CLIENT_SECRET='your-client-secret'
youtube auth (opens browser for one-time Google login)youtube list (should show your uploads)youtube download --id VIDEO_IDyoutube transcribe "https://youtu.be/VIDEO_ID" (no extra setup needed)GEMINI_API_KEY env var, then youtube chapters "https://youtu.be/VIDEO_ID"npx claudepluginhub hamelsmu/hamel --plugin hamel-toolsProcesses videos: download, trim, silence removal, audio extraction, transcription (Whisper), captions, speed change, concatenation, audio enhancement, upload to YouTube/Bunny.net, social posts. Requires ffmpeg, yt-dlp, and API keys.
Automates YouTube tasks: upload videos, manage playlists, search content, retrieve analytics, handle comments via Composio toolkit and Rube MCP. Requires active connection.
Automate YouTube tasks via Composio MCP: upload/manage videos, search content, get analytics, and handle comments. Always searches tools first for current schemas.