0xdarkmatter/claude-mods/fleet-worker
Claude Code and agent skill by 0xdarkmatter/claude-mods
- community
Checking that the SKILL.md file is still in the repository.
One cheap headless Claude Code worker on a cheaper brain (GLM via z.ai, or Sonnet/Haiku) - full tool harness, isolated git worktree + CLAUDE_CONFIG_DIR - fanned out and gated by an Opus orchestrator. Triggers: fleet-worker, GLM worker, grunt worker, cheap parallel agent, offload to GLM, sonnet worker, haiku worker.
Install
npx vskill@latest install 0xdarkmatter/claude-mods/fleet-workerSKILL.md
The same SKILL.md was published earlier as 0xdarkmatter/claude-mods/fleet-worker.
fleet-worker
Run a cheap headless Claude Code worker on a cheaper model and let an Opus orchestrator (this session) fan workers out in parallel, then verify and land their work. The worker keeps Claude Code's entire tool harness (Read/Write/Edit/Bash/Glob/Grep/Task/MCP/hooks) — only the brain is swapped to a cheaper model via env — a cheaper Anthropic model (Sonnet/Haiku) or a non-Anthropic endpoint. GLM-5.3 (glm-5.3) on z.ai is the default worked example; the mechanism is provider- and model-agnostic (any Anthropic-compatible endpoint).
Want to offload to Grok (xAI's `grok` CLI)? That's not this skill. Everyfleet-worker brain is aclaude -pprocess pointed at an Anthropic-compatibleendpoint. Grok Build CLI is its own binary and protocol (grok -p, auth viaGROK_DEPLOYMENT_KEY), not aclaude -pwrapper — so it can't ride fleet-worker'slauncher. Grok is a first-class worker in fleetflow instead (alongsideCodex), which spawns heterogeneous OS-process workers of different binaries —now its own repo at 0xDarkMatter/fleetflow,mounted as the/fleetflowskill.Use fleetflow for a Grok lane or any mixed-provider fan-out.
This is the spawning layer. [`fleet-ops`](../fleet-ops/) is the landing layer. fleet-worker produces branches cheaply; fleet-ops lands them through a test gate with your review. See references/fleet-ops-handoff.md.
The architecture crux: per-agent model = process isolation
ANTHROPIC_BASE_URL and the ANTHROPIC_DEFAULT_*_MODEL mapping vars are process-global — read once per claude process, applied to every model call it makes (including in-process Task subagents). There is no per-agent override. So you cannot keep one Opus session and have its subagents secretly run on GLM. The only way to pair a GLM-brained agent with an Opus orchestrator is a separate OS process with its own env block. That process is fleet-worker.
The load-bearing rule: auth isolation (do not skip)
On any machine also logged into a Claude.ai/Anthropic subscription, the naïve "just set ANTHROPIC_AUTH_TOKEN" launcher fails with `401 token expired or incorrect` — the host's stored subscription OAuth token (~/.claude.json oauthAccount + forceLoginMethod) takes precedence and gets sent to the non-Anthropic endpoint, which rejects it. --settings overrides do not fix it. The fix is a dedicated, empty config dir:
The launcher sets this automatically. It also gives each worker a clean hook/permission/MCP profile so it can't trip the host's hooks. Full analysis in references/fleet-worker-spec.md §4.
Giving a worker skills
The isolated config dir starts clean — the worker inherits none of the host's skills, MCP servers, or hooks (that isolation is what keeps it off your credentials). So provision what a worker should have: drop skill dirs into the worker's own config ($FLEET_WORKER_CONFIG_DIR/skills/<name>/) or commit them to the project's .claude/skills/ in the worktree. The cheap brain then loads the same on-demand, progressively-disclosed procedural knowledge your orchestrator has — often the cheapest way to lift a weak model's output on a specialized task.
Setup
- Install — these scripts ship with the skill. After
scripts/install.sh
they live at ~/.claude/skills/fleet-worker/scripts/. Either call them by that path, or symlink onto PATH for convenience: ``bash ln -s ~/.claude/skills/fleet-worker/scripts/fleet-worker ~/.local/bin/fleet-worker ln -s ~/.claude/skills/fleet-worker/scripts/fleet-collect.sh ~/.local/bin/fleet-collect.sh ``
- Provide the key (the launcher never prints it; resolution order):
export ANTHROPIC_AUTH_TOKEN=<key>, orexport FLEET_WORKER_KEYRING_SERVICE=<svc> FLEET_WORKER_KEYRING_KEY=<name>(useskeyring get), orexport ZHIPU_API_KEY=<key>(orGLM_API_KEY).
- Preflight —
bash scripts/fleet-doctor.sh --offline(structural) or
--live (pings the endpoint, then runs one real claude turn through the launcher — the endpoint can accept a model id the CLI refuses; warns about the §4 oauth trap). The doctor and the launcher share one key resolver (scripts/fleet-lib.sh), so --live resolves exactly the key a lane would.
Config knobs (env, all optional)
| Var | Default | Purpose | |
|---|---|---|---|
FLEET_WORKER_BASE_URL | https://api.z.ai/api/anthropic | Anthropic-compatible endpoint | |
FLEET_WORKER_MODEL | glm-5.3 | main model (opus+sonnet mapping); 5.3 reasoning levels are low/high/max via FLEET_WORKER_EFFORT (thinking cannot be disabled on 5.3) | |
FLEET_WORKER_SMALL_MODEL | glm-4.5-air | background/cheap model (haiku mapping) | |
FLEET_WORKER_CONFIG_DIR | ~/.fleet-worker/cfg | isolated config dir — one per parallel worker | |
FLEET_WORKER_EFFORT | high | seeded effortLevel in the worker's settings | |
FLEET_WORKER_PERMISSION_MODE | bypassPermissions | worker --permission-mode; use dontAsk + an allowlist to spawn from an auto-mode orchestrator (see Permission posture) | |
FLEET_WORKER_CLAUDE_BIN | claude | claude binary to exec; callers that preflight-validated an override (fleetflow's FLEETFLOW_CLAUDE_BIN) forward it here so the validated binary is the one that runs |
Point FLEET_WORKER_BASE_URL/FLEET_WORKER_MODEL at any other Anthropic-compatible gateway (this is the documented Claude Code custom-endpoint mechanism) to drive a different cheap model.
Staying all-Anthropic? The same separate-process trick runs a cheaper Claude model as the worker — an Opus orchestrator with Sonnet/Haiku workers, no third-party account. Point FLEET_WORKER_BASE_URL at Anthropic's API and set FLEET_WORKER_MODEL/ FLEET_WORKER_SMALL_MODEL to a Claude model, authenticating with an Anthropic API key. The defaults target z.ai/GLM only because that's the cheapest brain; the mechanism doesn't care which model answers.
When to delegate (and when not)
| Delegate to a worker | Keep on the orchestrator | |
|---|---|---|
| Independent, well-scoped, tool-using subtasks | Tasks needing this conversation's context | |
| Refactors, test-writing, doc edits, mechanical multi-file changes | Judgment calls, architecture, ambiguous specs | |
| Work where Opus-quality isn't required and a wrong edit is cheap to discard | Anything expensive-if-wrong and unreviewed |
The safety comes from the cage, not the model: isolated worktree (blast radius), isolated config dir (no host creds/hooks), and the orchestrator's merge gate (nothing lands without review).
Model routing convention (hybrid: in-process tiers + provider workers)
"Delegate or not" has a third axis: which model, and where. One taxonomy answers both — for the in-process Workflow-tool agents and the fleet-worker provider workers — so a fan-out routes models intentionally instead of defaulting every agent to the orchestrator's model.
It rests on the architecture crux above: model alias slots (opus|sonnet|haiku) vary per agent within one process (set via a Workflow agent()'s opts.model), but the provider (ANTHROPIC_BASE_URL) is process-global — so cross-provider routing needs a separate process, which is fleet-worker. Hence two loci:
| Work class | Locus | Model | Effort | |
|---|---|---|---|---|
| mechanical | fleet-worker (GLM) or in-proc | haiku / glm-4.5-air | low | |
| scout | in-proc (fleet-worker if wide) | sonnet / glm-5.3 | low | |
| build | in-proc | sonnet→opus | medium | |
| synthesize | in-proc only | inherit (session = Fable/Opus) | high | |
| judge | in-proc only | inherit (session = Fable/Opus) | high–max |
Locus rule: shell out to fleet-worker only for a large (≈12+), independent, file-mutating, cost-dominant fan-out you can gate before landing; everything else — and always synthesize/judge — stays in-process. Two guardrails: never under-power a judge (a cheap rubber-stamp verifier is worse than none), and reach for the `effort` lever before the `model` lever (it's finer-grained, no quality cliff).
Drop-in helper + worked examples (review→verify, hybrid migrate, budget-aware degradation): `assets/route.js` and `references/model-routing.md`.
Single-worker recipe
fleet-collect.sh gates on is_error (the real success signal — subtype lies) and prints the worker's final text. Exit 0 = success, 10 = worker failed.
Fan-out recipe (parallel workers)
Each task gets its own git worktree + branch and its own config dir so N workers never clobber each other. Spawn from the orchestrator's Bash tool with run_in_background: true, then collect by output file.
Keep concurrency modest (≤ 4–6) — the binding constraint is endpoint quota, not local CPU. .gitignore the scratch dirs (.fleet-work/, .fleet-worker/); with WORKTREE_ROOT set, .fleet-work/ is never created.
Hand off to fleet-ops (test-gated landing)
The winning branches are ordinary git branches — land them with the sibling skill instead of merging by hand:
Full walkthrough + recovery in references/fleet-ops-handoff.md.
Permission posture
Headless -p can't answer a permission prompt — it would stall, so the worker runs in a non-interactive mode. The default is --permission-mode bypassPermissions (set FLEET_WORKER_PERMISSION_MODE to override); safety comes from the cage (isolated worktree + isolated config + merge gate), not the prompt. Optionally constrain further with --disallowedTools (e.g. block WebFetch) or --add-dir.
Spawning from an auto-mode orchestrator. If the session that runs fleet-worker is itself in auto mode, a bypassPermissions launch is hard-denied by the auto-mode classifier as Create Unsafe Agents (an agent spawning an ungated agent) — and no allow-rule saves it (broad/interpreter allow-rules are dropped on entry to auto mode). Two fixes, either works:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/fleet-worker/SKILL.md
Popularity
- Repository stars
- 42
- Repository forks
- 7
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 23 Oct 2026, a month ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/0xdarkmatter/claude-mods/fleet-worker)