home / skills / idanbeck / claude-skills / youtube-skill

youtube-skill skill

/youtube-skill

This skill helps you manage YouTube content by uploading videos, playlists, searches, and comments across channels.

npx playbooks add skill idanbeck/claude-skills --skill youtube-skill

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
2.5 KB
---
name: youtube-skill
description: Manage YouTube videos, playlists, and channels. Use when the user asks to upload videos, manage playlists, search YouTube, or interact with comments.
allowed-tools: Bash, Read
---

# YouTube Skill

Upload videos, manage playlists, search, and interact with YouTube.

## Setup

Uses Google OAuth (same as gmail-skill). Enable **YouTube Data API v3** in your Google Cloud project.

If you have gmail-skill set up, this should work. Otherwise:
1. Enable YouTube Data API v3 at console.cloud.google.com
2. Create/download OAuth credentials
3. Save to `~/.claude/skills/youtube-skill/credentials.json`

## Commands

### Channel & Videos

```bash
python3 ~/.claude/skills/youtube-skill/youtube_skill.py me
python3 ~/.claude/skills/youtube-skill/youtube_skill.py channels
python3 ~/.claude/skills/youtube-skill/youtube_skill.py videos [--channel CHANNEL_ID] [--limit N]
python3 ~/.claude/skills/youtube-skill/youtube_skill.py video VIDEO_ID
```

### Search

```bash
python3 ~/.claude/skills/youtube-skill/youtube_skill.py search "query" [--limit N] [--type video|channel|playlist]
```

### Playlists

```bash
python3 ~/.claude/skills/youtube-skill/youtube_skill.py playlists [--channel CHANNEL_ID]
python3 ~/.claude/skills/youtube-skill/youtube_skill.py playlist PLAYLIST_ID
python3 ~/.claude/skills/youtube-skill/youtube_skill.py create-playlist --title "Name" [--privacy public|private|unlisted]
python3 ~/.claude/skills/youtube-skill/youtube_skill.py add-to-playlist PLAYLIST_ID --video VIDEO_ID
python3 ~/.claude/skills/youtube-skill/youtube_skill.py remove-from-playlist PLAYLIST_ITEM_ID
```

### Comments

```bash
python3 ~/.claude/skills/youtube-skill/youtube_skill.py comments VIDEO_ID [--limit N]
python3 ~/.claude/skills/youtube-skill/youtube_skill.py comment VIDEO_ID --text "Great video!"
python3 ~/.claude/skills/youtube-skill/youtube_skill.py reply COMMENT_ID --text "Thanks!"
```

### Subscriptions

```bash
python3 ~/.claude/skills/youtube-skill/youtube_skill.py subscriptions
python3 ~/.claude/skills/youtube-skill/youtube_skill.py subscribe CHANNEL_ID
python3 ~/.claude/skills/youtube-skill/youtube_skill.py unsubscribe SUBSCRIPTION_ID
```

### Upload

```bash
python3 ~/.claude/skills/youtube-skill/youtube_skill.py upload --file video.mp4 --title "My Video" [--description "..."] [--privacy private]
```

## Video IDs

Found in URLs: `youtube.com/watch?v=VIDEO_ID`

## Privacy Options

- `public` - Anyone can see
- `unlisted` - Only people with link
- `private` - Only you

## Output

All commands output JSON.

Overview

This skill manages YouTube videos, playlists, channels, searches, comments, subscriptions, and uploads using the YouTube Data API v3. It automates common channel tasks so you can search, upload, organize, and interact with content from the command line or an automated workflow. Outputs are returned in JSON for easy parsing and integration.

How this skill works

The skill uses Google OAuth credentials to call the YouTube Data API v3 and perform actions on behalf of an authenticated account. It exposes commands for listing channels and videos, searching content, creating and editing playlists, posting and replying to comments, managing subscriptions, and uploading video files. All operations return structured JSON so you can script or integrate results into other tools.

When to use it

  • Upload a finished video and set title, description, and privacy.
  • Create, modify, or populate playlists for organization or sharing.
  • Search YouTube for videos, channels, or playlists programmatically.
  • List or fetch details for your channels, videos, or subscriptions.
  • Read and reply to video comments from an automated tool or script.

Best practices

  • Enable YouTube Data API v3 in your Google Cloud project and use OAuth credentials stored securely.
  • Reuse an authenticated session for multiple operations to avoid repeated authorization prompts.
  • Validate video metadata (title, description, privacy) before uploading to prevent re-uploads.
  • Rate-limit automated operations and handle API errors, quota limits, and retries gracefully.
  • Parse JSON outputs programmatically instead of relying on human-readable text for reliability.

Example use cases

  • Upload a new episode and set it private until scheduled publishing.
  • Search for competitor videos and export metadata for analysis.
  • Create a themed playlist and add multiple videos by ID from a CSV.
  • Fetch recent comments on a video and batch-reply with moderation messages.
  • List subscribed channels and unsubscribe from inactive ones in bulk.

FAQ

What setup is required?

Enable YouTube Data API v3 in Google Cloud, create OAuth credentials, and save them where the skill expects. Use the same OAuth flow as other Google-based tools.

How do I find a video or playlist ID?

Video and playlist IDs appear in YouTube URLs (e.g., watch?v=VIDEO_ID). Use the search command to retrieve IDs programmatically.