skills/yt-music/SKILL.md
Operate YouTube Music via natural language. Search songs, artists, albums, playlists, lyrics, charts, recommendations, and control playback. Browse personal library, manage playlists, rate tracks, and inspect account info. Use this skill whenever the user asks about YouTube Music, wants to play music, manage playlists, search by song or artist name, inspect lyrics, or control playback.
npx skillsauth add julianobarbosa/claude-code-skills yt-musicInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run bundled scripts from the skill root:
scripts/helper.py: search, library, playlists, lyrics, ratings, accountscripts/player.py: playback client and daemon managementscripts/player_daemon.py: persistent Playwright browser daemon./.yt-music/./.yt-music/playwright-profileFor multi-step or composed flows, route the user into a workflow file instead of orchestrating ad-hoc:
| User intent | Workflow file |
|-------------|---------------|
| First-time setup, expired auth, daemon not running | Workflows/Setup.md |
| "Play X / play something like Y / find me music" | Workflows/PlayDiscover.md |
| "Make a playlist of …", "save the charts", artist deep cut | Workflows/BuildPlaylist.md |
| Auth errors, daemon timeouts, silent playback, cookie issues | Workflows/DiagnoseAuth.md |
| "Run the tests", verify scripts after edits, CI smoke check | Workflows/RunTests.md |
Single-shot requests (one search, one rating, one playlist get) stay inline — no workflow needed.
auth check first.Use search to resolve videoId, browseId, or playlistId:
uv run --with yt-musicapi python scripts/helper.py search "<query>" --type songs --limit 5
uv run --with yt-musicapi python scripts/helper.py search "<query>" --type artists --limit 3
uv run --with yt-musicapi python scripts/helper.py search "<query>" --type albums --limit 3
If results are ambiguous, ask the user which one they want.
Check auth before library, playlist, rate, subscribe, home, history, taste, upload, or auth account:
uv run --with yt-musicapi python scripts/helper.py auth check
If auth is missing, do not continue with the requested action yet.
You must explicitly guide the user to provide one of these:
music.youtube.com requestThis is a hard rule:
Use this flow:
music.youtube.com in a logged-in browser./browse, reload, open any matching request, copy the Cookie header value, send it backmusic.youtube.com with a cookie extension and send the file path backauth setup.auth setup succeeds.Preferred default user-facing wording:
You need to sign in to YouTube Music before I can access your library, playlists, account, uploads, or full playback.
Please send me one of these:
1. A Cookie string
2. A cookies JSON file path
Cookie string instructions:
Open a logged-in music.youtube.com page
Open DevTools -> Network
Filter /browse and reload the page
Open any matching request
Copy the Cookie request header value
Send the full Cookie string back to me
Cookies JSON instructions:
Use a cookie export extension such as Cookie-Editor on music.youtube.com
Export cookies as JSON
Save the exported file locally
Send me the file path
Setup commands:
uv run --with yt-musicapi python scripts/helper.py auth setup --cookie '<cookie string>'
uv run --with yt-musicapi python scripts/helper.py auth setup --cookies-file /path/to/cookies.json
uv run --with yt-musicapi python scripts/helper.py search "<query>" [--type songs|artists|albums|playlists|videos]
uv run --with yt-musicapi python scripts/helper.py library playlists
uv run --with yt-musicapi python scripts/helper.py playlist get <playlistId>
uv run --with yt-musicapi python scripts/helper.py playlist create --title "<name>"
uv run --with yt-musicapi python scripts/helper.py playlist add <playlistId> <videoId...>
uv run --with yt-musicapi python scripts/helper.py lyrics <videoId>
uv run --with yt-musicapi python scripts/helper.py related <videoId>
uv run --with yt-musicapi python scripts/helper.py rate <videoId> LIKE|DISLIKE|INDIFFERENT
uv run --with yt-musicapi python scripts/helper.py charts [--country CN|US|KR|JP|ZZ]
Full command reference: references/commands.md
Playback runs through a persistent Playwright browser daemon. The first playback command auto-starts a dedicated browser window and reuses it for later open, play, pause, next, prev, seek, volume, and status commands.
uv run --with playwright python scripts/player.py daemon-start
uv run --with playwright python scripts/player.py open <videoId>
uv run --with playwright python scripts/player.py play
uv run --with playwright python scripts/player.py pause
uv run --with playwright python scripts/player.py next
uv run --with playwright python scripts/player.py prev
uv run --with playwright python scripts/player.py status
uv run --with playwright python scripts/player.py volume <0-100>
uv run --with playwright python scripts/player.py seek <seconds>
uv run --with playwright python scripts/player.py daemon-status
uv run --with playwright python scripts/player.py daemon-stop
Important behavior:
./.yt-music/playwright-profilemusic.youtube.com in that browser windowopen <videoId> loads the page but playback is still paused, autoplay was likely blocked and the user may need to click play once in the daemon-managed windowdaemon-status checks whether the background browser is alive without starting a new oneIf playback commands fail, first verify:
music.youtube.com in that browser window if the requested track requires it./.yt-music/player-daemon.log does not show a launch or Playwright error▶ {title} — {artist} ({position} / {duration})After success, suggest one natural next step such as play, add to playlist, show lyrics, or fetch related tracks.
Accumulated lessons — the highest-density section of this skill. Add to it whenever a flow breaks in a non-obvious way.
SAPISID cookie quirk. auth setup --cookie derives the API auth header by SHA1-hashing SAPISID against time and music.youtube.com. If the user pastes only one cookie line (not the full Cookie: header) the script bails with SAPISID not found. Always ask for the full Cookie request header value, not a single cookie pair. __Secure-3PAPISID is accepted as a fallback.auth check still returns ok because the file exists, but the next authenticated call 401s. When that happens, run auth remove + re-do Workflows/Setup.md step 2 — do not retry blindly.player.py open <id> may load the page in paused state. Tell the user to click play once inside the daemon-managed window; subsequent opens autoplay because the gesture sticks to the profile../.yt-music/playwright-profile/SingletonLock may block re-launch. daemon-stop then deleting that lock file recovers without losing the signed-in session.playlist add-playlist requires source ownership/access. Cloning across users' playlists fails silently with no diff in actions. Confirm the user owns or has access to --source-playlist before reporting success.get_album needs a browse ID, not a playlist ID. The helper auto-converts OLAK* / PL* IDs via get_album_browse_id, but only if the user passes the correct flag — don't pass a videoId to album.charts --country ZZ is "global", not a typo. The default. Use ISO alpha-2 (BR, US, KR, JP) for regional charts.related can return empty. Less-played tracks have no related-playlist entry. Fall back to watch <videoId> --limit 10 for a radio mix instead of telling the user "nothing found".playlist remove needs full track objects, not just videoIds. The helper looks them up via get_playlist first; if to_remove is empty the script returns not_found, removed: 0 rather than an error. Surface that to the user faithfully — they likely passed an ID for a track that isn't in the playlist.YT_MUSIC_DATA_DIR overrides the default. If a user reports auth files in an unexpected location, check whether they set this env var. Default is <skill-root>/.yt-music/.Example 1 — Quick search and play (no auth needed for either).
User: "Play Bohemian Rhapsody."
→ search "Bohemian Rhapsody" --type songs --limit 5
→ confirm pick with user if ambiguous
→ player.py open <videoId>
→ player.py status
→ offer: lyrics, related, save to playlist
Example 2 — Build a charts playlist for Brazil.
User: "Save this week's BR top 50 as a playlist."
→ route to Workflows/BuildPlaylist.md (Mode C)
→ auth check (required for playlist create/add)
→ charts --country BR
→ extract top 50 videoIds
→ playlist create --title "BR Top 50 — <date>" --privacy PRIVATE
→ playlist add <playlistId> <videoIds...>
Example 3 — Auth failure mid-flow.
User: "Add this track to my Liked playlist."
→ playlist add returns 401
→ route to Workflows/DiagnoseAuth.md (Symptom 2)
→ auth remove → Workflows/Setup.md step 2
→ retry original playlist add
development
End-to-end branch delivery: commit (no AI attribution) → push → open a pull request → ensure a Board work item exists (create one per task, assigned to the configured user, if none) and link it → after merge, clean up branch and worktree. Auto-detects the platform from the remote — Azure Repos + Boards (azure-devops-node-api SDK; OAuth Bearer push fallback via `az`) or GitHub (Octokit; `gh` for auth). Scripts are TypeScript, run via `bun`. Use whenever asked to "ship", "ship it", "ship this branch", "open a PR", "push and open a PR", "raise a PR", "deliver this", "send this for review", or "create a PR and link the work item" — and when a direct push to main is blocked and the change needs to go through a PR instead.
testing
Brief description of what this skill does. Include specific triggers - when should Claude use this skill? Example triggers, file types, or keywords that indicate this skill applies.
tools
Manage and troubleshoot PATH configuration in zsh. Use when adding tools to PATH (bun, nvm, Python venv, cargo, go), diagnosing "command not found" errors, validating PATH entries, or organizing shell configuration in .zshrc and .zshrc.local files.
tools
Zabbix monitoring system automation via API and Python. Use when: (1) Managing hosts, templates, items, triggers, or host groups, (2) Automating monitoring configuration, (3) Sending data via Zabbix trapper/sender, (4) Querying historical data or events, (5) Bulk operations on Zabbix objects, (6) Maintenance window management, (7) User/permission management