---
name: cook-app
description: Installs the COOK. desktop app — a macOS Electron GUI for the midi-cook skill. Generates randomized, musically coherent 4/8-bar MIDI beat skeletons (chords · lead · counter · melody4 · 808 · snare · hats) and lets you drag each part straight into FL Studio from the app window via native drag-and-drop pads. Every folder gets a unique creative name. TRIGGER when the user asks to "install the Cook app", "rebuild Cook", "set up COOK desktop", "get the midi cook GUI", "make cook.app", "install the cook electron app", or any variant. Also trigger on "I want a GUI for midi-cook" or "give me the cook desktop app".
---


# COOK. — desktop GUI for midi-cook

You're installing **COOK.**, a macOS Electron app that wraps the `midi-cook` engine in a SYSTEM-styled desktop UI.

## What it does

- One-click beat cooking — `COOK ONE`, `+5`, `+10`, `DARK`, `BRIGHT` buttons
- Every cook produces 7 MIDI files in `~/Desktop/midi bby/{N}.{M}_{name}/`: chords · lead · counter · melody4 · 808 · snare · hats
- **Unique folder names** — 341-word pool + 40 modifier prefixes (14k+ combos), never repeats
- **Drag pads on every cook card** — drag a labeled tile straight into FL Studio (or any drop target) to drop that specific `.mid`
- Producer tag baked into every folder name (`(yourhandle)`)
- `~/Desktop/midi bby/.midi-cook.json` stores the producer config; wipe it to reset

## How to install it

The skill bundles everything you need. Just run:

```bash
bash "${CLAUDE_SKILL_DIR:-$(dirname "$0")}/scripts/install.sh"
```

…or if `CLAUDE_SKILL_DIR` isn't set, cd into the extracted skill dir first:

```bash
cd <path-to-this-skill>
bash scripts/install.sh            # default target: ~/midi-cook-app
bash scripts/install.sh ~/cook     # or a custom dir
```

The installer will:
1. Verify `node`, `npm`, and `python3` are available
2. Copy `scripts/project/` into `~/midi-cook-app` (or the provided target)
3. Run `npm install` (Electron + electron-builder)
4. Run `npm run install-app` — builds an unsigned arm64 `.app` and installs it to `/Applications/COOK..app`
5. Launch it

The midi-cook engine (`styles.py` + `midi_writer.py`) is **vendored** into `assets/`, so the app is fully self-contained. No external skill dependency required. If you also have the standalone `midi-cook` skill installed at `~/.claude/skills/midi-cook`, `cook.py` prefers the bundled copy but falls back to the skill if the bundle ever goes missing.

## Requirements

- **macOS** (arm64 or x64) — the app ships as a native `.app` bundle
- **Node 18+** and `npm`
- **Python 3.9+** (no pip packages — only the stdlib)
- Write access to `/Applications` (the installer calls `cp -R` there)

## First-run flow

1. Launch `COOK.` — the dock icon is a dark skull mark
2. Type a producer name in `[ PRODUCER ]` and hit `SAVE` (e.g., `CCBBY`, `808Jesus`, your handle)
3. Hit `COOK ONE` — a new card appears in the right column with:
   - Unique beat name (`✦ Velvet Nocturne (yourtag) ✦`)
   - KEY / BPM / ENGINE / progression
   - 7 drag pads: `CHORDS · LEAD · COUNTER · MEL4 · 808 · SNARE · HATS`
4. Drag any pad directly into FL Studio's playlist / channel rack — it imports as MIDI

## File layout after install

```
~/midi-cook-app/
├── main.js                 # Electron main — window + IPC + drag session
├── preload.js              # contextBridge → window.midiCook API
├── renderer.js             # UI wiring + drag-pad event handlers
├── index.html              # SYSTEM-styled UI
├── package.json
└── assets/
    ├── cook.py             # CLI shim over the engine
    ├── styles.py           # cook_random — rolls every dimension
    ├── midi_writer.py      # MIDI file writer + cook-folder numbering
    ├── system.css / system.js  # SYSTEM design + sound engine
    └── icon.png / icon.icns
```

## Troubleshooting

- **"midi-cook engine not found"** — `styles.py` is missing from `assets/`. Re-run the installer; it vendors both Python files.
- **Drag-and-drop does nothing in FL Studio** — confirm you're dragging from a `.pad` tile (small bracket-cased label), not the card body. FL Studio needs the drop target to be the playlist or a channel, not the mixer.
- **"[ NO PRODUCER ]" never goes away** — check `~/Desktop/midi bby/.midi-cook.json` is writable, then hit `SAVE` again.
- **App won't launch after install** — `xattr -cr /Applications/COOK..app` strips the quarantine bit. The installer already does this.
- **Custom output dir** — cooks are hardcoded to `~/Desktop/midi bby`. Edit `MIDI_DIR` in `assets/cook.py` to move it.

## Design

- SYSTEM design language by Gualo Hawes (bundled `system.css` / `system.js`)
- Typography: Inter + JetBrains Mono, no emojis in UI
- Palette: neon-silver (light) or deep-black (dark), toggle from header
- Dock icon + favicon baked in via `build-icon.py` (re-run if you want a different mark)
