name: youtube-creator-cli-skill description: Comprehensive operational guide for agents using YouTube Creator CLI. version: 1.0.0 tools:
- youtube-creator-cli
YouTube Creator CLI Skill (youtube-creator-cli)
This skill teaches an agent to use the YouTube Creator CLI safely, deterministically, and non-interactively where possible.
1) Tool identity and binary
- Package:
youtube-creator-cli - Primary binary:
youtube-creator-cli - Source dev entry:
npm run dev -- <command>
If the binary is not globally installed, use local execution from repo root:
npm run dev -- --help
2) What this CLI is for
Use this CLI to:
- Configure OAuth credentials and defaults
- Authenticate against YouTube Data API v3
- Upload videos
- Read/update/delete videos
- Manage thumbnails
- Manage playlists
- Read/post comments
- Read channel/video stats
3) Prerequisites the agent must verify
Before running business commands, verify:
- Node >= 18
- A valid setup exists (
setupalready run) - Auth is valid (
authcompleted; token refresh works) - Local file paths exist for upload/thumbnail operations
- Intended account/channel is correct (especially before destructive actions)
Validation commands:
youtube-creator-cli --version
youtube-creator-cli --help
youtube-creator-cli config show
4) First-run bootstrap workflow
4.1 Setup
Interactive:
youtube-creator-cli setup
Non-interactive:
youtube-creator-cli setup \
--client-id "YOUR_CLIENT_ID" \
--client-secret "YOUR_CLIENT_SECRET" \
--default-privacy private \
--port 3000 \
--non-interactive
4.2 Authenticate
youtube-creator-cli auth
Useful auth options:
--port <number>: callback port override--no-browser: print URL instead of auto-open--profile <name>: store token under specific auth profile
4.3 Confirm readiness
youtube-creator-cli config show
youtube-creator-cli channels
5) Command map for agents
Core setup/auth:
setupauthlogoutresetconfig showconfig set <key> <value>config use-profile <name>
Content operations:
channelsvideosupload <file>update <videoId>delete <videoId>stats <videoId>thumbnail <videoId> <imagePath>
Playlists:
playlistsplaylist-createplaylist-add <playlistId> <videoId>playlist-update <playlistId>playlist-delete <playlistId>
Comments:
comments <videoId>comment <videoId> <text>
For exact flags per command:
youtube-creator-cli <command> --help
6) High-confidence automation patterns
6.1 Upload workflow
youtube-creator-cli upload ./video.mp4 \
--title "Launch Demo" \
--description "Automated upload via agent" \
--privacy private \
--tags "demo,launch"
Optional thumbnail step:
youtube-creator-cli thumbnail <VIDEO_ID> ./thumb.jpg
6.2 Metadata update workflow
youtube-creator-cli update <VIDEO_ID> \
--title "Updated Title" \
--description "Updated description" \
--privacy unlisted
6.3 Review + safe delete workflow
youtube-creator-cli stats <VIDEO_ID>
youtube-creator-cli delete <VIDEO_ID>
Agent rule: never delete without explicit confirmation from caller context.
7) Agent operating rules (important)
- Prefer deterministic, explicit flags over defaults for automation.
- Always run read-only command first before mutating:
- before
update: runvideosorstats - before
delete: runstatsand confirm target ID
- before
- Use profile-aware auth (
auth --profile) for multi-tenant work. - Never expose secrets in logs or summaries.
- Treat all OAuth/token/config files as sensitive.
- Capture command stdout/stderr and return concise structured outcomes.
8) Output strategy for agentic environments
- Use command output directly for human-readable operation logs.
- Where available, use JSON-friendly command modes (e.g.
videos --format json) for downstream parsing. - For commands lacking JSON mode, parse stable fields (IDs, URLs, statuses) from lines with anchored patterns.
- Store important IDs (
videoId,playlistId) as explicit state for next steps.
9) Common failure handling
Not configured
Symptoms:
- "Configuration not found"
Action:
youtube-creator-cli setup
Not authenticated / expired token
Action:
youtube-creator-cli logout
youtube-creator-cli auth
OAuth access blocked
Likely missing test user/scopes in Google OAuth consent screen.
Port conflict
Action:
youtube-creator-cli auth --port 3001
or persist:
youtube-creator-cli config set oauth.port 3001
Quota issues
Uploads are expensive quota operations; if upload fails with quota messages, pause and report quota guidance.
10) Minimal runbooks
Runbook A: fresh machine
npm install -g youtube-creator-cliyoutube-creator-cli setup ...youtube-creator-cli authyoutube-creator-cli channels
Runbook B: weekly publishing
youtube-creator-cli videos --limit 20youtube-creator-cli upload ...youtube-creator-cli thumbnail ...youtube-creator-cli stats ...
Runbook C: profile switching
youtube-creator-cli config showyoutube-creator-cli config use-profile <name>youtube-creator-cli auth --profile <name>youtube-creator-cli channels
11) Security reminders for agents
- Never commit
~/.youtube-creator-cli/config.json. - Never print full client secret/token values.
- Prefer local callback loopback only (
localhost). - Use least privilege and only requested operations.
12) Quick command cheatsheet
youtube-creator-cli setup
youtube-creator-cli auth
youtube-creator-cli channels
youtube-creator-cli videos --help
youtube-creator-cli upload ./video.mp4 --title "Title" --privacy private
youtube-creator-cli update <VIDEO_ID> --title "New title"
youtube-creator-cli thumbnail <VIDEO_ID> ./thumb.jpg
youtube-creator-cli playlists
youtube-creator-cli comments <VIDEO_ID>
youtube-creator-cli comment <VIDEO_ID> "Great video!"
youtube-creator-cli logout