cmux-agents
Skill0 starsChanged 16 days agoApache-2.0View on GitHub
Spawn AI workers in cmux via MCP/repoGolem. Triggers: visible workers, terminal agents, orchestration, audits.
In this repository64 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- verify-lead-waitSkill
- verify-merge-receiptsSkill
- branded-docSkill
- explanatory-docSkill
- 1passwordSkill
- agada-benchSkill
- agent-browserSkill
- agent-routingSkill
- architectural-conformance-auditSkill
- audio-dashboardSkill
- brain-store-fallbackSkill
- claude-desktop-researchSkill
- cmuxSkill
- coachSkill
- coderabbitSkill
- codex-workflowsSkill
- collab-monitorSkill
- content-demo-creationSkill
- convention-auditSkill
- cursor-workflowsSkill
- cyberSkill
- deploy-verifySkill
- drive-filingSkill
- eas-prebuild-checkSkill
- ecosystem-healthSkill
- eli5Skill
- false-green-gateSkill
- figma-loopSkill
- fleet-wrap-gateSkill
- fleet-wrapSkill
- frustration-captureSkill
- gemini-researchSkill
- git-guardianSkill
- github-researchSkill
- golem-installSkill
- grill-meSkill
- heredoc-guardSkill
- html-dashboardSkill
- human-confirm-gateSkill
- i-have-adhdSkill
- install-runbook-linterSkill
- large-planSkill
- m1-window-gateSkill
- model-pin-gateSkill
- never-fabricateSkill
- orcSkill
- plan-councilSkill
- pr-loopSkill
- qa-verdict-gateSkill
- qa-videoSkill
- repogolemSkill
- research-lifecycleSkill
- reviewer-order-gateSkill
- session-handoffSkill
- skill-creatorSkill
- stitch-designSkill
- t3-visualsSkill
- tmp-blockSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 2 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 39
Verify boot with wait_for({agent_id, target_state:"ready"|"working", timeout_ms:120000}).
- Very specific: line 42
Follow Pane Hygiene, then close the worker with close_surface({scope:"agent", agent_id, force:true}).
- Distinctive: line 48
Write the brief to a file.
- Very specific: line 49
Check the cmuxlayer version.
- Very specific: line 52
≥ 0.4.88: use spawn_agent directly (proven only after cmuxlayer's CX-4 soak).
- Very specific: line 61
Never use raw cmux CLI pane operations such as send-key, close-surface, new-surface, or tree.
- Very specific: line 70
Never read_screen your own surface.
- Very specific: line 75
Never send a bare @word into an interactive composer.
- Very specific: line 79
Before user-away windows, every active worker has wait_for coverage or a file completion contract.
- Very specific: line 82
After any cmux restart, Mac wake, BrainBar restart, or network change, prior liveness claims are stale until list_agents plus read_screen …
- Distinctive: line 84
Do not invent removed tools: there is no atomic team-creation/stand-up call, status/progress publisher, browser-surface tool, or supported …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
cmux-agents
Orchestration layer for AI agents in cmux panes. Low-level pane operations use cmuxlayer MCP tools; this skill owns the visible-worker lifecycle, delivery, recovery, and pane hygiene on top.
Naming:
cmuxis the terminal app/CLI;cmuxlayeris the MCP/managed-agent/orchestration layer this skill drives. The MCP tools keep the literalmcp__cmuxlayer__*namespace (and.mcp.jsonserver keycmux) for back-compat, but the layer is calledcmuxlayer— nevercmux MCP,cmux.layer, orcmux layer. See/cmux→ "cmuxvscmuxlayer".<!-- naming-lint:allow -->
Ownership boundaries
Fleet canon #5 owns model policy, #6 owns launcher naming/skip-perms, and #7 owns claim/guard/DONE/harvest-close. This skill keeps cmux pane mechanics, worker lifecycle controls, and delivery/recovery adapters.
- Engine selection and review routing →
/agent-routing§ Review routing. - Launcher,
-s,-m, resume, and FR-01 workaround →/repogolem. - Monitor/cron/loop payloads, inbound guards and reviewer handoff →
/collab-monitor(payload rules: itsreferences/cron-payloads.md). - Full collab scaffolding →
/large-planworkflows/collab.md; PR stop/end state →/pr-loop. - Visual evidence →
/never-fabricateR7 and/qa-verdict-gate; shell mechanics →/cyber(references/shell.md).
Decide first
| Need | Route |
| Visible implementation worker | Current workspace, role worker |
| Read-only audit/research | Separate named workspace unless Etan asks to keep it beside the lead |
| Lead/orchestrator | Role orchestrator |
| One-shot nudge or tiny lookup | Use an in-session subagent; do not create a persistent cmux pane |
| Manual launcher, non-agent terminal, or FR-01 recovery | Follow /repogolem, then use the same boot and delivery verification as a managed worker |
cmuxlayer enforces two-column role geometry: orchestrators land LEFT, workers RIGHT, and extra workers tab into the rightmost worker pane. Pass the role; never compute a column. Pass workspace for every cross-workspace spawn. focus defaults to false and restores the original focus after initialization.
Default lifecycle
- Discover current topology with
list_agentsorlist_agents({mine:true}); after crashes or layout changes, rediscover before acting. - Spawn every visible worker with
mcp__cmuxlayer__spawn_agent({repo, cli, prompt, workspace?, parent_agent_id?, role?}). Do not hand-roll a repoGolem launch unless FR-01 or a non-agent terminal requires it. - Capture
agent_idimmediately in the collab/AGENT_REGISTRY and maintain the registry cadence in references/monitoring-and-collaboration.md. It is the durable handle; surface refs are for raw inspection and non-agent panes. - Verify boot with
wait_for({agent_id, target_state:"ready"|"working", timeout_ms:120000}); uselist_agents(detail:"full")next andread_screenonly to adjudicate parser/pane disagreement. - Send follow-ups by
agent_id, after a current health check. Verify every dispatch within 15 seconds; visible text after the composer prompt means it was not submitted. - For multi-minute work, require an output file with an exact final DONE marker and wait for
target_state:"done"; fleet canon #7/#9 owns DONE-versus-artifact law. Read the artifact immediately when the worker finishes. - Follow Pane Hygiene, then close the worker with
close_surface({scope:"agent", agent_id, force:true}). Only live processes remain open.
Spawn a Gemini gatherer
Resolve gemini.gather.text or gemini.gather.visual through standards/model-roles.json and node scripts/model-roles.mjs <role> --field launcher_tier. Pro-High is used only when explicitly requested. Routing lives in /agent-routing § Role Matrix; CLI details are in the agy adapter.
- Write the brief to a file. Boot payloads are always one-line pointers to a brief file.
- Check the cmuxlayer version.
control_healthhas no version field; read it fromcmuxlayer --versionor the Cellar path incontrol_health({detail:"full"})→health.current_process.script_path. - Spawn:
spawn_agent({cli:"gemini", role:"gatherer", authority:"worker", placement:"right", repo, model:<resolved launcher_tier for gemini.gather.text or gemini.gather.visual>, boot_prompt_path:<brief>}).- < 0.4.88: the spawn times out on boot readiness although the pane is ready. Deliver the brief with
send_to({mode:"surface", surface, text:"Read and follow <brief> ; your agent id is <id> (contract <path>)"}). The Antigravity readiness/submit fixes (cmuxlayer #803, #809) are merged but ship in 0.4.88. - ≥ 0.4.88: use
spawn_agentdirectly (proven only after cmuxlayer's CX-4 soak).
- < 0.4.88: the spawn times out on boot readiness although the pane is ready. Deliver the brief with
mcp_profile:"sterile"skips the contract pointer, so the lead must relay the report path and DONE marker itself.
Gatherer brief rules: prompts only (answer keys stay with the lead); READ-ONLY; one answer/result file plus the contract's DONE report. The lead scores with mechanical keys and takes wall-clock from file mtimes, because Antigravity's self-reported times can be wrong. If close_surface says the agent is not found, close by surface.
Hard laws
- Leads and workers drive panes only through cmuxlayer MCP:
spawn_agent,send_to,read_screen,list_surfaces,update_surface,close_surface, andwait_for. Never use rawcmuxCLI pane operations such assend-key,close-surface,new-surface, ortree. Raw CLI bypasses stable-UUID guards, draft ownership, delivery receipts, tailer reaping, and placement. In cmux 0.64.22, every pane open/close leaks four file descriptors, including MCP operations; minimize pane churn until the cmux upgrade. After a cmux restart, run/mcp reconnect cmuxlayerbefore any pane operation. Exceptions: a documented emergency when the MCP is down (say so in the collab), or read-only diagnostics the MCP cannot do yet (file a cmuxlayer row). Legacy shell helpers underscripts/do not exempt ordinary pane work from this rule. - Never
read_screenyour own surface; recursive output results. - File artifact >
wait_for(done)>list_agents(detail:"full")>read_screen> discovery-onlylist_agentsfor completion evidence.closureis already resolved; do not gate it on the displayed state. - DONE-versus-artifact law lives in fleet canon #9; a stopped worker's last report write says exactly where it stopped and the next step.
read_screenis text inspection, not a screenshot. When Etan asks to see something, use Computer Use evidence.send_to.textandspawn_agent.promptstay below 1,800 inline characters. Use a durable repo/collab file, orboot_prompt_pathonly when the target pane is already focused — unfocused panes never resolve; see references/delivery-and-recovery.md § Boot + deliver: FOCUS-FIRST. Never use/tmpfor durable handoffs. Append collab/report/brief posts with a quoted heredoc,cat >> <file> <<'EOF'— an unquoted<<EOFexecutes the body's backticks and$()(/cyberreferences/shell.md§1b).- Never send a bare
@wordinto an interactive composer; it opens the file picker. Address agents by bare name or deliver a file. - Any
[FROM=… TO=… TYPE=…]envelope emitted locally must be delivered with matchingsend_toin the same turn. - A questioning or briefly idle worker is re-prompted/backgrounded/salvaged, not killed. Kill only after evidence of an unresponsive surface and salvage its output first; then respawn with recovered context.
- Sequentially launch workers; BrainLayer writers are staggered by at least 10 seconds. Claude concurrency caps are owned by fleet canon #5.
- Before user-away windows, every active worker has
wait_forcoverage or a file completion contract. - New research/context goes to every active worker with a one-line why-it-matters note.
- Skills do not hot-reload in long sessions; notify or respawn affected workers after critical edits.
- After any cmux restart, Mac wake, BrainBar restart, or network change, prior liveness claims are stale until
list_agentsplusread_screenverify each reported worker. - Name every surface with
update_surface({action:"rename", ...});update_surfaceonly supportsrenameandmove. - Do not invent removed tools: there is no atomic team-creation/stand-up call, status/progress publisher, browser-surface tool, or supported recovery-preserving stop replacement.
Read the right reference
- Spawning, MCP parameters, response schemas, crash recovery, workspace placement, or CLI-specific commands? Read references/tool-contracts.md.
- Completion artifacts, visual proof, prompt delivery, focus/submit failures, frozen panes, restart/resume, or worker briefs? Read references/delivery-and-recovery.md.
- Monitoring, envelopes, collab delivery, DONE handling, AGENT_REGISTRY, or pane cleanup? Read references/monitoring-and-collaboration.md.
- macOS/launchd mechanics or the deferred rename-hook design? Read references/platform-notes.md.
- Selecting a CLI or driving its TUI? Read the matching
adapters/*.mdandadapters/capabilities.yaml. - Writing a worker prompt? Run
workflows/prompt-audit.md§8 and include verified paths, output/audience limits, response markers, final DONE line, per-job effort, and the worker's own GitHub identity instructions. - Launching work on the other Mac (M1)? No router pane: use agent-routing/references/cross-machine.md.
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.

