learning-cmux-with-agents: Command for Claude Code

.claude/commands/spawn-fs-team.md

spawn-fs-team is a command for Claude Code from disler/learning-cmux-with-agents. It costs 76 tokens per session (2,663 once invoked), scanned A, original, MIT.

A recipe for starting a five-agent software team in cmux for a Flotion feature. The team has separate lead, planning, backend, frontend, and testing roles, arranged across one shared workspace.

In plain words
What is it for?
Use it to start a new team, reuse an existing cmux window, arrange the agents, load their role instructions, and optionally give the lead a feature to build.
Why use it?
It removes the repeated setup work needed to assemble the same team and assign each agent a lane. It also keeps the team organized around one feature in one workspace.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: model in frontmatter; reads .claude/ paths; positional $N argument.

This is disler/learning-cmux-with-agents's own configuration. It tells Claude Code how to work on learning-cmux-with-agents itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything learning-cmux-with-agents configures →

Reuse

Borrowing it

Nothing to install: this file belongs to disler/learning-cmux-with-agents. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/disler/learning-cmux-with-agents/main/.claude/commands/spawn-fs-team.md
Clone the repo
git clone --depth 1 https://github.com/disler/learning-cmux-with-agents

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for spawn-fs-team

README.md
[![agentmods](https://agentmods.dev/badge/commands/disler/learning-cmux-with-agents/spawn-fs-team.svg)](https://agentmods.dev/commands/disler/learning-cmux-with-agents/spawn-fs-team)
Your own site
<a href="https://agentmods.dev/commands/disler/learning-cmux-with-agents/spawn-fs-team"><img src="https://agentmods.dev/badge/commands/disler/learning-cmux-with-agents/spawn-fs-team.svg" alt="Measured on agentmods" height="20"></a>
Per session 76 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,663 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00076 $0.02663
Opus 5 $0.00038 $0.01332
Sonnet 5 $0.00015 $0.00533
Haiku 4.5 $0.00008 $0.00266

Measured 7d ago against content hash 97e042cfce2f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

spawn-fs-team scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/spawn-fs-team.md · 176 lines

How it starts

The opening of the file, as written. The whole thing — 176 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Spawn Full-Stack Team

Purpose

You are an orchestrator running in a terminal (not inside cmux). Boot a fresh 5-agent team for Flotion as a new workspace in the cmux window and, if given a feature, hand it to the team's lead. One team = one workspace = one feature, and teams share a window — reuse the window that's already open and only create a new one if cmux has none. You do this by driving the cmux CLI yourself — there is no script; this command is the recipe.

Variables

TEAM: $1 # short slug for the team; default "fs-team" if omitted FEATURE: $2 # everything after the slug — optional feature to ship now

Model blend (reasoning roles on GLM-5.2, build/verify on Minimax-M3)

LEAD_MODEL: openrouter/z-ai/glm-5.2 PLAN_MODEL: openrouter/z-ai/glm-5.2 BE_MODEL: openrouter/minimax/minimax-m3 FE_MODEL: openrouter/minimax/minimax-m3 TEST_MODEL: openrouter/minimax/minimax-m3

ROLES_DIR: .claude/agents # lead.md, plan.md, build-be.md, build-fe.md, test.md ROSTER: .team/.roster.json

Codebase Structure

.claude/agents/*.md     # the 5 role system prompts each teammate boots with
.team/                  # shared memory: <team>.roster.json, backlog.md, <role>.md notes
apps/flotion/           # the app the team builds (Vue 3 + TS / FastAPI + SQLite)

Instructions

  • Learn the verbs first. Run cmux --help (and consult the cmux skill if available). The whole boot is just these verbs: new-window, workspace create, new-split <dir>, rename-tab, workspace-action, set-status, send, send-key, read-screen, workspace close.
  • You are outside cmux; the socket is in allowAll mode, so your cmux calls drive it directly. Confirm with cmux identify --json before starting.
  • If cmux isn't running, start it — don't stop. A refused socket (Connection refused) just means the app isn't up yet. Run open -a cmux, wait for the socket, then carry on. Only abort if it never comes online.
  • send types, send-key enter submits. There are no Ctrl-chords; to stop a pane, close-surface it.
  • Capture refs as you create them. workspace create --json returns workspace_ref + the lead's surface_ref; each new-split --json returns the new surface_ref. Thread these through — never guess refs.
  • Launch each agent by typing its pi … line into its pane (via cmux send
    • send-key enter), not from your own shell.
  • Reuse the open window; one team = one workspace. If cmux already has a window open, add this team as a new workspace inside that existing window — do not open another OS window. Only run new-window when cmux has no window at all. Multiple teams coexist as sibling workspaces in one window; each team is its own workspace (its lead + 2×2 workers).
  • The lead drives the workers; you drive only the lead. Keep every agent observable — read panes, don't assume.

Read the full file on GitHub · 176 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 176 lines · 0 tokens per session scan A 97e042cfce2f

Subscribe to this mod's changes

spawn-fs-team is a command published in the GitHub repository disler/learning-cmux-with-agents (109 stars, last pushed 2mo ago), licensed MIT. It adds 76 tokens to every session and 2,663 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.