← 返回 Skills 市场
boner-bbb

musicful music generator

作者 boner-bbb · GitHub ↗ · v2.0.1 · MIT-0
cross-platform ✓ 安全检测通过
481
总下载
4
收藏
2
当前安装
7
版本数
在 OpenClaw 中安装
/install musicful-music-generator
功能描述
Generate AI music or lyrics from natural language with a single sentence. The system auto-detects whether to create a vocal song or pure instrumental BGM, an...
使用说明 (SKILL.md)

Music Generator Skill (Full SOP)

Capability Overview

This skill supports the following intents:

  1. Generate a full song with lyrics
  2. Generate pure background music (BGM)
  3. Generate lyrics only (no audio)
  4. Query music generation task status

Users can describe the music they want in plain language. The system auto-determines the mode and handles parameter inference and task tracking.


Triggers and Natural Language Examples

The following natural language requests will trigger this skill:

  • Generate a romantic love song
  • Write lyrics about the night sky
  • Create electronic music suitable for short‑video background
  • Check my music generation progress
  • I want a cheerful background music track

Execution (SOP Step‑by‑Step)

Preflight Check (Mandatory)

  • Read MUSICFUL_API_KEY from the skill folder’s .env (resolved at runtime via the running script path): \x3Cskill_root>/.env
    • If not configured (empty/missing), immediately inform the user:
    • Stop subsequent calls and wait for the user to complete configuration before continuing.

The execution flow is intent‑based and incorporates a two‑stage return and a "lyrics‑first" UX:

  • Single command entry: /music_generator, with mode branch control:
    • mode=normal (default): generate and show lyrics → submit generation → return preview (status=2) → return final (status=0)
    • mode=bgm: pure music (instrumental=1), no lyrics → preview first → then final
    • mode=lyrics: return lyrics text immediately
  • When using the "custom lyrics" path (built into the normal flow or future extensions): submit generation directly and poll (preview first, then final)

Scenario A: Generate a Full Song with Lyrics

Typical user inputs:

  • Generate a romantic electronic song
  • Write a sad rock song and generate audio
  • Here are some lyrics, please use them to create the song: [...user‑provided lyrics...]

Detailed Flow

Step 1: Intent Recognition

  • If the user provides complete lyrics, treat it as lyrics‑provided generation;
  • Otherwise, assume lyrics need to be generated automatically and then used to synthesize the song.

Step 2: Lyrics Handling

  • If lyrics are provided → use them directly;
  • If not provided → call the V1 Lyrics API to generate lyrics content;

Step 3: Submit Music Generation Task

  • POST {BASE_URL}/v1/music/generate
  • body: { action: "custom", lyrics: "\x3Clyrics>", style: "\x3Cinferred from user>", mv: "\x3Cdefault to latest high‑quality model>" }

Step 4: Automatic Task Polling (Two Stages)

  • GET {BASE_URL}/v1/music/tasks?ids=\x3Ctask_id[,task_id2,…]>
  • Status semantics (key):
    • status = 2 → preview stage complete (returns audio_url as preview link)
    • status = 0 → full audio complete (returns audio_url as downloadable final link)
    • others → processing or failed (use fail_code/fail_reason)
  • Polling strategy:
    1. On first status=2: immediately announce "preview is ready" and return audio_url for listening;
    2. Continue polling until status=0: then return "final audio is ready" with audio_url (download/publish).

Step 5: Return Results to the User (Two‑Stage × Two Songs)

  • The system by default generates two songs/two task_ids (e.g., ids=[id1,id2]). For each id, perform the two‑stage return independently:
    • Stage 1: when this id reaches status=2 → return the preview link (audio_url)
    • Stage 2: keep polling this id → when status=0 → return the full mp3 download link (audio_url)
  • Recommended output format (one block per song):
    • title: \x3Ctitle>
    • prompt: \x3Coriginal user description>
    • lyrics: \x3Cfull lyrics for lyric mode; empty for BGM>
    • preview: \x3Cpreview link (status=2)>
    • full: \x3Cfinal mp3 (status=0)>

Scenario B: Generate Pure Background Music

:white_check_mark: Typical user inputs:

  • Generate a piece of pure background music
  • I want an electronic instrumental suitable for video background

Detailed Flow

Step 1: Intent Recognition

  • Detect semantics like "pure music/background music/accompaniment" → enter the pure BGM flow.

Step 2: Submit Music Generation Task

  • POST {BASE_URL}/v1/music/generate
  • body: { action: "auto", style: "\x3Cinferred from user>", mv: "\x3Cdefault latest model>", instrumental: 1 }

Step 3: Automatic Task Polling (Two Stages)

  • Same as Scenario A: status=2 → preview; status=0 → full

Step 4: Return Preview & Final Links (Two Steps)

  • Stage 1: preview link (status=2)
  • Stage 2: final link (status=0)

Scenario C: Generate Lyrics Only

:white_check_mark: User inputs:

  • Write lyrics about a summer beach
  • I only need lyrics, about a rainy day

Process

  • POST {BASE_URL}/v1/lyrics body: { prompt: "\x3Cuser description>" }
  • Return: { lyrics: "\x3CAI‑generated lyrics>" }

Scenario D: Query Music Generation Task Status

:white_check_mark: User inputs:

  • Check the progress of task_id=abc123
  • See how far my song generation has progressed

Detailed Flow

  1. Extract task_id from the user input;
  2. GET {BASE_URL}/v1/music/tasks?ids=\x3Ctask_id>
  3. Return task status and audio information.

Parameter Inference Rules

Parameter Source Default/Notes
style Inferred from user input Default to Pop/general if none
mv Default high‑quality Prefer latest high‑quality
instrumental Set to 1 for BGM Otherwise 0
lyrics User‑provided / auto
title Inferred or auto‑named

BASE_URL and API Key:

  • MUSICFUL_BASE_URL (default: https://api.musicful.ai)
  • MUSICFUL_API_KEY (read from the skill folder’s .env; environment variable MUSICFUL_API_KEY is also honored if set)
  • Entry points: scripts/musicful_api.py, CLI: scripts/run_musicful.py / scripts/dispatch_music_generator.py
  • Important: ensure MUSICFUL_API_KEY is configured before calling; if missing, the server may respond with HTTP 500 (helps pinpoint auth/config issues quickly).

Error Handling and Fallback

  1. If the request is unclear (e.g., "generate music" without clarifying lyrics vs BGM) → ask a follow‑up;
  2. If the API call fails → return clear failure reason and suggestions;
  3. If polling times out → prompt the user to wait or retry.

Unified Return Format

Success:

{ "status": "success", "data": { ... } }

Error:

{ "status": "error", "message": "\x3Creason>" }

Example Dialogues

  • User: Generate a sad rock song

  • Skill: Shows generated lyrics → submits job → returns preview link → returns full mp3 link

  • User: An ambient BGM for a quiet night

  • Skill: Submits job (instrumental=1) → returns preview → returns full

  • User: Write lyrics about the night sky

  • Skill: Returns generated lyrics

安全使用建议
This skill appears coherent and only needs a Musicful API key to contact api.musicful.ai and return preview/final audio links. Before installing: (1) be aware that registry metadata omitted the required MUSICFUL_API_KEY even though the code and plugin.json require it — you'll need to create a .env in the skill folder or export the key; (2) the repo includes requirements.txt but no install steps, so ensure your agent environment has requests and python-dotenv installed or the scripts will fail; (3) review the included Python files if you don't trust the unknown source (they perform HTTP calls and print results but do not access unrelated files or secrets); (4) the skill communicates with an external service, so any content you send will be transmitted to that API — don't submit sensitive secrets or private data. If you need higher assurance, ask the publisher for a homepage/source or use an officially published plugin with known provenance.
功能分析
Type: OpenClaw Skill Name: musicful-music-generator Version: 2.0.1 The musicful-music-generator skill bundle is a legitimate integration for the Musicful AI service (api.musicful.ai). The code in scripts/musicful_api.py and scripts/dispatch_music_generator.py implements standard API interaction and polling logic for asynchronous music generation tasks. It handles API keys via a local .env file or environment variables and provides clear instructions to the user if configuration is missing. No evidence of data exfiltration, malicious execution, or harmful prompt injection was found.
能力评估
Purpose & Capability
The skill's name/description match its code and runtime behavior: it calls an external music API to generate lyrics/music and polls tasks. Requiring an API key is expected. However, registry metadata claims no required env/config paths while plugin.json, SKILL.md, and the code clearly require MUSICFUL_API_KEY (and optionally MUSICFUL_BASE_URL). This mismatch is a packaging/metadata inconsistency worth noting.
Instruction Scope
SKILL.md and the scripts limit their runtime actions to reading the skill folder's .env for the API key and interacting with the external API endpoints (POST /v1/music/generate, POST /v1/lyrics, GET /v1/music/tasks, etc.). There are no instructions to read unrelated system files, exfiltrate local data, or contact unexpected endpoints.
Install Mechanism
There is no install spec (instruction-only installation) which is low-risk. The package includes a requirements.txt listing requests and python-dotenv but no provided install steps; that means the runtime environment may need those Python packages available or the skill may fail. No remote downloads or unknown URLs are used by the skill itself.
Credentials
The only secret required is MUSICFUL_API_KEY (and an optional MUSICFUL_BASE_URL). Those are proportional and necessary for the described external API usage. The skill does not request unrelated credentials or system secrets.
Persistence & Privilege
The skill is not force-enabled (always: false) and does not request special persistent privileges or modify other skills. It runs user-invoked Python scripts from the workspace; autonomous invocation is allowed by default but is not combined with other red flags here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install musicful-music-generator
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /musicful-music-generator 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.1
No changes detected in this version. - No file updates or documentation changes were made between versions.
v2.0.0
musicful-music-generator 1.0.6 - Updated API endpoint URLs to use the new musicful.ai domain (BASE_URL: https://api.musicful.ai). - Modified authentication instructions with updated key acquisition link (https://www.musicful.ai/api/authentication/interface-key/). - No code or logic changes detected; documentation and configuration URLs only.
v1.0.5
No code changes were detected in this release. Documentation has been revised for clarity and completeness. - SKILL.md updated with clearer, step-by-step instructions and unified formatting - Expanded scenario details for vocal song, BGM, lyrics-only, and task status use cases - Improved error handling and parameter inference descriptions - API preflight checks and environment variable requirements clarified - Added more natural language trigger examples for easier use
v1.0.4
**musicful-music-generator 1.0.4** - Added `.env.example` file to serve as a configuration template for environment variables. - No code or functional changes; this update assists users in correctly setting up required environment settings.
v1.0.3
musicful-music-generator v1.0.2 - Initial public release with complete functional workflow and documentation. - Added: API key management via `.env` and `.env.example`. - Added: Full README and user/developer guides. - Added: Core scripts for music generation, lyrics generation, status polling, MP4 conversion, and CLI invocation. - Feature: Supports natural language requests for generation of music (with or without lyrics), lyric-only requests, and task status queries. - Implements two-stage result returning (preview link, then full link) for improved user experience.
v1.0.1
- Updated the default API Key placeholder from a fixed value to _MUSICFUL_API_KEY_ throughout documentation and code examples. - No changes to functionality or interfaces.
v1.0.0
Music Generator skill initial release. - Generate music from user-provided lyrics or let the tool create both lyrics and music in various styles. - Supports querying the status of music creation tasks. - Allows converting generated music into MP4 video format. - Select from multiple model versions and music styles for customization. - API key management lets users override the default key.
元数据
Slug musicful-music-generator
版本 2.0.1
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 7
常见问题

musicful music generator 是什么?

Generate AI music or lyrics from natural language with a single sentence. The system auto-detects whether to create a vocal song or pure instrumental BGM, an... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 481 次。

如何安装 musicful music generator?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install musicful-music-generator」即可一键安装,无需额外配置。

musicful music generator 是免费的吗?

是的,musicful music generator 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

musicful music generator 支持哪些平台?

musicful music generator 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 musicful music generator?

由 boner-bbb(@boner-bbb)开发并维护,当前版本 v2.0.1。

💬 留言讨论