№ 0097Skill
musecode: Claude Code workflows on Muse Spark
musecode adds a /musecode slash command, a Haiku relay agent and a muse-run CLI so Claude Code Workflow fan-outs run their leaf tasks on the free Muse Spark 1.3 model through opencode.
musecode
"Ultracode" for Claude Code on Meta Muse Spark 1.3 — the free model on OpenCode Zen. Claude scopes the task, fans it out as a Workflow, and judges the result; every leaf agent is a relay that hands its prompt to Muse through opencode. The work itself costs no tokens, only the few thousand Haiku tokens per relay.
Three pieces, wired into Claude Code by symlink:
| File | Installed as | Role |
|---|---|---|
commands/musecode.md |
~/.claude/commands/musecode.md |
The /musecode <task> slash command: how to scope, author the Workflow, and verify |
agents/muse.md |
~/.claude/agents/muse.md |
The muse relay agent (Haiku, Bash only). Runs muse-run and returns Muse's stdout verbatim |
bin/muse-run |
~/.local/bin/muse-run |
Bash CLI: one task → one detached opencode run job, with a memory-aware start gate |
Outside a Workflow the same relay is Agent({subagent_type: 'muse', prompt}).
Install
Needs opencode (1.18+), jq, and Claude Code. The Zen "contributor-free" Muse model needs no API key or login (verified 2026-09-05).
git clone git@github.com:phareim/musecode.git ~/github/musecode
~/github/musecode/install.sh
The installer symlinks the three files, creates ~/.config/muse-run/env from env.example if it is missing, and prints your host's numbers (see "Settings"). Agent definitions load at Claude Code startup, so open a new session afterwards. ./install.sh --check reports without changing anything; ./install.sh --uninstall removes the symlinks.
Smoke test without Claude:
muse-run 'Reply with exactly the word OK and nothing else'
muse-run --status
Settings
Everything environment-specific lives in ~/.config/muse-run/env (plain shell, sourced on every call; template in env.example, effective values from muse-run --env). Nothing in the repo is host-specific.
| Knob | Default | What it does |
|---|---|---|
MUSE_MODEL |
opencode/muse-spark-1.3-contributor-free |
Model passed to opencode run -m |
MUSE_MAX_JOBS |
6 | Max concurrent opencode processes |
MUSE_JOB_MB / MUSE_MEM_RESERVE_MB |
800 / 1024 | A job starts only if available − reserve ≥ job (MB). One opencode run is 580–900 MB RSS |
MUSE_START_WAIT |
300 | Seconds --start polls for a slot before exit 4 |
MUSE_WAIT |
540 | Foreground wait before MUSE-RUN PENDING <id> / exit 3 (st |



ChatForm
Tgmlabs