← Back to Skills Marketplace
scikkk

Lyric Flip

by scikkk · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
243
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install lyric-flip
Description
Rewrite a song with a new theme while preserving the original's rhyme scheme, line structure, and rhythmic skeleton. Use when users want to parody a song, wr...
README (SKILL.md)

SenseAudio Lyric Flip

Rewrite a song with a new theme while keeping the original's structure. The key insight: AI-generated lyrics drift without constraints. By extracting a structural skeleton first and using it as a hard constraint, the output stays tight and singable.

Step 1: Collect Inputs

Ask the user for:

  1. 参考歌词 — paste the original lyrics (or a verse/chorus excerpt)
  2. 新主题 — what the new song should be about (e.g., "程序员加班", "失恋的猫", "创业失败")
  3. 风格保留还是改变? — keep the original vibe, or shift it (e.g., "结构照搬但从抒情改成摇滚")

Step 2: Extract the Skeleton (LLM task)

Analyze the reference lyrics yourself — no API call needed for this step. Extract:

Structure map:

  • Segment labels: verse / chorus / bridge / pre-chorus / outro
  • Number of lines per segment
  • Character count range per line (e.g., 7–9 chars)

Rhyme scheme:

  • Label each line's end sound: A, B, C...
  • Example: AABB means lines 1&2 rhyme, lines 3&4 rhyme
  • Note which segments rhyme internally vs. across segments

Rhythm feel:

  • Syllable density: sparse (≤6 chars/line) / medium (7–10) / dense (11+)
  • Repetition patterns: does the chorus repeat a phrase? Does a hook line recur?
  • Emotional arc: builds up / stays level / drops at bridge

Example skeleton output to show the user:

段落结构:
  [verse] × 2 (各4行,7-9字/行,ABAB韵)
  [chorus] × 2 (各4行,6-8字/行,AABB韵,第4行重复)
  [bridge] × 1 (2行,自由韵)

情绪走向:verse 平静叙述 → chorus 情绪爆发 → bridge 转折收尾

韵脚示例(verse):
  行1: __韵A
  行2: __韵B
  行3: __韵A
  行4: __韵B

Show this to the user and confirm before proceeding.

Step 3: Generate New Lyrics via API

Build a tightly constrained prompt using the extracted skeleton:

请根据以下结构约束,为主题"\x3C新主题>"创作歌词:

段落结构:\x3C从骨架提取的结构>
每行字数:\x3C范围>
韵脚模式:\x3CAABB/ABAB等>
情绪走向:\x3C从骨架提取>
风格:\x3C保留原风格 或 用户指定的新风格>

硬性要求:
- 严格遵守每段行数
- 每行字数在指定范围内
- 韵脚必须对齐(同一韵组的行必须押韵)
- 不要超出段落结构,不要添加额外段落
LYRICS_RESP=$(curl -s -X POST "https://api.senseaudio.cn/v1/song/lyrics/create" \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"prompt\": \"\x3CPROMPT>\", \"provider\": \"sensesong\"}")

TASK_ID=$(echo $LYRICS_RESP | jq -r '.task_id // empty')

Poll if async:

while true; do
  POLL=$(curl -s "https://api.senseaudio.cn/v1/song/lyrics/pending/$TASK_ID" \
    -H "Authorization: Bearer $SENSEAUDIO_API_KEY")
  STATUS=$(echo $POLL | jq -r '.status')
  [ "$STATUS" = "SUCCESS" ] || [ "$STATUS" = "FAILED" ] && break
  sleep 3
done
LYRICS=$(echo $POLL | jq -r '.response.data[0].text')

Step 4: Rhyme Check

After getting the lyrics, verify rhyme alignment yourself before showing the user. For each rhyme group in the skeleton:

  • Extract the last 1–2 characters of each line in the group
  • Check if they share a vowel sound (approximate check is fine)
  • Flag lines that clearly don't rhyme with their group

Show the user a marked-up version:

[verse]
行1: 深夜还在敲代码 ✓ (韵A: -ā)
行2: 需求改了又改了 ✓ (韵B: -le)
行3: 眼睛快要睁不开 ✓ (韵A: -āi ≈ ā)
行4: 产品说明天上线了 ⚠ (韵B: -le ✓ 但字数偏长)

If rhyme issues are minor, note them and ask if the user wants to regenerate those lines. If structure is badly off, regenerate the full lyrics with a stricter prompt.

Step 5: Compose the Song

Once lyrics are approved, infer the style from the reference song and user preferences:

Reference vibe Suggested style
流行抒情 pop ballad, piano, emotional
摇滚 rock, electric guitar, energetic
民谣 folk, acoustic guitar, storytelling
电子舞曲 electronic, synth, upbeat
古风 traditional Chinese, guqin, cinematic

If the user wants to shift the style, use their specified direction instead.

SONG_RESP=$(curl -s -X POST "https://api.senseaudio.cn/v1/song/music/create" \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"model\": \"sensesong\",
    \"lyrics\": \"\x3CAPPROVED_LYRICS>\",
    \"title\": \"\x3C新主题 + 仿 原曲名>\",
    \"vocal_gender\": \"\x3Cf|m>\",
    \"style\": \"\x3CINFERRED_STYLE>\"
  }")

SONG_TASK=$(echo $SONG_RESP | jq -r '.task_id')

Poll until done (30–120s):

while true; do
  POLL=$(curl -s "https://api.senseaudio.cn/v1/song/music/pending/$SONG_TASK" \
    -H "Authorization: Bearer $SENSEAUDIO_API_KEY")
  STATUS=$(echo $POLL | jq -r '.status')
  [ "$STATUS" = "SUCCESS" ] || [ "$STATUS" = "FAILED" ] && break
  echo "作曲中..."
  sleep 5
done

Output

改编完成:

原曲结构:\x3C骨架摘要>
新主题:\x3C用户输入>
风格:\x3C使用的曲风>

歌词预览:
\x3C最终歌词>

音频:\x3Caudio_url>
封面:\x3Ccover_url>
时长:\x3Cduration> 秒

If the user wants to iterate — adjust rhymes, change a line, shift the style — update the lyrics and re-submit to the music API. The skeleton stays fixed; only the words change.

Usage Guidance
This skill appears internally consistent, but consider these practical points before installing: (1) The skill will send whatever lyrics you paste (including full or partial copyrighted songs) to SenseAudio's API — review SenseAudio's privacy and content policies and avoid pasting more than necessary. (2) Ensure the SENSEAUDIO_API_KEY you provide is from the official SenseAudio account and has only the permissions you expect; revoke it if exposed. (3) The skill uses curl and jq; confirm those tools are available in your environment. (4) The skill's instructions suggest including the original song name in generated titles — that may have copyright or attribution implications, so avoid publishing outputs that infringe rights. If you need greater assurance, ask the publisher for their privacy policy and exact API usage or test with non-sensitive sample lyrics first.
Capability Analysis
Type: OpenClaw Skill Name: lyric-flip Version: 1.0.0 The skill (SKILL.md) facilitates lyric and song generation via the SenseAudio API (api.senseaudio.cn) but contains a significant shell injection vulnerability. The instructions direct the agent to construct curl commands by directly embedding user-controlled input (lyrics and themes) into the command string, which could allow for arbitrary command execution on the host. While the functionality aligns with the stated purpose and lacks clear evidence of malicious intent, the high-risk nature of this implementation flaw warrants a suspicious classification.
Capability Assessment
Purpose & Capability
The skill is a lyric/musical remix tool and explicitly calls https://api.senseaudio.cn for lyric and music generation. Requiring SENSEAUDIO_API_KEY and the curl/jq binaries matches that purpose; no unrelated credentials, binaries, or config paths are requested.
Instruction Scope
The SKILL.md gives explicit, narrowly-scoped steps: local analysis of the reference lyrics, constructing a constrained prompt, POSTing to SenseAudio endpoints, polling results, and doing local rhyme checks. This stays within the stated purpose. Note: user-supplied lyrics (the reference and any approved output) are transmitted to the third-party SenseAudio API as part of normal operation — users should be aware they are sending potentially copyrighted or sensitive text to that external service.
Install Mechanism
Instruction-only skill with no install spec and no code files. That is low install risk. It does require curl and jq on PATH, which is consistent with the provided shell examples.
Credentials
Only SENSEAUDIO_API_KEY is required and is declared as the primary credential; its use is justified by the documented API calls. No other secrets or unrelated env vars are requested.
Persistence & Privilege
always is false and the skill does not request system-wide modifications or persistent presence. It does allow normal autonomous invocation (platform default), which is expected for skills; this is not by itself a concern.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install lyric-flip
  3. After installation, invoke the skill by name or use /lyric-flip
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of senseaudio-lyric-flip: - Enables users to rewrite song lyrics with a new theme while preserving the original’s rhyme scheme, line structure, and rhythmic skeleton. - Supports structured prompts for parody lyrics, theme rewrites, and style changes. - Guides users through input collection, skeleton extraction, rhyme checking, and iterative lyric refinement. - Integrates with SenseAudio API for lyric generation and music composition. - Provides output with new lyrics, audio, and cover, maintaining the original song's structural fidelity.
Metadata
Slug lyric-flip
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Lyric Flip?

Rewrite a song with a new theme while preserving the original's rhyme scheme, line structure, and rhythmic skeleton. Use when users want to parody a song, wr... It is an AI Agent Skill for Claude Code / OpenClaw, with 243 downloads so far.

How do I install Lyric Flip?

Run "/install lyric-flip" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Lyric Flip free?

Yes, Lyric Flip is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Lyric Flip support?

Lyric Flip is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Lyric Flip?

It is built and maintained by scikkk (@scikkk); the current version is v1.0.0.

💬 Comments