fleet-commander: Instructions file for Claude Code

AGENTS.md

fleet-commander AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from MrBenJ/fleet-commander. It costs 2,560 tokens per session, scanned C, original, MIT.

Repository instructions for Fleet Commander, a Go and React application that manages repositories, agent sessions, tmux terminals, and Git worktrees. They describe how to build, run, test, and install the project.

In plain words
What is it for?
Building the Go command-line program, running its tests, building the React web interface, creating the combined application, and installing it.
Why use it?
They give a coding agent the project-specific commands and conventions needed to work safely in the repository.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: PreToolUse hook event, but also the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is MrBenJ/fleet-commander's own configuration. It tells Claude Code, Codex and OpenCode how to work on fleet-commander 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 fleet-commander configures →

Reuse

Borrowing it

Nothing to install: this file belongs to MrBenJ/fleet-commander. 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/MrBenJ/fleet-commander/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/MrBenJ/fleet-commander

Made for: Claude Code, Codex, OpenCode.

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 AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mrbenj/fleet-commander/agents-md/github.svg)](https://agentmods.dev/instructions/mrbenj/fleet-commander/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/mrbenj/fleet-commander/agents-md"><img src="https://agentmods.dev/badge/instructions/mrbenj/fleet-commander/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fleet-commander AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/mrbenj/fleet-commander/agents-md"><img src="https://agentmods.dev/badge/instructions/mrbenj/fleet-commander/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,560 This file is loaded in full into every session.
When invoked 2,560 The same file — it is already loaded in full.
Security scan C 1 finding. 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.02560 $0.02560
Opus 5.5 $0.01024 $0.01024
Sonnet 5.5 $0.00512 $0.00512
Haiku 4.5 $0.00256 $0.00256

Measured 2mo ago against content hash 436846a7781d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

fleet-commander AGENTS.md scanned grade C with 1 finding 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 2mo 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

└─> rm -rf cmd/fleet/webdist
AGENTS.md · 236 lines

How it starts

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

AGENTS.md

Guidance for AI coding agents working in the Fleet Commander repository.

For Claude-specific conventions, see CLAUDE.md. This file is intended to be self-contained for any agent.


Build & Run

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

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

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

# Run all Go tests
go test ./...

# Run a specific package's tests
go test ./internal/squadron/...

# Build the React SPA only
make build-web

# Build SPA + embed into Go binary + install to PATH
make build-all

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).


Data Model

A Fleet represents a managed repository. It stores:

  • RepoPath — absolute path to the repo root
  • ShortName — human-readable alias (defaults to directory basename)
  • Agents — list of Agent structs
  • Fleet metadata is persisted in .fleet/config.json inside the managed repo

An Agent represents one coding agent session:

  • Name — unique identifier (used for tmux session name: fleet-<Name>)
  • Branch — git branch the agent works on
  • WorktreePath — path to the git worktree
  • Driver — which agent CLI drives this session (claude-code, codex, aider, kimi-code, antigravity, generic)
  • StateFile — path to .fleet/states/<Name>.json (used by hooks)
  • Persona — optional built-in personality key
  • FightMode — whether the agent roasts squadron mates

Global index: ~/.fleet/repos.json tracks all registered repos for multi-repo commands like fleet queue --all.


Package Layout

Package Responsibility
cmd/fleet/ Cobra CLI commands, go:embed for the web SPA, main.go entrypoint
internal/fleet/ Fleet/Agent structs, JSON config persistence, Load() / Init()
internal/tmux/ tmux session creation, attachment, killing; session names are fleet-<agent>
internal/monitor/ Agent state detection: hook-based primary, tmux pane-scrape fallback
internal/tui/ Bubble Tea TUI for fleet queue and the hangar terminal overlay
internal/worktree/ Git worktree CRUD: Create, CreateFromExisting, Remove, Move, List, Exists
internal/context/ Shared JSON store (.fleet/context.json) with file locking; channels, logs, agent sections
internal/state/ Atomic read/write of .fleet/states/<agent>.json; IsStale(ttl) helper
internal/hooks/ Inject/remove fleet signal hooks in .claude/settings.json per worktree
internal/driver/ Driver interface + implementations for each supported agent CLI
internal/squadron/ Squadron launch logic, prompt suffix assembly (consensus, merger, fight mode, personas)
internal/hangar/ Web server, REST API, WebSocket hub, terminal proxy, embedded SPA serving
web/ React SPA source. Built to web/dist, copied to cmd/fleet/webdist for embedding

Read the full file on GitHub · 236 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. 2mo ago First seen · 236 lines · 2,560 tokens per session scan C 436846a7781d

Subscribe to this mod's changes

fleet-commander AGENTS.md is an instructions file published in the GitHub repository MrBenJ/fleet-commander (11 stars, last pushed 3mo ago), licensed MIT. It adds 2,560 tokens to every session, about $0.0102 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

fleet-commander AGENTS.md compared with instructions from other repositories

fleet-commander AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
fleet-commander AGENTS.mdMrBenJ/fleet-commanderInstructions file113mo agoMITC2,560Claude Code, Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode