clipboard
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseYour Task
你的任务
Input: $ARGUMENTS
Copy content from track files to the system clipboard for pasting into Suno or other tools.
输入:$ARGUMENTS
将曲目文件中的内容复制到系统剪贴板,以便粘贴到Suno或其他工具中。
Clipboard Skill
剪贴板技能
Copy specific sections from track files directly to your clipboard.
直接从曲目文件中复制特定部分到剪贴板。
Step 1: Detect Platform & Check Clipboard Tool
步骤1:检测平台并检查剪贴板工具
Run detection:
bash
if command -v pbcopy >/dev/null 2>&1; then
echo "macOS"
elif command -v clip.exe >/dev/null 2>&1; then
# clip.exe is a built-in Windows utility (System32). Reachable both from WSL
# via interop and from a native-Windows shell such as Git Bash, so this one
# branch covers both. Verified on a windows-latest runner: Git Bash present,
# clip.exe resolved at /c/Windows/system32/clip.exe, copy round-tripped.
echo "Windows/WSL"
elif command -v xclip >/dev/null 2>&1; then
echo "Linux-xclip"
elif command -v xsel >/dev/null 2>&1; then
echo "Linux-xsel"
else
echo "NONE"
fiIf NONE:
Error: No clipboard utility found.
Install instructions:
- macOS: pbcopy (built-in)
- Linux: sudo apt install xclip
- Windows (native) and WSL: clip.exe (built-in)运行检测:
bash
if command -v pbcopy >/dev/null 2>&1; then
echo "macOS"
elif command -v clip.exe >/dev/null 2>&1; then
# clip.exe is a built-in Windows utility (System32). Reachable both from WSL
# via interop and from a native-Windows shell such as Git Bash, so this one
# branch covers both. Verified on a windows-latest runner: Git Bash present,
# clip.exe resolved at /c/Windows/system32/clip.exe, copy round-tripped.
echo "Windows/WSL"
elif command -v xclip >/dev/null 2>&1; then
echo "Linux-xclip"
elif command -v xsel >/dev/null 2>&1; then
echo "Linux-xsel"
else
echo "NONE"
fi如果结果为NONE:
错误:未找到剪贴板工具。
安装说明:
- macOS:pbcopy(内置)
- Linux:sudo apt install xclip
- Windows(原生)和WSL:clip.exe(内置)Step 2: Parse Arguments
步骤2:解析参数
Expected format:
<content-type> <album-name> <track-number>Content types:
- - Suno Lyrics Box
lyrics - - Suno Style Box (auto-appends Exclude Styles if present)
style - - Exclude Styles only (negative prompts)
exclude - - Streaming Lyrics (for distributors)
streaming-lyrics - - All Suno inputs (Style + Exclude + Lyrics combined)
all - - JSON object (title, style, exclude_styles, lyrics) for Suno auto-fill via Tampermonkey
suno
Examples:
/clipboard lyrics sample-album 03/clipboard style sample-album 05/clipboard streaming-lyrics sample-album 02/clipboard all sample-album 01
If arguments are missing:
Usage: /clipboard <content-type> <album-name> <track-number>
Content types: lyrics, style, exclude, streaming-lyrics, all, suno
Example: /clipboard lyrics sample-album 03预期格式:
<content-type> <album-name> <track-number>内容类型:
- - Suno歌词框
lyrics - - Suno风格框(如果存在自动追加排除风格)
style - - 仅排除风格(负面提示词)
exclude - - 流式歌词(用于发行商)
streaming-lyrics - - 所有Suno输入内容(风格+排除风格+歌词组合)
all - - JSON对象(标题、风格、exclude_styles、歌词),用于通过Tampermonkey自动填充Suno
suno
示例:
/clipboard lyrics sample-album 03/clipboard style sample-album 05/clipboard streaming-lyrics sample-album 02/clipboard all sample-album 01
如果参数缺失:
用法:/clipboard <content-type> <album-name> <track-number>
内容类型:lyrics, style, exclude, streaming-lyrics, all, suno
示例:/clipboard lyrics sample-album 03Step 3: Extract Content via MCP
步骤3:通过MCP提取内容
Call — extracts and formats the requested content in one call.
format_for_clipboard(album_slug, track_slug, content_type)- :
content_type,"lyrics","style","exclude","streaming", or"all""suno" - Returns the formatted content ready for clipboard
- Handles track resolution, section extraction, and formatting automatically
If track not found: MCP returns an error with available tracks.
调用 —— 一次调用即可提取并格式化所需内容。
format_for_clipboard(album_slug, track_slug, content_type)- :
content_type,"lyrics","style","exclude","streaming", 或"all""suno" - 返回可直接复制到剪贴板的格式化内容
- 自动处理曲目解析、部分提取和格式化
如果未找到曲目: MCP会返回错误并列出可用曲目。
Step 6: Copy to Clipboard
步骤6:复制到剪贴板
Use the detected platform's clipboard command:
| Platform | Command |
|---|---|
| macOS | |
| Windows (native) / WSL | |
| Linux (xclip) | |
| Linux (xsel) | |
Example (use to safely handle special characters in lyrics):
printf '%s'bash
printf '%s' "$content" | pbcopy # macOS
printf '%s' "$content" | xclip -selection clipboard # Linux使用检测到的平台对应的剪贴板命令:
| 平台 | 命令 |
|---|---|
| macOS | |
| Windows(原生)/ WSL | |
| Linux(xclip) | |
| Linux(xsel) | |
示例(使用 安全处理歌词中的特殊字符):
printf '%s'bash
printf '%s' "$content" | pbcopy # macOS
printf '%s' "$content" | xclip -selection clipboard # LinuxStep 7: Confirm
步骤7:确认
Report:
✓ Copied to clipboard: {content-type} from track {track-number}
Album: {album}
Track: {track-filename}反馈信息:
✓ 已复制到剪贴板:{content-type} 来自曲目 {track-number}
专辑:{album}
曲目:{track-filename}Error Handling
错误处理
Track file not found:
Error: Track {track-number} not found in album {album}
Available tracks:
- 01-track-name.md
- 02-track-name.mdContent section not found:
Error: {content-type} section not found in track {track-number}
The track file may not have this section yet.Config missing:
Error: Config not found at ~/.bitwize-music/config.yaml
Run /configure to set up.未找到曲目文件:
错误:专辑 {album} 中未找到曲目 {track-number}
可用曲目:
- 01-track-name.md
- 02-track-name.md未找到内容部分:
错误:曲目 {track-number} 中未找到 {content-type} 部分
该曲目文件可能尚未包含此部分内容。缺少配置:
错误:未在 ~/.bitwize-music/config.yaml 找到配置文件
运行 /configure 进行设置。Examples
示例
Copy Suno Lyrics
复制Suno歌词
/clipboard lyrics sample-album 03Output:
✓ Copied to clipboard: lyrics from track 03
Album: sample-album
Track: 03-t-day-beach.md/clipboard lyrics sample-album 03输出:
✓ 已复制到剪贴板:来自曲目03的歌词
专辑:sample-album
曲目:03-t-day-beach.mdCopy Style Prompt
复制风格提示词
/clipboard style sample-album 05/clipboard style sample-album 05Copy Streaming Lyrics
复制流式歌词
/clipboard streaming-lyrics sample-album 02/clipboard streaming-lyrics sample-album 02Copy All Suno Inputs
复制所有Suno输入内容
/clipboard all sample-album 01Output:
✓ Copied to clipboard: all suno inputs from track 01
Album: sample-album
Track: 01-intro.md
Contents:
- Style Box (with Exclude Styles if present)
- Lyrics Box/clipboard all sample-album 01输出:
✓ 已复制到剪贴板:来自曲目01的所有Suno输入内容
专辑:sample-album
曲目:01-intro.md
内容包含:
- 风格框(如果存在则包含排除风格)
- 歌词框Copy Suno Auto-Fill JSON
复制Suno自动填充JSON
/clipboard suno sample-album 01Output:
✓ Copied to clipboard: suno auto-fill JSON from track 01
Album: sample-album
Track: 01-intro.md
Clipboard contains JSON with: title, style, exclude_styles, lyrics
Paste into Suno with the Tampermonkey auto-fill script (Ctrl+Shift+V).
See tools/userscripts/README.md for setup./clipboard suno sample-album 01输出:
✓ 已复制到剪贴板:来自曲目01的Suno自动填充JSON
专辑:sample-album
曲目:01-intro.md
剪贴板包含以下字段的JSON:title, style, exclude_styles, lyrics
使用Tampermonkey自动填充脚本粘贴到Suno中(Ctrl+Shift+V)。
查看 tools/userscripts/README.md 获取设置说明。Implementation Notes
实现说明
Clipboard Detection:
- Check multiple tools in order of preference
- is built into Windows, so it serves both native Windows (via Git Bash) and WSL (via interop)
clip.exe - If no bash is available at all, PowerShell's is an equivalent native fallback (verified working)
Set-Clipboard - Linux users may have either or
xclipxsel
Content Extraction:
- MCP handles all section extraction and formatting
format_for_clipboard - No manual file parsing needed
Multiple Matches:
- If track number matches multiple files (shouldn't happen), use the first match
- Warn user if directory structure looks wrong
剪贴板检测:
- 按优先级顺序检查多个工具
- 是Windows内置工具,可同时支持原生Windows(通过Git Bash)和WSL(通过互操作)
clip.exe - 如果完全没有bash环境,PowerShell的 是等效的原生备选方案(已验证可用)
Set-Clipboard - Linux用户可能安装了 或
xclipxsel
内容提取:
- MCP的 处理所有部分提取和格式化工作
format_for_clipboard - 无需手动解析文件
多匹配情况:
- 如果曲目编号匹配多个文件(理论上不会发生),使用第一个匹配项
- 如果目录结构异常,向用户发出警告