joeseesun/qiaomu-suno-master
GitHub: joeseesun/qiaomu-suno-master
一个将歌曲创意自动转化为 Suno 可用歌词、风格标签并生成音乐的全流程 Agent Skill。
Stars: 60 | Forks: 8
# qiaomu-suno-master


**[中文](#中文) | [English](#english)**
## 中文
你想让 AI 写歌,最麻烦的通常不是一句歌词,而是整套可用于 Suno 的结构:Hook、段落标记、风格标签、排除风格、登录态、下载路径。
`qiaomu-suno-master` 把这些揉成一个 Agent Skill:先按专业歌曲结构写歌词,再调用本地 Rust `suno` CLI 生成并下载音乐。
### 你会得到什么
- Suno-ready 歌词:`[Verse]`、`[Chorus]`、`[Bridge]`、`[Hook]` 等结构完整
- Style Description:例如 `punk-rock, male-vocals, distorted-guitars, fast-tempo`
- Exclude Styles:避免不想要的风格,例如 `auto-tune, trap, overly-polished`
- 三个歌名候选
- 不确定风格时,可先从 5000+ 音乐流派中推荐适合的 Suno tags
- 可选:直接生成并下载 MP3
- 面向音乐播放器/网站发布时,必须同时下载并校验带时间戳的 `.lrc`
- Manifest-first 工作流:用 `song.manifest.json` 记录标题、风格、clip IDs、MP3、LRC、封面和状态
- `suno_doctor.py` 预检本地 CLI、Node、Chrome/CDP 辅助和输出目录
- 从已有 Suno Clip ID 导出 MP3、视频/MTV、LRC、SRT、干净字幕、Markdown 歌词
- Chrome CDP 辅助:复用已登录 Chrome/Suno 会话
- Computer Use 网页生成路径:当 CLI/CDP 卡住时,直接操作 Suno Web UI,复制分享链接,再下载 MP3/LRC
### 安装
npx skills add joeseesun/qiaomu-suno-master
验证:
ls ~/.agents/skills/qiaomu-suno-master
### 前置条件
- [ ] 已安装 Rust `suno` CLI,或允许 skill 自动安装
cargo install suno --locked
suno --version
- [ ] 已登录 Suno
suno auth --login
suno auth
- [ ] 如果要复用 Chrome 登录态,Chrome 已开启远程调试
打开:
chrome://inspect/#remote-debugging
勾选 `Allow remote debugging for this browser instance`。
### 自然语言用法
用 qiaomu-suno-master 写一首朋克歌,主题是把音量打满
把这篇文章改成一首中文民谣,并生成 Suno 歌曲
生成一首世界音乐,女声男声合唱,鼓和长笛,下载到默认 Suno 文稿目录
我只有“深夜、空灵、梦幻”这几个感觉,先帮我选几个 Suno 风格再写歌
### 选择音乐风格
Skill 内置了 [`joeseesun/music-genre-finder`](https://github.com/joeseesun/music-genre-finder) 的风格数据库,可在写歌前把模糊情绪转成更精确的 Suno 风格标签:
~/.agents/skills/qiaomu-suno-master/scripts/find_music_genres.py \
"深夜 空灵 梦幻" \
--limit 5
也可以输出 JSON,方便后续自动生成 tags:
~/.agents/skills/qiaomu-suno-master/scripts/find_music_genres.py \
"raw energetic punk" \
--json
推荐做法:选 1-3 个主风格,再加人声、乐器、速度和情绪标签,例如:
garage-punk, punk-rock, raw-male-vocals, distorted-guitars, fast-tempo, anthemic
### CLI 生成
推荐先创建 manifest,再让统一工作流生成、下载、拉取 LRC 并回写状态:
python3 ~/.agents/skills/qiaomu-suno-master/scripts/run_workflow.py init \
--manifest "$OUTPUT_DIR/song.manifest.json" \
--title "把音量打满" \
--style "punk-rock, male-vocals, distorted-guitars, fast-tempo" \
--exclude "auto-tune, trap, overly-polished" \
--lyrics-file ./lyrics.txt \
--output-dir "$OUTPUT_DIR"
python3 ~/.agents/skills/qiaomu-suno-master/scripts/suno_doctor.py \
--output-dir "$OUTPUT_DIR"
python3 ~/.agents/skills/qiaomu-suno-master/scripts/run_workflow.py generate \
--manifest "$OUTPUT_DIR/song.manifest.json"
Dry-run 不会消耗 Suno 额度:
python3 ~/.agents/skills/qiaomu-suno-master/scripts/run_workflow.py generate \
--manifest "$OUTPUT_DIR/song.manifest.json" \
--dry-run
底层封装脚本仍可用于调试:
~/.agents/skills/qiaomu-suno-master/scripts/generate_with_suno.sh \
--title "把音量打满" \
--tags "punk-rock, male-vocals, distorted-guitars, fast-tempo" \
--exclude "auto-tune, trap, overly-polished" \
--lyrics-file ./lyrics.txt
默认输出到:
~/Documents/Suno/<歌曲名>/
除非你明确指定 `--output-dir`,不要把歌曲、字幕、LRC 或视频保存到当前项目目录。Agent 的当前工作目录通常只是执行上下文,不应该被当成音乐素材库。
默认会走 `--captcha`,优先使用上游 `suno` CLI 的 hCaptcha CDP solver 把请求真正提交到 Suno。
生成后下载到音乐播放器或网站发布目录时,不要只保存普通歌词。必须请求并校验 LRC:
~/.agents/skills/qiaomu-suno-master/scripts/download_clips.sh \
--ids "" \
--output-dir ./output \
--lyrics \
--lyrics-format lrc \
--require-lrc
如果 `--require-lrc` 失败,说明 Suno 还没有返回真实对齐歌词,或下载到的是普通歌词。此时不要上传发布,稍后重试:
~/.agents/skills/qiaomu-suno-master/scripts/export_suno_assets.py \
\
--format lrc \
--output ./output
~/.agents/skills/qiaomu-suno-master/scripts/validate_lrc.py ./output
如果这条路径在你的 Chrome 会话里报:
CDP Runtime.evaluate ws err: Connection reset...
如果你的会话里 captcha solver 不稳定,或你明确要跳过它:
~/.agents/skills/qiaomu-suno-master/scripts/generate_with_suno.sh ... --no-captcha
或传入 token:
~/.agents/skills/qiaomu-suno-master/scripts/generate_with_suno.sh ... --token "$HCAPTCHA_TOKEN"
### Computer Use 网页生成路径
当 CLI 提交卡住、CDP 确认弹窗不稳定,或你明确要求使用 Computer Use 时,走网页路径:
1. 打开 `https://suno.com/create`
2. 选择 Advanced 模式和目标模型
3. 填入 `lyrics.txt`、style tags、标题
4. 点击 Create,等待两条新歌曲出现在列表顶部
5. 逐条点击 Share,复制 Suno 分享链接
6. 解析分享链接里的真实 clip ID
7. 运行 manifest 下载流程:
python3 ~/.agents/skills/qiaomu-suno-master/scripts/run_workflow.py download \
--manifest "$HOME/Documents/Suno/<歌曲名>/song.manifest.json" \
--ids "ID1 ID2"
完整操作细节见:
references/computer-use-workflow.md
### 导出 SRT/LRC/MTV 素材
如果你已经有 Suno clip ID,可以直接导出字幕和素材:
~/.agents/skills/qiaomu-suno-master/scripts/export_suno_assets.py \
\
--format lyrics \
--clean-srt
导出音频 + 视频/MTV + 全部歌词格式:
~/.agents/skills/qiaomu-suno-master/scripts/export_suno_assets.py \
\
--format all \
--clean-srt
默认会按歌曲标题创建目录:
~/Documents/Suno/<歌曲名>/
格式说明:
- `audio`:下载音频
- `video`:下载 Suno 视频/MTV 文件(如果该 clip 可用)
- `json`:保存 timed lyrics 原始 JSON
- `lrc`:音乐播放器歌词
- `srt`:字幕文件
- `md`:带时间戳 Markdown 歌词,方便 AI/剪辑流程读取
- `lyrics`:等于 `json,lrc,srt,md`
- `all`:等于 `audio,video,json,lrc,srt,md`
清理已有 SRT:
~/.agents/skills/qiaomu-suno-master/scripts/clean_srt_for_mtv.py input.srt
### Troubleshooting
| 问题 | 解决 |
|---|---|
| `suno: command not found` | 运行 `cargo install suno --locked`,或执行 `scripts/ensure_suno_cli.sh` |
| `JWT expired` | 运行 `suno auth` 或 `suno auth --login` |
| `CDP Runtime.evaluate ws err` | 显式加 `--no-captcha`,或改用手动 `--token` |
| Chrome 反复弹调试确认 | 复用同一个 Suno 标签页,避免反复新开 tab;Chrome CDP 权限很高,这是安全确认 |
| 找不到 Suno 标签页 | 运行 `scripts/ensure_suno_chrome_session.sh` |
| 需要 SRT/MTV | 用 `scripts/export_suno_assets.py --format all --clean-srt` |
| LRC 对不上或只有段落标记 | 用 `download_clips.sh --lyrics --lyrics-format lrc --require-lrc` 重新获取;发布前必须跑 `scripts/validate_lrc.py` |
### 风险和限制
- 生成音乐会消耗 Suno 账号额度。
- Chrome CDP 可以控制本地浏览器标签页,只在可信本机环境使用。
- Suno API 和网页流程可能变化;如失败,先运行 `suno update --check` 和 `suno update`。
- 视频/MTV 下载取决于 Suno 是否为该 clip 提供 video asset。
- 风格推荐来自流派数据库与关键词匹配,最终仍需按歌曲主题做审美取舍。
## English
`qiaomu-suno-master` is an Agent Skill for turning a song brief into Suno-ready lyrics, style prompts, exclude tags, and generated audio through the local Rust `suno` CLI.
### Install
npx skills add joeseesun/qiaomu-suno-master
### Requirements
- [ ] Install the upstream `suno` CLI:
cargo install suno --locked
suno --version
- [ ] Authenticate Suno:
suno auth --login
suno auth
- [ ] Optional Chrome CDP login reuse:
Open `chrome://inspect/#remote-debugging` and enable `Allow remote debugging for this browser instance`.
### Example Prompts
Use qiaomu-suno-master to write a punk song about turning the volume all the way up.
Turn this article into a Chinese folk song and generate it with Suno.
Generate a world music track with duet vocals, hand drums, flute, and cinematic energy.
I only know the mood: late-night, ethereal, dreamy. Pick a few Suno styles first, then write the song.
### Genre Finder
The skill includes genre data from [`joeseesun/music-genre-finder`](https://github.com/joeseesun/music-genre-finder). Use it before writing lyrics when the style is vague:
~/.agents/skills/qiaomu-suno-master/scripts/find_music_genres.py \
"late night ethereal dreamy" \
--limit 5
### CLI Wrapper
~/.agents/skills/qiaomu-suno-master/scripts/generate_with_suno.sh \
--title "Turn It Up" \
--tags "punk-rock, male-vocals, distorted-guitars, fast-tempo" \
--exclude "auto-tune, trap, overly-polished" \
--lyrics-file ./lyrics.txt
The wrapper defaults to `--no-captcha` because the upstream CDP hCaptcha solver can be flaky in some Chrome sessions.
Default output:
~/Documents/Suno//
When the generated song will be uploaded to a music player or website, plain
Suno prompt lyrics are not enough. Download and validate timestamped LRC:
~/.agents/skills/qiaomu-suno-master/scripts/download_clips.sh \
--ids "" \
--output-dir ./output \
--lyrics \
--lyrics-format lrc \
--require-lrc
If the gate fails, retry aligned lyrics later and validate before publishing:
~/.agents/skills/qiaomu-suno-master/scripts/export_suno_assets.py \
\
--format lrc \
--output ./output
~/.agents/skills/qiaomu-suno-master/scripts/validate_lrc.py ./output
For `music.qiaomu.ai`, do not publish Suno's original cover. Generate a fresh
1:1 album cover from the validated lyrics with `qiaomu-image-generator`:
python3 ~/.agents/skills/qiaomu-image-generator/scripts/generate.py \
./cover.visual_config.json \
--workers 1 \
--no-insert \
--output ./cover.result.json
Use the `album_cover` template, `album-mondo-cover` style, a stable
`*-cover.png` filename, and a lyric-derived symbolic visual description with no
text. Upload that PNG as the track cover.
### Export Assets
~/.agents/skills/qiaomu-suno-master/scripts/export_suno_assets.py \
\
--format all \
--clean-srt
This can export audio, video/MTV assets, timed lyrics JSON, LRC, SRT, clean SRT, and Markdown lyrics.
Without `--output`, exported files are saved to `~/Documents/Suno//`.
### Credits
- [`paperfoot/suno-cli`](https://github.com/paperfoot/suno-cli)
- [`pasky/chrome-cdp-skill`](https://github.com/pasky/chrome-cdp-skill)
- [`joeseesun/suno-music-creator`](https://github.com/joeseesun/suno-music-creator)
标签:AI音乐生成, Cutter, Rust, Suno, 可视化界面, 智能代理, 网络流量审计, 逆向工具