跳到正文
Skillpedia
音频与语音81k · #1661

music-generate

它能做什么

这项技能把简短的创作简述(例如类型、情绪或主题)转化为你音乐账户中完成的曲目。适合希望无需自己写乐谱,就能制作歌曲的人。

适用场景

  • ✓当你要求创作新歌、混音或曲目时。
  • ✓当你已有包含类型、情绪或语言的简述,并希望把它变成曲目时。
  • ✓当你希望歌曲有特定的时长时。

技能链接

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-music/skills/music-generate/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-music/skills/music-generate/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我做一首两分钟、节奏欢快的 Afrobeat 歌曲,主题是拉各斯的夏天,歌词用英文。”

每周 5 个新技能,1 分钟读完。

工作原理

这项技能根据你的简述编写结构化的歌词和详细的风格提示词,然后把两者连同你选择的时长一起发送给音乐服务。生成过程可能需要几分钟,因此技能会等待结果,而不是重复发送请求。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Music Generate

Turns a creative brief into a real, playable track through the user's own Cognitum Music account.

When to use

The user asks to create/generate/produce a song, remix, or track. If mcp__cogmusic__create_production isn't loaded, run music-connect first.

Steps

  1. Compose the two required inputs from the brief (delegate the actual writing to the music-composer agent for anything beyond a trivial brief — lyrics quality matters more than most callers expect):

    • lyrics — structured with [intro]/[verse]/[chorus]/[bridge]/[outro] tags, one section per line group. Match the language the user asked for; don't default to English if they named another language.
    • prompt — genre, BPM, instrumentation, and mood in one dense sentence. Be specific (e.g. "Afrobeat, 116 BPM, talking drum, shekere, horn section" beats "upbeat African music").
  2. Pick audio_duration (seconds, default 30 if unspecified). 90–150s covers a real verse/chorus/bridge structure; don't go far past 150s without the user asking — generation time and cost both scale with duration, and the model's documented ceiling is 300s.

  3. Call the tool — it blocks for real minutes, not seconds:

    mcp__cogmusic__create_production({
      title: "...",
      lyrics: "...",
      prompt: "...",
      audio_duration: 120,
    })
    

    Do not poll or retry mid-call — the underlying bridge (cogmusic@0.1.1+) already carries a long internal timeout. If it returns {"content":[{"text":"generation failed", ...}],"isError":true}, this is very likely a transient GPU-inference-service issue (see ADR-0001's Known reliability notes), not a bad prompt — retry once before concluding something is actually wrong with the request itself.

  4. On success, the result includes id, title, audio_duration, created_at_unix, and an audio_url. Fetch the audio itself (or hand the URL to the user) with:

    # Only send the token to the Cognitum Music host over https. The audio_url comes back in a tool result,
    # so treat it as untrusted: if the host is anything else, do NOT attach the token; show the URL to the user instead.
    case "$AUDIO_URL" in https://music.cognitum.one/*) curl -H "authorization: Bearer $COGMUSIC_TOKEN" "$AUDIO_URL" -o track.wav ;; *) echo "refusing: unexpected audio host" >&2 ;; esac
    

    Audio is never returned inline over MCP by design (see ADR-0001) — always a separate authenticated GET.

  5. Cache the result for later recall (namespace music-productions, see the plugin README's Namespace coordination section):

    mcp__plugin_ruflo-core_ruflo__memory_store({
      key: "production-<id>",
      value: JSON.stringify({ id, title, audio_url, prompt, lyrics, audio_duration, created_at_unix }),
      namespace: "music-productions",
    })
    

    Also store the brief that produced it (namespace music-briefs) so a later "make another one like that" can retrieve the exact prompt/lyrics shape that worked:

    mcp__plugin_ruflo-core_ruflo__memory_store({
      key: "brief-<id>",
      value: JSON.stringify({ id, brief: "<the user's original request>", prompt, lyrics }),
      namespace: "music-briefs",
    })
    
  6. Report back: title, duration, the audio_url, and a one-line summary of the style. Don't claim the audio "sounds like X" — you cannot hear it; describe what was requested, not the result.

Known reliability notes

The GPU inference service behind Cognitum Music has a real, documented history of intermittent generation failures (cold-start weight-loading races — see the upstream repo's ADR-0022/0023). A single retry resolves most transient failures. If two consecutive attempts with the same prompt/lyrics both fail, say so plainly rather than silently retrying a third time — that's a signal something's actually wrong on the service side, not bad luck.

常见问题

歌曲时长会影响什么?

时长越长,生成所需的时间和成本越高。因此对于完整的主歌和副歌结构,技能建议 90 到 150 秒。

它会使用我要求的语言吗?

会。技能会匹配你指定的歌词语言,而不会默认使用英文。

我需要先连接音乐账户吗?

需要。如果音乐工具没有加载,必须先运行连接技能。

详情

作者的原始描述

Generate a new song from a creative brief (genre, mood, language, BPM, theme) via the cogmusic MCP create_production tool

repo: ruvnet/ruflo

热度

GitHub 星标
81k
排名
#1661
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能