my-play-music-from-yt
Play music on YouTube via browser automation with playwright-cli. Use when the user wants to: (1) play a specific song (e.g. 'play Money Money Money by ABBA') (2) play songs by an artist as a playlist or mix (e.g. 'play Jay Chou's songs') (3) play genre or mood-based music (e.g. 'play relaxing spa music', 'play 60s Chinese oldies') (4) control playback — next, pause, resume, stop, skip ad, change song, close the player. Also handles song/artist name corrections from voice transcription errors.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/whodidthese/my-play-music-from-ytPlay Music from YouTube — Clear, Stable, High SNR Instruction Set
This skill controls a visible browser using playwright-cli to search and play YouTube music.
All actions follow snapshot → ref → action pattern. Never guess. Never assume.
CORE PRINCIPLES
1. Always use a named session
-s=music_player
Every command must include it.
2. Always snapshot before interacting
playwright-cli -s=music_player snapshot
Never click/fill without fresh refs.
3. Only use ref-based actions
click e123
fill e45 "text"
Never use CSS, XPaths, or assumptions.
4. Browser must be visible
--headed
Use headed by default unless the user explicitly requests headless.
5. Session continues in background
After playback begins, do not block waiting. Continue responding normally.
6. Use persistent browser profile
--persistent
Always include --persistent when opening a new session. This saves the browser profile (cookies, localStorage, IndexedDB, cache) to disk, so login state survives session restarts.
SNAPSHOT STORAGE
Snapshots generated by playwright-cli may exist in two possible locations:
$WORKSPACE/.playwright-cli/← primary (search here first)~/.playwright-cli/← fallback when the workspace folder is empty
Use only these two folders unless the user explicitly authorizes a broader search.
If no .yml snapshots appear here, it is almost always MacOS permission-related. Ask the user to run:
playwright-cli open https://www.youtube.com --headed
This will trigger macOS system dialogs for:
- Screen Recording
- Automation
- Accessibility
Approve all to enable snapshot generation.
Note: On Windows and Linux, these permission dialogs do not apply.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-whodidthese-my-play-music-from-yt": {
"enabled": true,
"auto_update": true
}
}
}