Agent skill

Youtube API

by swyxio in swyxio/skills

Manage YouTube videos programmatically via the YouTube Data API v3 — upload video files, upload custom thumbnails, update video metadata (titles, descriptions, tags), and query video/channel info…

MITAuto-check passedBackend & APIs

Install Youtube API

skills CLI
$ npx skills add swyxio/skills --skill youtube-api -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install swyxio/skills youtube-api --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/swyxio/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/youtube-api .claude/skills/youtube-api && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
youtube-api
GitHub stars
175
Token cost
~2.2k tokens
SKILL.md length
755 words
Files
8 (incl. scripts)
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

Manage YouTube videos programmatically via the YouTube Data API v3 — upload video files, upload custom thumbnails, update video metadata (titles, descriptions, tags), and query video/channel info…

  • Works in 7 steps: Create/select a Google Cloud Project → Enable the YouTube Data API v3 → Configure the OAuth consent screen → …
  • The user wants to: upload a local video file to YouTube
  • SKILL.md covers Why This Skill Exists, Prerequisites, Operations and API Quota, plus 2 more sections
  • Runs Python scripts from its folder; calls python and pip

What it does

Youtube API is an agent skill from swyxio/skills. Manage YouTube videos programmatically via the YouTube Data API v3 — upload video files, upload custom thumbnails, update video metadata (titles, descriptions, tags), and query video/channel info without touching YouTube Studio's browser UI. Use this skill whenever the user wants to: upload a local video file to YouTube; set, update, or change a YouTube video's thumbnail from a local image file; batch-set thumbnails across multiple videos; update video titles, descriptions, or tags programmatically; query their…

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts (for example `README.md`, `scripts/list_videos.py` and `scripts/set_thumbnail.py`). Compatibility notes: Requires Python 3.8+ with google-api-python-client, google-auth-oauthlib, and google-auth. Works on macOS, Linux, and Windows. Requires a Google Cloud project…

It sits in Backend & APIs. It works with YouTube. The repository describes itself as: Agent skills for Claude Code and other AI agents. The licence is MIT.

When your agent uses it

  • The user wants to: upload a local video file to YouTube
  • Change a YouTube videos thumbnail from a local image file
  • Batch-set thumbnails across multiple videos
  • Update video titles

Example prompts

  • “upload to youtube”
  • “upload video”
  • “set thumbnail”
  • “/youtube-api”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): Requires Python 3.8+ with google-api-python-client, google-auth-oauthlib, and google-auth. Works on macOS, Linux, and Windows. Requires a Google Cloud project with YouTube Data API v3 enabled and OAuth 2.0 Desktop credentials. One-time browser-based OAuth consent required on the user's local machine before headless/Cowork use.

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Create/select a Google Cloud Project
  2. Enable the YouTube Data API v3
  3. Configure the OAuth consent screen
  4. Add the user as a test user (critical — the app stays in Testing mode)
  5. Create OAuth 2.0 credentials
  6. Store the credentials
  7. Run the first-time OAuth flow (must happen on the user's local machine — a browser opens)

What it can do on your machine

Read from SKILL.md and the folder at commit 038ef34. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 6 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • console.cloud.google.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires Python 3.8+ with google-api-python-client, google-auth-oauthlib, and google-auth. Works on macOS, Linux, and Windows. Requires a Google Cloud project with YouTube Data API v3 enabled and OAuth 2.0 Desktop credentials. One-time browser-based OAuth consent required on the user's local machine before headless/Cowork use.

    From compatibility in the SKILL.md frontmatter.

Context cost

Youtube API loads about 2.2k tokens when it runs. Until then it costs about 236 tokens; SKILL.md has 755 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~236
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from swyxio/skills at commit 038ef34, republished under its MIT licence (© swyxio). 755 words, ~2,174 tokens.

Download SKILL.mdSave it as .claude/skills/youtube-api/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
youtube-api
description
Manage YouTube videos programmatically via the YouTube Data API v3 — upload video files, upload custom thumbnails, update video metadata (titles, descriptions, tags), and query video/channel info without touching YouTube Studio's browser UI. Use this skill whenever the user wants to: upload a local video file to YouTube; set, update, or change a YouTube video's thumbnail from a local image file; batch-set thumbnails across multiple videos; update video titles, descriptions, or tags programmatically; query their channel's video list; or do anything involving the YouTube Data API. Triggers: "upload to youtube", "upload video", "set thumbnail", "upload thumbnail", "change thumbnail", "YouTube API", "batch thumbnails", "update video title", "update video description", "youtube metadata", or any reference to programmatically managing YouTube videos. Also use when the browser-based YouTube Studio upload is unreliable or slow.
compatibility
Requires Python 3.8+ with google-api-python-client, google-auth-oauthlib, and google-auth. Works on macOS, Linux, and Windows. Requires a Google Cloud project with YouTube Data API v3 enabled and OAuth 2.0 Desktop credentials. One-time browser-based OAuth consent required on the user's local machine before headless/Cowork use.
license
MIT
metadata.author
swyxio
metadata.version
1.0
metadata.last-updated
2026-03-28
metadata.primary-tools
YouTube Data API v3, Python, Google OAuth 2.0

YouTube API

Manage YouTube videos programmatically — uploads, thumbnails, metadata, and queries — via the YouTube Data API v3, completely bypassing the YouTube Studio browser UI.

Why This Skill Exists

YouTube Studio's browser UI is unreliable for bulk operations and awkward for automation. The file picker for thumbnails is flaky, editing metadata for multiple videos is tedious, and browser uploads can stall or reset. This skill wraps the YouTube Data API v3 with OAuth2 authentication and persistent token caching, so once set up, uploads and follow-up edits are fully scriptable — including across Cowork VM resets.

Prerequisites

Python Dependencies
bash
pip install google-api-python-client google-auth-oauthlib google-auth --break-system-packages
Google Cloud Project Setup (One-Time)

If the user hasn't set up YouTube API credentials yet, walk them through this. It takes about 5 minutes:

  1. Create/select a Google Cloud Project

  2. Enable the YouTube Data API v3

    • Navigate to APIs & Services → Library
    • Search for "YouTube Data API v3" → click Enable
  3. Configure the OAuth consent screen

    • Go to Google Auth Platform → Overview → "Get started"
    • App name: anything (e.g., "YouTube API Tool")
    • User support email: select the user's Google email
    • Audience: External
    • Contact email: the user's email
    • Agree to the Google API Services User Data Policy → Create
  4. Add the user as a test user (critical — the app stays in Testing mode)

    • Go to Google Auth Platform → Audience
    • Under "Test users", click "+ Add users"
    • Add the Google email associated with their YouTube channel
    • Save
  5. Create OAuth 2.0 credentials

    • Go to Google Auth Platform → Clients → "+ Create client"
    • Application type: Desktop app
    • Name: anything (e.g., "YouTube API Tool")
    • Click Create
    • Download the JSON — this is the client_secret.json file
  6. Store the credentials

    On macOS/Linux (standard):

    bash
    mkdir -p ~/.config/youtube-api
    mv ~/Downloads/client_secret_*.json ~/.config/youtube-api/client_secret.json

    For Cowork persistence (survives VM resets):

    bash
    mkdir -p ~/Downloads/.youtube-api
    mv ~/Downloads/client_secret_*.json ~/Downloads/.youtube-api/client_secret.json
  7. Run the first-time OAuth flow (must happen on the user's local machine — a browser opens)

    bash
    python <skill-path>/scripts/setup_auth.py

    This opens a browser for Google OAuth consent. The user signs in, authorizes the app, and a token.pickle is cached alongside the client_secret.json. After this, all subsequent runs (including in Cowork) are fully automatic.

    When the consent screen appears, it will warn the app is "unverified" — this is normal for testing mode. Click "Advanced" → "Go to [app name] (unsafe)" → allow access.

Where Credentials Live

The scripts auto-detect the best credential location:

EnvironmentConfig directoryPersists across sessions?
Cowork/sessions/*/mnt/Downloads/.youtube-api/Yes (on user's real machine)
Standard~/.config/youtube-api/Yes

Both client_secret.json and token.pickle must be in the same directory. The scripts check the Cowork path first, then fall back to the standard path.

Operations

Set Thumbnails

Upload custom thumbnail images to one or more YouTube videos.

Single video:

bash
python <skill-path>/scripts/set_thumbnail.py --video-id VIDEO_ID --thumbnail /path/to/image.jpg

Batch mode:

bash
python <skill-path>/scripts/set_thumbnail.py \
  --batch VIDEO_ID_1:/path/to/thumb1.jpg VIDEO_ID_2:/path/to/thumb2.jpg

Thumbnail requirements:

  • Max size: 2 MB (compress with convert input.jpg -resize 1280x720 -quality 85 output.jpg)
  • Formats: JPEG (recommended), PNG
  • Dimensions: 1280x720 recommended (16:9 aspect ratio)
Show full SKILL.md (299 more words)Show less
Upload Videos

Upload a finished local video file directly to YouTube.

bash
python <skill-path>/scripts/upload_video.py --file /path/to/video.mp4 --privacy unlisted

Optional metadata at upload time:

bash
python <skill-path>/scripts/upload_video.py \
  --file /path/to/video.mp4 \
  --privacy unlisted \
  --title "Video Title" \
  --description "Optional description" \
  --tags "tag1,tag2"
Update Video Metadata

Update titles, descriptions, and/or tags for one or more videos.

Single video:

bash
python <skill-path>/scripts/update_metadata.py --video-id VIDEO_ID \
  --title "New Title" \
  --description "New description" \
  --tags "tag1,tag2,tag3"

Batch mode (from JSON):

bash
python <skill-path>/scripts/update_metadata.py --batch updates.json

Where updates.json looks like:

json
[
  {"video_id": "abc123", "title": "New Title", "description": "New desc"},
  {"video_id": "def456", "tags": ["tag1", "tag2"]}
]

Only the fields you specify are updated — everything else is preserved.

List Channel Videos

Query the authenticated user's channel for their uploaded videos.

bash
python <skill-path>/scripts/list_videos.py [--max-results 50]

Returns video IDs, titles, publish dates, and thumbnail URLs. Useful for building batch operations.

API Quota

  • thumbnails.set: 50 units per call
  • videos.update: 50 units per call
  • videos.list: 1 unit per call
  • search.list: 100 units per call
  • Default daily quota: 10,000 units → ~200 thumbnail uploads or metadata updates per day
  • If you hit quota limits, wait until the next day or request a quota increase in Google Cloud Console → APIs & Services → Quotas

Troubleshooting

ErrorCauseFix
"token has been expired or revoked"OAuth token expired beyond refreshDelete token.pickle from the config directory (shown at startup) and re-run setup_auth.py
"quotaExceeded"Hit daily API quotaWait until tomorrow or request a quota increase
"forbidden" or "thumbnailsNotAccessible"Account lacks custom thumbnail permissionVerify the YouTube account is in good standing with custom thumbnails enabled
"The caller does not have permission"Not a test user on the OAuth consent screenAdd the Google email as a test user in Google Auth Platform → Audience
"fileNotFound" on imageBad file pathCheck the file path; the script validates before uploading
Image too largeOver 2 MBCompress: convert input.jpg -resize 1280x720 -quality 85 output.jpg
Browser doesn't open for OAuthRunning in headless/Cowork environmentRun setup_auth.py on your local machine first, then copy token.pickle to the Cowork config directory

Integration with Other Pipelines

This skill works well as the final step in content pipelines. For example, after generating thumbnails with an image generation tool:

bash
# Generate thumbnails, then upload them
python <skill-path>/scripts/set_thumbnail.py \
  --batch \
  xUy0vno25k0:~/Downloads/thumb_feb4.jpg \
  LJFL6bYyGHg:~/Downloads/thumb_feb13.jpg \
  s5bTZfYUcac:~/Downloads/thumb_feb18.jpg

© swyxio, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (scripts) in youtube-api of swyxio/skills.

  • SKILL.md
  • README.md
  • scripts/list_videos.py
  • scripts/set_thumbnail.py
  • scripts/setup_auth.py
  • scripts/update_metadata.py
  • scripts/upload_video.py
  • scripts/yt_auth.py

Open the folder on GitHubat commit 038ef34

Compare with similar skills

Youtube API next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Youtube API compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Youtube API this skillswyxio/skills175—~2.2kAutomated safety check: PassMIT
Add OAuth Providersuperdesigndev/treg4.9k—~2.5kAutomated safety check: PassCustom licence
TikHub API Helperliangdabiao/tikhub_api_skill129—~1.5kAutomated safety check: PassNone
YouTube Data via TranscriptAPIZeroPointRepo/youtube-skills1k1 repos~2.6kAutomated safety check: PassMIT
Setupdaiki-beppu/youtube-automation169—~1.3kAutomated safety check: PassCustom licence
YoutubeCraftOS-dev/CraftBot3921 repos~3.7kAutomated safety check: PassMIT

Similar skills

  • Add OAuth Provider

    superdesigndev/treg

    Add a provider to treg's OAuth registry (the ones treg holds its own approved app for).

    4.9k GitHub stars~2.5k tokensUpdated today
    Backend & APIsAuto-check passed
  • TikHub API Helper

    liangdabiao/tikhub_api_skill

    Searches TikHub's social media API endpoints and calls them from the command line for TikTok, Douyin, Xiaohongshu, Instagram, YouTube, Reddit and more.

    129 GitHub stars~1.5k tokensUpdated 3 mo ago
    Backend & APIsAuto-check passed
  • YouTube Data via TranscriptAPI

    ZeroPointRepo/youtube-skills

    Fetches YouTube transcripts, video metadata, channel uploads, search results and playlist contents through TranscriptAPI.com, without Google API quotas or OAuth.

    1k GitHub starsUsed in 1 repo~2.6k tokens
    Backend & APIsAuto-check passed
  • Setup

    daiki-beppu/youtube-automation

    A skill your agent uses when ツール導入と GCP / OAuth の設定、新規 YouTube チャンネル開設、既存チャンネル取り込み、config 再生成、または YouTube 側設定同期を行うとき。「セットアップして」「環境構築」「新チャンネル」「既存チャンネル」「チャンネル取り込み」「config…

    169 GitHub stars~1.3k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Youtube

    CraftOS-dev/CraftBot

    YouTube Data API integration with managed OAuth. An agent skill from CraftOS-dev/CraftBot.

    392 GitHub starsUsed in 1 repo~3.7k tokens
    Backend & APIsAuto-check passed
  • Int Youtube

    evolution-foundation/evo-nexus

    Query YouTube Data API v3 — channel stats, recent videos, top videos, comments.

    545 GitHub stars~568 tokensUpdated 4 mo ago
    Backend & APIsAuto-check: notes

More from swyxio/skills

All 89 skills in this repo
  • Programmatic Agents

    swyxio/skills

    Run a selected coding-agent CLI programmatically, with latency, error, usage, cost, and trace logging.

    175 GitHub stars~2.2k tokensUpdated 4 days ago
    Auto-check passed
  • Design, implement, audit, or refresh protected username and handle namespaces for public products.

    175 GitHub stars~1.1k tokensUpdated 4 days ago
    Auto-check passed
  • New Mac Setup

    swyxio/skills

    Fully automated new Mac setup for fullstack web developers and AI engineers.

    175 GitHub stars~4.3k tokensUpdated 4 days ago
    Auto-check passed
  • Batch YouTube Studio upload workflow for videos sourced from Airtable, Google Drive, Loom, YouTube, or local files.

    175 GitHub stars~1.5k tokensUpdated 4 days ago
    Auto-check: warnings
  • Reconstruct and visually analyze paired agent, game, or policy trajectories to determine whether changed actions produced their intended effects.

    175 GitHub stars~1.8k tokensUpdated 4 days ago
    Auto-check passed
  • Forge

    swyxio/skills

    Operate or diagnose SmolForge repositories and Forge Deploy/Sites when the task requires Forge-specific CLI, authentication, manifest, or release behavior on forge.smol.ai or .sites.smol.ai.

    175 GitHub stars~1.3k tokensUpdated 4 days ago
    Auto-check passed

Works with

Categories

Questions about Youtube API

What does Youtube API do?

Manage YouTube videos programmatically via the YouTube Data API v3 — upload video files, upload custom thumbnails, update video metadata (titles, descriptions, tags), and query video/channel info…. Youtube API is an agent skill from swyxio/skills. Manage YouTube videos programmatically via the YouTube Data API v3 — upload video files, upload custom thumbnails, update video metadata (titles, descriptions, tags), and query video/channel info without touching YouTube Studio's browser UI.

When should I use Youtube API?

Youtube API fits situations like: the user wants to: upload a local video file to YouTube; change a YouTube videos thumbnail from a local image file; batch-set thumbnails across multiple videos; update video titles.

How do I install Youtube API in Claude Code?

Run `npx skills add swyxio/skills --skill youtube-api -a claude-code`. Or copy the skill folder (youtube-api in swyxio/skills) into .claude/skills/youtube-api in your project. Claude Code loads it when a task matches its description.

How do I install Youtube API in Codex?

Run `npx skills add swyxio/skills --skill youtube-api -a codex`. Or copy the skill folder (youtube-api in swyxio/skills) into .agents/skills/youtube-api in your project. Codex loads it when a task matches its description.

Can I use Youtube API in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add swyxio/skills --skill youtube-api -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/youtube-api, .gemini/skills/youtube-api, .github/skills/youtube-api and .opencode/skills/youtube-api in your project.

What does Youtube API need to run?

Going by SKILL.md and its folder, Youtube API needs Python for the scripts in its folder and the command-line tools its instructions call (python and pip). Our summary lists: Python 3. Compatibility (from SKILL.md): Requires Python 3.8+ with google-api-python-client, google-auth-oauthlib, and google-auth. Works on macOS, Linux, and Windows. Requires a Google Cloud project with YouTube Data API v3 enabled and OAuth 2.0 Desktop credentials. One-time browser-based OAuth consent required on the user's local machine before headless/Cowork use. .

Does Youtube API access the network?

SKILL.md names 1 domain. As links in the text: console.cloud.google.com. This is read from the text; nothing was executed.

Is Youtube API safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Youtube API use?

Youtube API is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Youtube API use?

About 2.2k tokens (SKILL.md is roughly 8.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Youtube API?

Skills that share tags, products or a category with Youtube API: Add OAuth Provider (superdesigndev/treg, 4.9k stars), TikHub API Helper (liangdabiao/tikhub_api_skill, 129 stars), YouTube Data via TranscriptAPI (ZeroPointRepo/youtube-skills, 1k stars) and Setup (daiki-beppu/youtube-automation, 169 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Youtube API?

swyxio (a GitHub user) maintains it in swyxio/skills, which has 175 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 5, 2026.

Source: swyxio/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.