fleet-commander CLAUDE.md

fleet-commander CLAUDE.md is an instructions file for coding agents from MrBenJ/fleet-commander. It costs 2,884 tokens per session, scanned A, original, MIT.

Repository instructions for Fleet Commander, a Go and React tool that manages several AI coding sessions in separate Git worktrees. A Git worktree is an additional working copy of a repository.

In plain words
What is it for?
Use them when working on Fleet Commander to build its Go binary or web interface, run tests, install it, or understand its tmux and worktree setup.
Why use it?
They record the commands and project rules needed to build, run, test, and install the tool correctly.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/mrbenj/fleet-commander/claude-md
Clone the repo
git clone --depth 1 https://github.com/MrBenJ/fleet-commander

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 fleet-commander CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mrbenj/fleet-commander/claude-md.svg)](https://agentmods.dev/instructions/mrbenj/fleet-commander/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/mrbenj/fleet-commander/claude-md"><img src="https://agentmods.dev/badge/instructions/mrbenj/fleet-commander/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,884 This file is loaded in full into every session.
When invoked 2,884 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.02884 $0.02884
Opus 5 $0.01442 $0.01442
Sonnet 5 $0.00577 $0.00577
Haiku 4.5 $0.00288 $0.00288

Measured 4d ago against content hash cdb1598a8443, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

fleet-commander CLAUDE.md 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 4d 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.md · 133 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

For agent-neutral guidance (self-contained), see AGENTS.md. Keep both files in sync when architecture changes.

Build & Run

# Build the binary
go build -o fleet ./cmd/fleet/

# Run directly without building
go run ./cmd/fleet/ <command>

# Install to PATH
go install ./cmd/fleet/

# Run tests
go test ./...

# Run a single package's tests
go test ./internal/monitor/...

# Build web UI + Go binary with embedded SPA (installs to PATH)
make build-all

# Build web UI only
make build-web

# Run web tests
cd web && npm run test

The binary must be placed alongside fleet.tmux.conf for the tmux config to be auto-sourced (it looks for the conf file relative to the executable path).

Tech stack: Go 1.21+ (backend), React 18 + TypeScript + Vite (frontend), tmux (session management), git worktrees (isolation).

Architecture

Fleet Commander is a CLI + TUI tool for managing parallel AI coding agent sessions, each in its own git worktree. The user stays in control — there is no AI coordinator.

Data model:

  • Fleet — owns RepoPath, ShortName, and a list of Agents. Persisted at .fleet/config.json inside the managed repo.
  • AgentName (unique, used as tmux session: fleet-<Name>), Branch, WorktreePath, Driver (one of claude-code, codex, aider, kimi-code, antigravity, generic), StateFile, optional Persona, FightMode bool.
  • Global index: ~/.fleet/repos.json tracks all registered repos for cross-repo commands (fleet queue --all).

Package layout:

  • cmd/fleet/ — Cobra CLI wiring split across main.go, cmd_agents.go, cmd_context.go, cmd_launch.go, cmd_repos.go, cmd_utils.go. Commands: init, add, list, start, attach, stop, queue, remove, hint, hangar, context, repos, launch, signal, unlock, rename, clear.
  • cmd/fleet/embed.gogo:embed all:webdist directive for the compiled React SPA (cmd/fleet/webdist/).
  • internal/fleet/ — Core data model. Fleet and Agent structs, JSON config persistence at .fleet/config.json. Load() walks up the directory tree to find a fleet.
  • internal/global/ — Global cross-repo state at ~/.fleet/ (repos index, global context/log).
  • internal/tmux/ — Thin wrapper around tmux CLI commands. Sessions are named fleet-<agentName>. Sources fleet.tmux.conf after creating a session (best-effort).
  • internal/monitor/ — Reads tmux pane content via capture-pane and classifies agent state as working, waiting, stopped, or starting. State detection inspects only the bottom 15 lines and checks for Claude Code-specific patterns: "esc to interrupt", spinner characters, "Esc to cancel", prompt, etc.
  • internal/tui/ — Bubble Tea TUI for fleet queue. Lists all agents with live state indicators, refreshes every 2 seconds. Selecting an agent starts its session if stopped, then attaches. After detaching (Ctrl+B, Q), the TUI loop restarts automatically.
  • internal/worktree/ — Git worktree CRUD: Create, CreateFromExisting, Remove, List, Move, Exists. Manager.Create(path, branch) runs git worktree add -b <branch> <path>.
  • internal/context/ — Shared context store (.fleet/context.json). Agents can publish and read context from each other. Uses POSIX advisory file locks (flock) on .fleet/context.lock with a 5-second timeout. Supports named private channels with fixed membership (names are used as-is; an empty name defaults to channel-default).
  • internal/state/ — State file read/write for agent state signaling between Claude Code hooks and the monitor. Atomic writes via temp-file + rename. States live in .fleet/states/<name>.json. IsStale(ttl) helper for fallback-detection.
  • internal/hooks/ — Claude Code hook injection/removal. Injects fleet signal working (PreToolUse) and fleet signal waiting (Stop) into .claude/settings.json in each worktree. Entries are tagged with "_fleet": true for safe removal. Hooks read FLEET_STATE_FILE and FLEET_AGENT_NAME env vars.
  • internal/hangar/ — Web-based squadron mission control (fleet hangar). Go HTTP server + embedded React SPA.
    • internal/hangar/server.go — HTTP server, route registration, SPA serving (embedded or Vite dev proxy).
    • internal/hangar/tui.go — Bubble Tea TUI shown in the terminal while the server runs (zen/log views).
    • internal/hangar/api/ — REST handlers for fleet info, personas, drivers, squadron launch, agent generation, and stop.
    • internal/hangar/ws/ — WebSocket hub that polls .fleet/context.json every 2s and broadcasts new channel messages and agent state changes.
    • internal/hangar/terminal/ — WebSocket-to-PTY proxy for tmux attach-session, powers the browser terminal.
  • internal/driver/ — Driver interface and implementations (claude-code, codex, aider, kimi-code, antigravity, generic). Each driver implements state detection, hook injection (where supported), and command building.
  • internal/squadron/ — Squadron launch logic. RunHeadless() creates worktrees, tmux sessions, context channels, and prompt files. BuildMergerSuffix(), BuildConsensusSuffix(), ApplyPersona(), and fight-mode suffix assembly live here.
  • web/ — React 18 + TypeScript + Vite SPA for the hangar UI. Built with make build-web, embedded into the Go binary via make build-all.
    • web/src/components/wizard/ — Squadron setup wizard (SetupStep → AgentsStep → ReviewStep, with PersonaStep as a per-agent modal from AgentsStep).
    • web/src/components/mission/ — Mission control view (MissionControl, ContextLog, AgentPill, AgentTooltip, MultiView).
    • web/src/components/terminal/ — xterm.js terminal page for "Assume Control".
    • web/src/hooks/useWebSocket (auto-reconnect JSON event stream), useFleet (fleet data fetching).
    • web/src/api.ts — Typed API client for all REST endpoints.

Read the full file on GitHub · 133 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. 4d ago First seen · 133 lines · 2,884 tokens per session scan A cdb1598a8443

Subscribe to this mod's changes

fleet-commander CLAUDE.md is an instructions file published in the GitHub repository MrBenJ/fleet-commander (11 stars, last pushed 1mo ago), licensed MIT. It adds 2,884 tokens to every session, about $0.0144 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.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens