agentleFS
buildoakbuildoak/agent-mux/skill/SKILL.md

agent-mux

Skill35 starsChanged 5 months agoMITView on GitHub

Cross-engine dispatch layer for AI coding agents. Use when you need to: launch a worker on Codex/Claude/Gemini/agy/Grok, recover a timed-out dispatch, steer a running agent, or fan out parallel work. Profiles live in ~/.agent-mux/prompts/.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. shalomb/agent-skills★ 3same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Don't override -e unless upgrading.

    line 41
  2. Very specific:

    Async-first: Prefer --async for dispatches over 2 minutes — lets you monitor, steer, or bail early.

    line 59

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

agent-mux

QUICKSTART (95% of use cases)

1. Discover workers:

agent-mux config prompts        # live roster with effort defaults
agent-mux config prompts --json # structured
agent-mux config engines --json # engine capabilities + model allowlists

Selection: scout for reads, lifter for writes, architect for plans, grunt for bulk edits.

2. Profile dispatch (the 80% case):

agent-mux -P=lifter --cwd /repo "Fix retry logic in src/client.go" 2>/dev/null

Blocks until done. Result is stdout JSON with status, response, activity.files_changed.

3. Prompt-file dispatch (for heredoc quoting issues):

cat > /tmp/prompt.md << 'EOF'
Fix the `parseConfig()` function. Handle edge cases:
- Empty input returns `{}`
- Nested backticks in strings
EOF
agent-mux -P=lifter -C=/repo --prompt-file=/tmp/prompt.md

Or use --stdin JSON mode for full quoting control. --stdin implies --yes, so machine JSON dispatches do not stop for interactive confirmation by default.

4. Effort note: Don't override -e unless upgrading. Check config prompts for profile defaults -- passing -e=high to an xhigh profile (scout, auditor, grunt, architect) is a DOWNGRADE.

For opt-in GPT-5.6 depth, inspect config engines --json first. Sol and Terra may expose max/ultra; Luna stops at max; GPT-5.5/5.4-family models stop at xhigh on Codex 0.144.1. Max/Ultra require an explicit model and verified live/bundled catalog support:

agent-mux -E=codex -m=gpt-5.6-sol -e=max --cwd /repo "hard bounded task"

Ultra may trigger native Codex collaboration, but delegation is not guaranteed. --reasoning is a deprecated one-release alias; use --effort, and never pass differing explicit values.

Key flags: -P profile, -E engine, -m model, -e effort, --cwd / -C cwd, --async, --timeout. Prefer spelling --cwd in plans for clarity. Note: -E (engine) and -e (effort) are different — case matters.

5. Sync wait + result:

agent-mux -P=lifter --cwd /repo "task"  # blocks until done
# stdout is JSON: {"status":"completed","response":"...","activity":{"files_changed":2},...}

Async-first: Prefer --async for dispatches over 2 minutes — lets you monitor, steer, or bail early. Sync is fine for quick probes.

6. Async pattern:

agent-mux -P=scout --async --cwd /repo "probe" > /tmp/dispatch.json 2>/dev/null &
# ... do other work ...
wait  # shell wait: waits for the async launcher process to finish writing the ack
ID=$(jq -r .dispatch_id < /tmp/dispatch.json)
agent-mux wait --poll 30s "$ID" 2>/dev/null
RESULT=$(agent-mux result "$ID" --json 2>/dev/null)
printf '%s\n' "$RESULT" | jq -e '.status == "completed"' >/dev/null

Note: --async does NOT daemonize -- the CLI writes an ack and keeps a host process alive. Shell & is required for true parallel startup. wait --poll <duration> <id> is the lifecycle wait primitive; result <id> --json is the structured collection primitive.


DETAILS (remaining 5%)

1. Engine override:

agent-mux -P=researcher -E=gemini -m gemini-3.1-pro-preview --cwd /repo "Analyze auth module"
  • Codex: implementation, debugging, precise edits. Model discovery uses the PATH-resolved CLI once per process: live catalog, bundled fallback, then conservative legacy fallback. DispatchSpec.Effort is forwarded on initial and resume invocations.
  • Claude: planning, synthesis, review
  • Gemini: analysis, second opinion (models: gemini-3-flash-preview, gemini-3.1-pro-preview)
  • agy: experimental CLI-first model access. Plain stdout; agent-mux internally invokes the local agy CLI with its fixed --sandbox, discovers Antigravity conversation IDs from agy.log, and uses inbox + --conversation for nudge/redirect resume. Operator-supplied sandbox/permission/reasoning/max-turn/full-access options are rejected. This does not imply plugins, MCP, browser automation, Google services, or provider service actions.
  • Grok: Grok Build CLI support. Default dispatch is headless prompt-file plus streaming JSON with exact UUID resume, adapter-owned prompt/session/debug files, model grok-4.5 by default, omitted native sandbox flags by default, and public artifact scanning with private Grok sidecars excluded. Opt-in v1.5 structured reports use private prompt-file transport plus grok-worker-report-schema=agent-mux.worker-report.v1; this is text/code-only, fake-covered, and live-smoke-proven on Grok CLI 0.2.93 for bounded worker reports. worker_report.json is the sanitized public report sidecar; grok_prompt.md sidecars are private. Web/X search, image input/output, structured activity, token/cost usage, custom sandbox aliases, native allow/deny, max-turns, plugins/MCP/hooks/memory/subagents, and GAAL-native indexing are not claimed. Use agent-mux config engines --json for the active Grok model allowlist; refresh explicitly with agent-mux config engines --refresh-models --engine grok --json.

Gemini ignores -e -- use model selection for depth control.

2. Steering:

agent-mux status <dispatch_id> --json 2>/dev/null
agent-mux steer <dispatch_id> redirect "Narrow scope to src/parser only; skip the broad audit." 2>/dev/null
agent-mux wait --poll 30s <dispatch_id> 2>/dev/null
agent-mux steer <dispatch_id> abort 2>/dev/null
  • status <id> --json is the one-off live check. Do not poll status in a loop.
  • steer <id> redirect "new direction" narrows or redirects a running worker; then wait and collect result.
  • steer <id> nudge "message" asks for a wrap-up/status nudge.
  • steer <id> abort SIGTERMs async host when live; otherwise writes control.json for the watchdog.

3. Data model (3 paths):

  • ~/.agent-mux/dispatches/<ULID>/ -- durable (meta.json, result.json)
  • $XDG_RUNTIME_DIR/agent-mux/<ULID>/ or /tmp/agent-mux-$UID/<ULID>/ -- runtime (events.jsonl, inbox.md)
  • ~/.agent-mux/prompts/ -- profiles; <cwd>/.agent-mux/ -- skills/, hooks/

4. Gaal tracing: (session_id available after session start; absent for startup failures; Grok session IDs are exact UUIDs for agent-mux resume and are not GAAL-native trace IDs)

jq -r .session_id ~/.agent-mux/dispatches/<id>/meta.json
gaal inspect <session_id>

5. Bash timeout: Claude Code defaults to 120s. Long dispatches need explicit timeout: 300000 or run_in_background: true on the Bash tool call.

6. Recovery:

  • timed_out + activity.files_changed non-empty -> --recover=<id> with a continuation prompt
  • timed_out + empty activity.files_changed -> reframe into a narrower fresh dispatch
  • failed -> check cause, retry once or escalate
agent-mux -P=lifter --recover=<id> --cwd /repo "Continue from the existing edits. Finish remaining parser tests."

7. Landmines:

  • --async does NOT daemonize -- use shell &
  • status: completed does not mean task success -- check response
  • -e is effort, -E is engine (case matters)
  • Codex Max/Ultra require -m; legacy discovery cannot prove them. Luna rejects Ultra and GPT-5.5/5.4-family models reject Max/Ultra on the Codex 0.144.1 matrix
  • --reasoning is deprecated; it aliases --effort, and a differing explicit pair fails preflight
  • agy rejects explicit portable sandbox, permission, reasoning, max-turn, and full-access options; use model/add-dir/prompt only
  • Grok rejects explicit add-dir, permission, reasoning, full-access, max-turns, raw prompt-json/json-schema, web/X, image, native allow/deny, plugin/MCP/hook, trace/export/debug, subagent, and memory controls; use model, optional supported Grok sandbox (off, workspace, read-only, strict, devbox), prompt, timeout, and the AgentMUX-owned v1.5 report schema only
  • --recover resumes with NEW prompt, does not fetch result (use result <id>)
  • -e=high on xhigh profiles is a downgrade, not a floor
  • wait has no --timeout — only --poll for cadence (e.g., wait --poll 30s <id>)
  • There is no agent-mux config pipelines command in the current CLI. Use agent-mux config prompts and compose multi-step flows with profiles unless a named pipeline profile appears in the prompt roster.

8. References: Deep dives in references/:

  • first-run.md -- first-launch/onboarding contract for cold machines
  • pitfalls.md -- audit-grounded landmines with session evidence
  • async-and-steering.md -- lifecycle, fan-out, steering mechanics
  • recovery-guide.md -- timeout/failure handling
  • gemini-specifics.md -- Gemini approval mode, resume quirks

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.