Token导航 LogoToken导航TokenDH.com
音频生成操作浏览器clawhub未标认证来源可访问clear审计提醒

my-play-music-from-yt我的演奏音乐来自 yt

Agent Skill

用于辅助音频、音乐、语音转写、语音合成或声音素材处理。它适合让 Agent 生成配乐说明、整理音频流程、调用语音工具或处理播客和视频配音素材。使用时需要确认输入音频来源、输出格式、时长和模型限制;涉及人声克隆、版权音乐或公开发布时,应先核对授权和合规边界。

总安装

59,012

周安装

2,509

GitHub Stars

2

下载量

20,674
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:my-play-music-from-yt(我的演奏音乐来自 yt)
来源仓库:https://github.com/whodidthese/my-play-music-from-yt
安装命令:
openclaw skills install my-play-music-from-yt
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install my-play-music-from-yt

简介

使用 playwright-cli 通过浏览器自动化在 YouTube 上播放音乐。

  • 当用户想要执行以下操作时使用:
  • (1) 播放一首特定歌曲(例如“播放 ABBA 的 Money Money Money”)
  • (2) 以播放列表或混音形式播放艺术家的歌曲(例如“播放周杰伦的歌曲”)
  • (3) 播放流派或基于情绪的音乐(例如“播放轻松的水疗音乐”、“播放 60 年代的中国老歌”)
  • (4)控制播放——下一首、暂停、继续、停止、跳过广告、换歌、关闭播放器。
  • 还可以处理语音转录错误中的歌曲/艺术​​家名称更正。

SKILL.md

name
my-play-music-from-yt
description
|
allowed-tools
Bash(playwright-cli:*)
metadata
{"openclaw": {"requires": {"bins": ["playwright-cli"]}, "emoji": "🎵"}}

Play 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:

  1. $WORKSPACE/.playwright-cli/primary (search here first)
  2. ~/.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. If snapshots are missing on those platforms, check that the browser launched correctly.

SESSION MANAGEMENT

Check whether the session exists

playwright-cli list
  • Exists → continue
  • Missing → recreate:
playwright-cli -s=music_player open https://www.youtube.com --headed --persistent

On any unexpected error, run playwright-cli list first to diagnose before retrying.

If the session is frozen or blank

playwright-cli -s=music_player goto https://www.youtube.com

This reliably resets the page without closing the session.


SEARCH QUERY CONSTRUCTION

Build the search query based on user intent:

IntentQuery patternExample
Specific song[Artist] [Song Title]ABBA Money Money Money
Artist playlist[Artist]周杰倫
Genre / mood[descriptor] music playlistrelaxing spa music playlist
Era-based[era] [language/genre] playlist華語 60年代 老歌 playlist

Search tips:

  • For artist requests, a simple artist name search usually surfaces "Mix" and playlist results at the top — prefer these for continuous playback.
  • Use the original language for non-English songs (e.g. Chinese characters for Chinese songs).

Voice transcription (ASR) and typo handling:

  • Do NOT ask the user to confirm potentially misheard names. YouTube has robust auto-correction and will show results for the intended query even with typos or homophones (e.g. searching "楊成林" will auto-correct to "楊丞琳").
  • Always search directly with whatever text you have. After the search, check the results snapshot — if YouTube shows a "Did you mean: ..." or "顯示以下搜尋結果: ..." banner with corrected results, the correction is already applied.
  • Only fall back to web search or asking the user if the YouTube search results are clearly unrelated or empty.

SEARCH WORKFLOW (HIGH SIGNAL, LOW AMBIGUITY)

Step 1 — Reset search state

A clean search state avoids dropdown obstruction.

Perform the following every time before a new search:

  1. Snapshot.
  2. If button "Clear search query" / "清除搜尋查詢" is present → click it.
  3. Else press:
playwright-cli -s=music_player press Escape
  1. If suggestions or overlays still block results → reset page:
playwright-cli -s=music_player goto https://www.youtube.com

Then snapshot again.


Step 2 — Locate search bar

Snapshot → find:

  • combobox "搜尋" or
  • combobox "Search"

Record its ref (e.g., e34).


Step 3 — Perform search

playwright-cli -s=music_player fill <searchRef> "SEARCH TERM"
playwright-cli -s=music_player press Enter

Then snapshot immediately to avoid suggestion-panel obstruction.


Step 4 — Choose best result

Select result based on user intent:

  • Specific song → click the link whose heading matches the song title.
  • Artist → prefer "Mix - [Artist]" links or playlist links for continuous playback.
  • Genre / mood → prefer long-duration compilations or playlists (>20 mins).
  • Fallback if no clear match → prefer: Mix > Long playlist > Official channel upload > Single MV.

For guidance on identifying YouTube result types, see ./references/youtube-guide.md.

Important: Do NOT click channel cards (e.g. link "Artist Name ... @handle•NNNK subscribers ..." / "Artist Name ... @handle•NNN萬位訂閱者 ..."). They navigate to the channel page, not music. Look for Mix or playlist results below them.

Click using its ref:

playwright-cli -s=music_player click eXYZ

If click is blocked:

  1. press Escape
  2. Retry click once.
  3. If still blocked → goto https://www.youtube.com and restart from Step 1.

AD HANDLING LOOP

After clicking a result:

playwright-cli -s=music_player snapshot

Loop up to 4 iterations:

1. Playback detected

If you see:

  • button "Pause (k)" or
  • button "Play (k)" (but video advancing)

AND no ad indicators → playback is active → report song title to the user.

2. Skip button detected

Any element whose label contains:

  • skip / Skip / 略過
  • Skip Ad / Skip Ads / 略過廣告

→ click it immediately.

Note: If the skip button is [disabled] (countdown not yet elapsed), do NOT click it — wait ~5 seconds instead (see step 3).

Then snapshot again. YouTube often plays two consecutive ads — always check for a second ad after skipping.

3. Non-skippable ad / countdown

Wait 5 seconds:

playwright-cli -s=music_player eval "await new Promise(r=>setTimeout(r,5000))"

Then snapshot again and repeat from step 1.

If ads persist >20 seconds

  • press Escape
  • or reload page

PLAYBACK CONTROLS

Always snapshot first.

CommandAction
Pauseclick button "Pause (k)"
Resume / Playclick button "Play (k)"
Nextpress Shift+n
Previouspress Shift+p
Change songStart new search from Step 1
Stopplaywright-cli -s=music_player close

Keyboard shortcuts (reliable alternative when button refs are hard to locate):

k        → play / pause
Shift+n  → next track
Shift+p  → previous track
m        → mute / unmute
f        → fullscreen toggle
j        → rewind 10s
l        → forward 10s

Usage: playwright-cli -s=music_player press <key>


ERROR RECOVERY & EDGE CASES

If snapshot empty or missing critical refs

playwright-cli -s=music_player goto https://www.youtube.com

→ restart from Step 1.

If browser crashes or session disappears

playwright-cli list shows no music_player. Inform the user the browser was closed, then recreate session:

playwright-cli -s=music_player open https://www.youtube.com --headed --persistent

Because --persistent is used, the browser profile (including login state) is restored automatically. No need to log in again.

YouTube cookie consent / sign-in dialogs

Snapshot → locate dismiss actions:

  • "Accept all" / "全部接受"
  • "Reject all"
  • "No thanks" / "不用了,謝謝"
  • Close (X)

Click dismiss.

YouTube Premium trial popup

Snapshot → look for "No thanks", "不用了,謝謝", or a dismiss/close button → click to dismiss.

Video unavailable

Snapshot shows "Video unavailable" or similar error.

  • playwright-cli -s=music_player go-back → snapshot → try the next result link.

Cannot find elements in search results

  • Scroll down: playwright-cli -s=music_player press PageDown → snapshot again.

Page frozen or blank

  • playwright-cli -s=music_player reload → snapshot.
  • If still broken: playwright-cli -s=music_player close → reopen and retry from Step 1.

Persistent profile corrupted or login expired

If the browser opens but login state is lost, or YouTube forces re-authentication:

  1. Inform the user they need to log in again in the browser.
  2. After login, the persistent profile will be updated automatically.

To completely reset the profile (last resort):

playwright-cli -s=music_player close
playwright-cli -s=music_player delete-data
playwright-cli -s=music_player open https://www.youtube.com --headed --persistent

REFERENCES

适合场景

01

生成背景音乐

02

生成歌曲或旋律

03

视频和播客配乐

04

社媒内容音频素材

能力概览

能力 1

调用音乐生成模型

能力 2

支持文本到音乐或歌曲生成

能力 3

提供 CLI 示例和使用场景

能力 4

适合音频内容工作流

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

89.3%
按下载量换算18,462

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

未展示

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills