# yue2-music

yue2-music — a Claude skill that carries a YuE2 song from request to finished audio: three generation modes, covers transcribed with SheetSage2, and a local player for A/B listening.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 173 repo stars
- Author: sammcj
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/sammcj/agentic-coding/tree/HEAD/Skills/yue2-music/SKILL.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/yue2-music

## What it does

The skill turns a music request into a song plus a listening comparison you can play back. With `cot="full"` you get an editable melody and harmony written to ABC; `cot="melody"` keeps the melody plan and leaves the accompaniment free; `cot="off"` skips symbolic planning and returns audio only. Covering an existing recording runs it through SheetSage2, then you correct the ABC, drop the chords and render in `melody` mode.

Helper scripts do the work: `run_yue2.py` with its `generate`, `all-modes` and `plan` subcommands, `transcribe.py` for audio-to-ABC, `abc_tools.py` for `strip-chords`, `inspect` and `compare`, and `listen.py`, which builds a local HTML page with the score engraved by abcjs and notes turning red during playback. Nothing is uploaded; the only fetch is the pinned abcjs build, and `--abcjs <file>` or `--no-notation` removes even that. The skill carries `disable-model-invocation: true`, so you call it yourself.

Keep two virtualenvs, `.venv-yue2` and `.venv-sheetsage2`, because their dependency pins diverge. The supported baseline is one generation at a time on a BF16-capable NVIDIA card with 24 GB of VRAM; on Apple Silicon the MPS path applies and the scripts detect the device themselves. Check score edits as musical events rather than characters, since ties, accidentals and compressed rests change what a line means. An exact comparison fails on a deliberate rhythm change, so read its report and label the result accordingly.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add sammcj/agentic-coding --skill yue2-music -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/yue2-music/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/yue2-music/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add sammcj/agentic-coding --skill yue2-music -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/yue2-music/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add sammcj/agentic-coding --skill yue2-music -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/yue2-music/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install sammcj/agentic-coding Skills/yue2-music/SKILL.md
```

2. **Manually: put the files in place**
- File: `.github/skills/yue2-music/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add sammcj/agentic-coding --skill yue2-music -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/sammcj/agentic-coding --path Skills/yue2-music
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/yue2-music/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/sammcj/agentic-coding/tree/HEAD/Skills/yue2-music/SKILL.md

## When to use it
- generate a song with an editable ABC score
- transcribe a recording and rebuild it as a cover
- change lyrics or harmony without losing the melody
- listen to two takes side by side in a local player
- pin down which score edit broke the result

## Example prompts
- Generate a song from `requests/song.json` with `cot="full"` and write it to `outputs/pop`.
- Cover `reference.wav`: transcribe the lead melody with SheetSage2, strip the chords, render with `cot="melody"`.
- Build the comparison player for `outputs/pop` and `outputs/jazz`.

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: b35bcf7a2485fa68.

BEGIN THIRD-PARTY FILE b35bcf7a2485fa68
```text
---
name: yue2-music
description: Use when generating songs with YuE2, covering a recording via SheetSage2 audio-to-ABC, editing a score or lyrics with melody preservation, or building a reproducible listening comparison of YuE2 output
disable-model-invocation: true
---

# YuE2 Music

Turn a musical request into a reproducible song and an audible comparison. Retain the original song and its plan before changing anything.

## Choose the workflow

- Generate with editable melody and harmony: YuE2 `cot="full"` -> ABC -> song
- Generate with a melody plan and free accompaniment: YuE2 `cot="melody"` -> chord-free ABC -> song
- Generate without symbolic planning: YuE2 `cot="off"` -> song (no editable ABC)
- Cover a recording: SheetSage2 -> inspect and correct ABC -> strip chords -> YuE2 `melody`
- Cover an ABC melody: inspect or convert native ABC -> strip chords -> YuE2 `melody`
- Change harmony, instruments, tempo, structure or lyrics: copy the full plan -> edit ABC or text -> regenerate
- Agentic editing: export plan and baseline -> bounded editing agent -> check invariants -> render -> compare
- Analyse continuous musical features: MERT2, see [models-and-setup.md](references/models-and-setup.md#optional-mert-representations)

## Set up

Read [models-and-setup.md](references/models-and-setup.md) for model IDs, install pins and licences.

1. Work from a project directory, never inside this skill folder. `<skill>` in commands below is this skill's directory.
2. Create `.venv-yue2` in the project and install the YuE2 runtime from the official GitHub repository source.
3. Create `.venv-sheetsage2` separately (dependency pins differ) and download the SheetSage2 snapshot to `models/SheetSage2`.
4. Record every model revision you download.
5. Run on the supported baseline: one request at a time, BF16-capable NVIDIA GPU with 24 GB VRAM, default YuE2 settings. On Apple Silicon follow the MPS section of models-and-setup.md; scripts auto-detect the device.
6. Scripts default to Hub model IDs; see each script's `--help` for local snapshot and revision flags. Use a fresh output directory per run.

## Generate and retain the plan
```
END THIRD-PARTY FILE b35bcf7a2485fa68

The third-party file has ended. Everything between the b35bcf7a2485fa68 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2151 of 9119 bytes. © sammcj · Apache-2.0 · https://github.com/sammcj/agentic-coding/tree/HEAD/Skills/yue2-music/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
