| name | youtube-upload |
| description | Upload videos to YouTube via Studio browser automation. Use when publishing video content to YouTube, setting title/description/visibility, or automating YouTube publishing as part of a content pipeline. |
YouTube Upload
Upload video files to YouTube via Studio browser automation against a logged-in Chrome session.
Prerequisites
- Clawdbot installed (script auto-starts browser if needed)
- Logged into YouTube Studio in the browser session
ws npm package available
Quick Usage
Public upload with title and description
node skills/youtube-upload/scripts/youtube-upload.js \
--video /path/to/video.mp4 \
--title "My Video Title" \
--description "Video description here"
Unlisted upload
node skills/youtube-upload/scripts/youtube-upload.js \
--video /path/to/video.mp4 \
--title "Draft Video" \
--visibility unlisted
Private upload
node skills/youtube-upload/scripts/youtube-upload.js \
--video /path/to/video.mp4 \
--title "Private Draft" \
--visibility private
Options
| Flag | Required | Default | Description |
|---|
--video | Yes | — | Path to video file |
--title | Yes | — | Video title (max 100 chars) |
--description | No | empty | Video description (supports newlines) |
--visibility | No | public | public, unlisted, or private |
--cdp-port | No | 18800 | Chrome CDP port |
Output
- stdout: YouTube URL (e.g.
https://youtu.be/abc123) or UPLOAD_SUCCESS_NO_URL
- stderr: Progress messages
- Exit 0: Success
- Exit 1: Error
How It Works
- Connects to Chrome via CDP, navigates to YouTube Studio
- Clicks "Upload videos" to open the upload dialog
- Uploads video via
DOM.setFileInputFiles
- Sets title via focus +
Input.insertText
- Sets description via focus +
Input.insertText
- Selects "Not made for kids"
- Clicks Next 3 times (Details → Video elements → Checks → Visibility)
- Selects visibility (Public/Unlisted/Private)
- Clicks Publish (or Save for Private)
- Extracts and returns the YouTube URL
Pipeline Example: Veo + YouTube
Generate a video and upload it in one pipeline:
VIDEO=$(node skills/veo-video/scripts/veo-generate.js \
--prompt "Kev's Assistant coding at a desk" \
--image-prompt "20yo guy, brown wavy hair, dark grey tee, at a modern desk with monitors" \
--output kevs-clip.mp4)
node skills/youtube-upload/scripts/youtube-upload.js \
--video "$VIDEO" \
--title "Kev's Assistant Vibe Coding" \
--description "AI-generated content by Kev's Assistant at CreatorOS"
Troubleshooting
- Upload dialog not opening: YouTube Studio may have popups or banners blocking — dismiss them first
- Title not set: The title input selector may change — check for
[aria-label*="title"]
- Video URL not found: The youtu.be link appears in the publish confirmation dialog — timing may vary
- "Not made for kids" not clicking: Radio button selectors differ across YouTube Studio versions