| name | play |
| description | Write Strudel code to a file and trigger the REPL to evaluate it. Use when composing or modifying music patterns for live playback. |
| disable-model-invocation | true |
Play Strudel Code
This skill writes Strudel pattern code to a scratch file and prepares it for evaluation in the running REPL.
Workflow
-
Write the pattern to playground/current.mjs:
- Create/overwrite the file with the Strudel code
- Always include a comment header:
// Generated by Claude — ${description}
- Keep previous versions: before overwriting, copy current to
playground/history/${timestamp}.mjs
-
Explain the sound to the user:
- What instruments/sounds are used
- What the rhythm/melody sounds like in plain language
- What changed from the previous version (if iterating)
-
Guide evaluation:
- If the REPL dev server is running, tell the user to copy-paste the code into the REPL and press Ctrl+Enter
- Or: if a file-watch integration exists, the REPL will auto-reload
-
Iterate based on feedback:
- "Make it faster" → adjust
.fast() or note density
- "More bass" → add low-frequency layers or adjust
cutoff
- "Different vibe" → change scale, sound source, or effects
- Always save history before overwriting
Arguments
$ARGUMENTS — optional description of what to play, e.g., /play ambient pad in C minor or /play add drums to current pattern
Directory Structure
playground/
├── current.mjs # active pattern (what the REPL should play)
└── history/ # timestamped snapshots
├── 2026-03-31T15-30-00.mjs
└── ...
Create playground/ and playground/history/ if they don't exist.