delexw/miod

miod 是一款 Claude Code 模組,會在代理工作時即時生成原創 MIDI 音樂。它把情緒對應到代理的活動(思考、編輯、測試、發布、失敗),並附上即時狀態列與波形視覺化。
delexw/miod

miod(「MIDI + mod」)是一款 Claude Code 外掛,會在 Claude 工作時即時作曲。它不使用音樂檔案、音樂庫或 AI 模型。
安裝(需要 macOS 上的 Claude Code 2.1.290 以上版本):
claude plugin marketplace add delexw/miod
claude plugin install miod@miod
指令:/miod(查看開關狀態)、/miod off、/miod on、/miod wave(列出或切換波形樣式)。
自訂方式是修改 hooks 檔案:hooks/moods.ts 中的 MOODS 與 MOOD_SCALES、hooks/flavours.ts 中的 FLAVOURS、hooks/theory.ts 中的 SCALES 與 PROGRESSIONS、hooks/waves/ 中的波形樣式,以及 hooks/styles.ts 中的 STYLES。驗證使用 claude plugin validate . 與 claude plugin test .;若是未安裝的執行,可用 claude --plugin-dir <path>。
限制:只在 macOS 上測試(音訊透過 afplay 播放),音色是簡單的 chiptune 風格,而且只會聽到載入它的那個工作階段。
請先查看作者 README,確認 marketplace 與外掛名稱;指令可能隨儲存庫結構而變動。
claude plugin marketplace add delexw/miod claude plugin install miod@miod
[!IMPORTANT] Only tested on macOS. Not sure yet how it behaves on Linux or Windows.
I'm an engineer, but these days I solve the boring problems entirely by vibe coding. Somewhere along the way I felt I had lost the creativity and curiosity I used to have when writing code myself.
So I started thinking about how to make vibe coding fun again. miod is the first try: while the agent does the work, you get to hear it think, read, edit, fail and fix, with a little piece of music no one has heard before.
Feel free to add more moods, flavours and styles. Each mood is one row in hooks/moods.ts, each flavour one row in hooks/flavours.ts, each sound style one entry in hooks/styles.ts, and each wave look one file in hooks/waves/.
Feeling it's a bit too noisy? 🙉 No hard feelings. Just turn it off with /miod off.
A Claude Code mod (MIDI + mod) that writes music on the spot while Claude works. No music files, no library, no AI model.

Needs Claude Code 2.1.290 or newer, on macOS.
claude plugin marketplace add delexw/miod
claude plugin install miod@miod
Then start a new session.
/miod is it on or off?
/miod off stop the music
/miod on play again from the next task
/miod wave list the wave looks: bars, line, mirror, dots, pulse
/miod wave dots switch the wave to the dots look
Each row shows the mood's first variant and its most likely scale. The variants are in MOODS and the scale weights in MOOD_SCALES, both in hooks/moods.ts.
| The agent is… | When it uses… | Sounds | | --- | --- | --- | | thinking | no tool | calm | | reading | Read, Grep, Glob, MCP tools | airy | | exploring | WebSearch, WebFetch | curious (lydian) | | planning | TodoWrite, plan mode | hopeful (major pentatonic) | | asking | AskUserQuestion | waiting, almost silent | | editing | Edit, Write | bright (major) | | running | Bash | driving beat | | installing | npm, bun, pip, brew… install | patient (minor pentatonic) | | testing | test, check, lint, tsc | focused (dorian), busy beat | | shipping | git commit, push, merge, gh pr | triumphant (mixolydian) | | deleting | rm -r, git reset --hard, git clean | ominous (phrygian), low drone | | delegating | Agent | one harmony voice per subagent | | failing | a Bash command that failed | tense (minor), until a command passes |
When several happen in one 8-beat phrase, the one higher in STRONGEST_FIRST (hooks/activity.ts) wins. A filling context window lifts the melody and, past 80%, adds a low drone.
The scales follow how musicians describe each mode (musical-u, Jiang et al. 2024).
MOODS in hooks/moods.ts.Activity and STRONGEST_FIRST in hooks/activity.ts, map tools or commands to it there, give it a list of at least 10 variants in MOODS and a row of scale weights in MOOD_SCALES.FLAVOURS in hooks/flavours.ts. Each field nudges every mood: brighter or darker scale, busier or calmer, drums up or down, swing, bass line.SCALES in hooks/theory.ts, then give it a weight in at least one mood's MOOD_SCALES row. A test fails if a scale belongs to no mood.PROGRESSIONS in hooks/theory.ts.hooks/waves/ that exports a WaveLook (how many rows, and a draw function), then list it in WAVES in hooks/waves/index.ts.STYLES in hooks/styles.ts. It must return values between -1 and 1.Then check it:
claude plugin validate .
claude plugin test .
Run a checkout without installing it with claude --plugin-dir <path to this repo>.
afplay.這是你的專案嗎?把這個徽章放進 README 或網站,連回本頁。