polish-cover
Skill4 starsChanged 46 days agoMITView on GitHub
This skill should be used when the user wants a song's harmony timeline refined or a tsumugi-piano-cover MIDI polished with pianoize, e.g. "refine the harmony timeline of this song", "reconcile chordotomy's chords with the tsumugi transcription", "polish this tsumugi cover", "fix the wrong chords and slips in the piano cover", "judge the cover's candidates", "check my correction spec". Runs the local pianoize commands, weighs chordotomy's timeline, tsumugi's transcription and the cover's notes into one refined timeline, judges every candidate the finder lists, writes the correction spec, and leaves the final A/B listening to the user. Not for making a cover, a transcription or a chord timeline from audio.
In this repository6 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- arrange-coverSkill
- arrange-transcriptionSkill
- arrange-vocalSkill
- make-videoSkill
- prepare-songSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Inputs are read-only: Never modify, move or overwrite the timeline, the cover, the transcription or the melody MIDI.
- Very specific: line 19
Write only into
<out>: Never change pianoize's own files. - Very specific: line 25
Ask the user for any input that is missing and stop until you have it.
- Very specific: line 49
Decide: every segment where the sources disagree on the triad or the bass, following references/reconcile-harmony.md.
- Very specific: line 63
Confirm: run step 1 again with '<out>/<stem>.refined.chords.json' as the timeline and -o '<out>/evidence.refined.md'.
- Very specific: line 66
If nothing needs an edit, skip steps 3 to 5 and use <timeline> as the refined timeline.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Refine a song's harmony and polish its tsumugi piano cover
pianoize polishes a piano cover made by tsumugi-piano-cover instead of arranging the song again. This skill runs it in two phases:
- Harmony. Weigh chordotomy's chord timeline, tsumugi's transcription and the cover's notes against each other, and write a refined harmony timeline.
- Cover. Judge every place the finder flags in the cover against that timeline, and write a correction spec that pianoize applies to a copy of the cover.
pianoize's commands are deterministic and never call an LLM. You write two small JSON files, harmony-edits.json and corrections.json; pianoize validates them and writes the timeline and the MIDI. Never write a timeline or a MIDI file any other way. You cannot hear the result, so the user's A/B listening at the end is the final gate.
Rules
- No analysis is the answer key. chordotomy's chords, tsumugi's markers and the cover's notes each get things wrong. Weigh them against each other and check the notes before calling anything a mistake.
- Inputs are read-only. Never modify, move or overwrite the timeline, the cover, the transcription or the melody MIDI.
- Write only into
<out>. Never change pianoize's own files. - Never paste song content into the repository. A song's chords, notes, markers, lyrics and times stay in
<out>underwork/, which is never committed: none of it goes into docs, tests, code, commit messages or issues. - Audio never leaves the machine. Upload nothing.
Inputs
Ask the user for any input that is missing and stop until you have it. The prepare-song skill (../prepare-song/SKILL.md) makes the <cover>, <source> and <melody>, pianoize prepare writing cover.mid, source.mid and melody.mid into the song's directory; when they are missing, offer that skill and stop.
<timeline>: chordotomy's timeline of the song,<stem>.chords.json(or<stem>.edited.chords.json, saved by chordotomy's viewer with the user's corrections).<cover>: the cover MIDI made by tsumugi-piano-cover.<source>: tsumugi's transcription,source.mid, with its chord markers and its bass track.<melody>: tsumugi's melody MIDI.<out>: an output directory underwork/, named by the user (work/<song>/). Create it withmkdir -p.- For the renders at the end: FluidSynth on
PATHand a piano SoundFont (--soundfont, or$PIANOIZE_SOUNDFONT).
Single-quote every path in a command, writing a ' inside it as '\'': song file names carry spaces, brackets and other characters the shell would read.
Running pianoize
- Plugin root:
${CLAUDE_PLUGIN_ROOT}. If that is a directory with apyproject.tomlin it, this skill runs from the pianoize Claude Code plugin, and that directory is the plugin's own copy of pianoize: runuv run --project "<plugin root>" pianoize <command> …from the current directory. Its first run builds the environment, so allow a few minutes. Otherwise (empty, still a${…}placeholder, or nopyproject.tomlthere) there is no plugin root: in a pianoize checkout, runuv run pianoize <command> …there; anywhere else, tell the user to install the pianoize plugin, and stop. - Without
uvonPATH, tell the user to install it (https://docs.astral.sh/uv/) and stop. - Below,
pianoize <command> …stands for that command line. - The docs:
<plugin root>/docs/polishing.md, ordocs/polishing.mdin the checkout, documents the four polishing commands with their rules, thresholds and file formats;renderis indocs/evaluation.mdbeside it.pianoize <command> --helplists a command's options. Read the section a step names whenever its rules matter. - Errors. A failing command prints
error: …naming the item at fault (edits[3]: unknown note t1920p62). Fix that item and run the same command again. Exit 2 is a usage error: show its message.
This skill is written for version 11 of chordotomy's timeline (schema_version). pianoize refuses a timeline of any other version, naming both: tell the user the timeline comes from another chordotomy version, and stop.
Phase 1: the refined harmony timeline
- Gather the evidence:
pianoize harmony-evidence '<cover>' '<timeline>' --source '<source>' --melody '<melody>' -o '<out>/evidence.md' > /dev/null, then read the file: the command also prints the whole table, so send that to/dev/nullon every run. It writes one row per segment: chordotomy's chord and candidates, tsumugi's marker and transcribed bass, the cover's tones, coverage and missing tones, and the melody ("Harmony evidence" in the docs). The bass track iselectric_bassunless--bass-tracknames another. A name the file lacks is an error that lists its tracks: pick the bass track from them. For a transcription without a bass track, pass--bass-track "". - Decide every segment where the sources disagree on the triad or the bass, following
references/reconcile-harmony.md. - Write
<out>/harmony-edits.json, one edit per span to change ("Refined harmony timeline" in the docs):
The beats come from the{ "inputs": {"timeline": {"path": "<timeline>", "sha256": "<the timeline's SHA-256>"}}, "edits": [ {"start_beat": 24, "end_beat": 28, "chord": "A:min", "bass": "C", "reason": "the transcribed bass and the cover's tones agree on A minor over C", "readings": {"chordotomy": "C:maj", "marker": "Am/C", "bass": "C", "cover": "A C E"}} ] }beatscolumn, the end exclusive. Get the hash withshasum -a 256 '<timeline>'. - Refine:
pianoize refine-timeline '<timeline>' '<out>/harmony-edits.json' -o '<out>/<stem>.refined.chords.json',<stem>being the timeline's file name without.chords.json. Always refine the original timeline: to change something, revise the edits file and run this again. Never refine the refined file. - Confirm: run step 1 again with
'<out>/<stem>.refined.chords.json'as the timeline and-o '<out>/evidence.refined.md'. Every edited row reads the chord you decided,editedisyesthere, and every other row keeps its chord. Otherwise revise the edits and repeat steps 4 and 5. - Write
<out>/harmony-report.md: for each disagreement, its time and beats, each source's reading, your choice and the reason, the ones left as chordotomy has them included.
If nothing needs an edit, skip steps 3 to 5 and use <timeline> as the refined timeline. Tell the user that chordotomy's viewer opens the refined timeline with the recording if they want to look, and go on without waiting.
Phase 2: polish the cover
<refined> is the refined timeline from Phase 1, final before judging starts. If the harmony must change during Phase 2, refine again, run step 1 again, delete every harmony, voice:leap and voice:bass-late verdict and the edits citing them, and judge those again ("When the harmony changes" in references/judge-candidates.md).
- Find the candidates:
pianoize find-candidates '<cover>' --timeline '<refined>' --melody '<melody>' -o '<out>/candidates.json'. It prints one line per candidate and a count per category:harmony,glitch,voiceandtiming("Candidates" in the docs lists the kinds). - Judge every candidate in
<out>/candidates.json,fixorkeep, followingreferences/judge-candidates.md. Read each one'smeasurements,contextandsuggested. A suggestion is a starting point, not proof. - Write
<out>/corrections.json, correction spec version 1 ("Correction spec" in the docs):
Copy{ "spec_version": 1, "inputs": {"cover": {"path": "…", "sha256": "…"}, "melody": {"path": "…", "sha256": "…"}}, "verdicts": [ {"candidate": "glitch:short:t1920p62", "time": 2.0, "action": "fix", "reason": "an isolated 20 ms flick between two chords"}, {"candidate": "timing:off-grid:t3840p67", "time": 4.0, "action": "keep", "reason": "a pickup into the next phrase"} ], "edits": [ {"op": "delete", "candidate": "glitch:short:t1920p62", "note": "t1920p62", "reason": "a slip"} ] }inputs.coverandinputs.melodyfromcandidates.json, each verdict'stimefrom its candidate, and exact ticks fromsuggestedor from the note ids incontext(t{on_tick}p{pitch}). - Check the spec:
pianoize find-candidates '<cover>' --timeline '<refined>' --melody '<melody>' --spec '<out>/corrections.json' -o '<out>/candidates.after.json' --report '<out>/candidates-report.md', always on the original cover. It validates the spec, applies it in memory, finds the candidates again and names every note by its id in the original cover (add-{id}for an added note). Every candidate gets a status,fixed,kept,still presentorunjudged, andcandidates-report.mdlists them all by id, with category/kind, time, status and reason. The command prints eachstill presentandunjudgedline with a count per status, and exits 1 while there is any. Answer each asreferences/judge-candidates.mdsays: a new candidate on a note an edit already touches, or on anadd-{id}note, means revising that edit, never adding a second one. Run it again until it printsall candidates judgedand exits 0. Fixed means gone: only this run proves a fix. - Apply:
pianoize apply-corrections '<cover>' '<out>/corrections.json' --melody '<melody>' -o '<out>/<cover stem>-polished.mid'. - Check the notes against the harmony:
pianoize harmony-evidence '<out>/<cover stem>-polished.mid' '<refined>' --melody '<melody>' -o '<out>/check.md' > /dev/null, then read the file. Where you fixed a chord,missingis empty andcoverageis at least 0.6 (coverage_below). If not, revise the spec and repeat from step 4. The table'smissingcovers every segment, short ones included, so it can name tones where no candidate was: that is information, not new work. - Render both covers:
mkdir -p '<out>/renders', thenpianoize render '<cover>' -o '<out>/renders/<cover stem>.wav'andpianoize render '<out>/<cover stem>-polished.mid' -o '<out>/renders/<cover stem>-polished.wav', adding--soundfont '<sf2>'when$PIANOIZE_SOUNDFONTis not set. Without FluidSynth or a SoundFont, tell the user and give them the two MIDI paths instead. - Ask the user to listen. Give them the two files and the places the edits change: for each edit in
corrections.json, its op, its note (or the added note'sadd-{id}) and its time: the note's onset as acontextline shows it, or the cited candidate'stime. Don't listfixedlines instead: afixverdict on a mistyped id isfixedtoo. Ask them to listen A/B, then approve or name the places to revert, and stop until they answer. Don't claim the polished cover sounds better: you have not heard it. - Revert what they name: drop the edits there and set the candidates those edits cited to
keep, with the user's reason. Run step 4 again: afixverdict the dropped edits had been resolving now showsstill present(set it tokeepwith the same reason, or revise it), and anything new needs a verdict. Then steps 5 to 8 again, until the user approves.
Output files
All in <out>:
| file | written by | holds |
evidence.md, evidence.refined.md | harmony-evidence | the evidence table, before and after the edits |
harmony-edits.json | you | the chord edits, each with its reason and readings |
<stem>.refined.chords.json | refine-timeline | the refined timeline, schema 11 |
harmony-report.md | you | each disagreement: the readings, the choice, the reason |
candidates.json | find-candidates | the candidates in the original cover |
corrections.json | you | the correction spec: a verdict per candidate, an edit per fix |
candidates.after.json, candidates-report.md | find-candidates --spec | the candidates left, and every candidate's status and reason |
<cover stem>-polished.mid | apply-corrections | the polished cover; the original stays as it was |
check.md | harmony-evidence | the polished cover's notes against the refined harmony |
renders/<cover stem>.wav, renders/<cover stem>-polished.wav | render | the two covers to compare |
Additional resources
references/reconcile-harmony.md: weighing the evidence columns and deciding a segment's chord.references/judge-candidates.md:fixorkeepper kind, writing the edits, answering the--specrun.- pianoize's
docs/polishing.md(see "Running pianoize"): every command, rule, threshold and file format.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

