Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.
Browser
YouTube Playlist Manager
Try itSearch YouTube, get full video details, and manage the user's own YouTube playlists via the YouTube Data API v3. Search and video details work with just an API key, without signing in. Managing playlists needs a one-time Google OAuth sign-in in the browser: list playlists and the videos in them, create, edit (title, description, privacy) and delete playlists, add and remove videos. The sign-in is stored locally (by default in ~/.openclaw/youtube/), refreshed automatically, and revoked by logout. Every command can also print JSON (--json) for scripts. Use when the user explicitly asks to search YouTube, get details of a video, or to view or change their YouTube playlists.
What it does
Search YouTube and manage your own playlists through the YouTube Data API v3.
The skill document
YouTube Playlist Manager
Search YouTube and manage your own playlists through the YouTube Data API v3.
Entry point: {baseDir}/scripts/youtube.py (Python 3 standard library only)
Setup
See SETUP.md. Search needs an API key or a sign-in; playlist commands need a one-time Google sign-in.
Credentials are read from ~/.openclaw/youtube/config.json; the env vars YOUTUBE_API_KEY, YOUTUBE_CLIENT_ID and YOUTUBE_CLIENT_SECRET override it. The sign-in is stored in ~/.openclaw/youtube/tokens.json, readable by the owner only. Never print or share these files.
Commands
# Search (uses the API key, or the sign-in if no key is set)
python3 {baseDir}/scripts/youtube.py search "query" [--max 1-50] [--order relevance|date|viewCount|rating|title|videoCount]
python3 {baseDir}/scripts/youtube.py search "query" [--duration short|medium|long] [--hd] [--after YYYY-MM-DD] [--channel CHANNEL_ID]
# Sign in (one-time)
python3 {baseDir}/scripts/youtube.py auth # opens a browser, waits for the localhost callback
python3 {baseDir}/scripts/youtube.py auth --manual # prints the consent URL and exits
python3 {baseDir}/scripts/youtube.py auth --code ""
# Playlists
python3 {baseDir}/scripts/youtube.py list
python3 {baseDir}/scripts/youtube.py create "Name" [--privacy private|unlisted|public] [--description "..."]
python3 {baseDir}/scripts/youtube.py edit [--title "..."] [--description "..."] [--privacy private|unlisted|public]
python3 {baseDir}/scripts/youtube.py delete
# Videos in a playlist
python3 {baseDir}/scripts/youtube.py videos # shows each entry's Item ID
python3 {baseDir}/scripts/youtube.py add [more ...]
python3 {baseDir}/scripts/youtube.py remove [more ...]
How to use it
- Ask before
deleteandremove. Both are permanent. Name the playlist or the videos and wait for a clear yes. - New playlists are private unless the user asks for something else.
removetakes the Item ID shown byvideos, not the video ID.addaccepts watch,youtu.be, Shorts, embed and live URLs as well as bare 11-character video IDs.- Search returns the most relevant matches. Use
--order dateonly when the user wants the newest uploads. - YouTube shows changes after a few seconds.
listright after a change can still show the old state, and two quickedits of the same playlist can undo each other, so leave about 10 seconds between them. - Signing in needs the user. Run
auth --manual, send the user the URL, and ask for the address their browser shows afterwards. It starts withhttp://127.0.0.1:8923/, and that page not loading is expected. Then runauth --code "". On the user's own computer, plainauthopens the browser and finishes by itself. - If a command reports that the sign-in expired or was revoked, sign in again. If that happens every 7 days, point the user to the "Publish app" step in SETUP.md.
Quota
Each Google Cloud project gets 10,000 units a day by default, reset at midnight Pacific time.
| Command | Cost |
|---|---|
search | 100 units (about 100 searches a day) |
create, edit, delete | 50 units per playlist |
add, remove | 50 units per video |
list, videos | 1 unit per 50 entries |
Limits
- Watch Later and watch history aren't available through the API (a Google restriction since 2016).
- The sign-in uses Google's
youtubescope, which allows managing the whole YouTube account. The script itself only reads search results and reads and changes playlists. - To play a playlist inside a web page or an app, see references/iframe-player.md.
Related skills
Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.
Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.
Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.
Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.
Write, debug, and tune Playwright specs with locator strategy, trace diagnosis, and CI-aware timeouts.
More from odrobnik
Browse all skillsAutomate George banking (Erste/Sparkasse AT): balances, transactions, and SEPA file upload in JSON.
Text-to-speech, sound effects, music generation, voice management, and quota checks via the ElevenLabs API. Use when generating audio with ElevenLabs or mana...
Manage multiple OpenAI Codex accounts by capturing current login tokens, switching between saved accounts, and auto-selecting the best one based on quota bud...
Use when integrating with Tesla's official Fleet API to read vehicle/energy device data or issue remote commands (e.g. start HVAC preconditioning, wake vehic...
Fetches health data from the Withings API for multiple family members including weight, body composition (fat, muscle, bone, water), activity, and sleep. Use...
Control and monitor Snapmaker 2.0 3D printers via their HTTP API. Status, job management, progress watching, and event monitoring.