opencode-swarm: Instructions file for Codex

AGENTS.md

opencode-swarm AGENTS.md is an instructions file for Codex, OpenCode from ZaxbyHub/opencode-swarm. It costs 8,102 tokens per session, scanned A, original, MIT.

A repository instruction file that defines the rules automated coding tools and contributors must follow before changing code.

In plain words
What is it for?
Guiding code changes, test edits, issue investigation, commits, pull requests, and swarm-based development work.
Why use it?
It reduces inconsistent changes by making required reading, working locations, and engineering constraints explicit.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

This is ZaxbyHub/opencode-swarm's own configuration. It tells Codex and OpenCode how to work on opencode-swarm 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 opencode-swarm configures →

Reuse

Borrowing it

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

Made for: 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 opencode-swarm AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/zaxbyhub/opencode-swarm/agents-md/github.svg)](https://agentmods.dev/instructions/zaxbyhub/opencode-swarm/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/zaxbyhub/opencode-swarm/agents-md"><img src="https://agentmods.dev/badge/instructions/zaxbyhub/opencode-swarm/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 opencode-swarm AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/zaxbyhub/opencode-swarm/agents-md"><img src="https://agentmods.dev/badge/instructions/zaxbyhub/opencode-swarm/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8,102 This file is loaded in full into every session.
When invoked 8,102 The same file — it is already loaded in full.
Security scan A 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.08102 $0.08102
Opus 5.5 $0.03241 $0.03241
Sonnet 5.5 $0.01620 $0.01620
Haiku 4.5 $0.00810 $0.00810

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

Security

Grade A, and why

opencode-swarm AGENTS.md scanned grade A 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 10d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Windows is first-class. Handle `.cmd` extensions for npm/bun binaries, PATH differences, and the fact that `child_process.spawn('bin', ...)` does not behave identically to `cmd.exe`.
AGENTS.md · 182 lines

How it starts

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

AGENTS.md — Engineering contract for opencode-swarm

This file is the root engineering contract for opencode-swarm. It applies to every contributor — human, Claude Code, OpenCode agent, or other automated tool. Read it fully before making any code change. It is intentionally short and operational; the long-form rationale and historical failure map live in docs/engineering-invariants.md.

Required reading order

When you are about to do… Read these (in order)
Any code change AGENTS.md (this file) → docs/engineering-invariants.md (skim, deep-dive on touched invariants)
Write or modify any test file this file → .opencode/skills/writing-tests/SKILL.md (or .claude/skills/writing-tests/SKILL.md for Claude)
Commit / push / open a PR this file → .claude/skills/commit-pr/SKILL.md
Trace, investigate, root-cause, fix, or resolve an issue or bug this file → .opencode/skills/issue-tracer/SKILL.md (or .claude/skills/issue-tracer/SKILL.md for Claude)
Change Epic Mode (src/epic/**, an Epic seam in a shared file, or the epic config block) this file → src/epic/README.md (Epic maintainer guide: invariants, seams, tests, recipes)
Swarm-mode Claude work this file → CLAUDE.md → .claude/session/swarm-mode.md (when present)
Architecture / plugin init / subprocess / tool-registration / plan-durability / .swarm storage / runtime-portability change this file → docs/engineering-invariants.md → .opencode/skills/engineering-conventions/SKILL.md (or .claude/skills/engineering-conventions/SKILL.md)

AGENTS.md and docs/engineering-invariants.md together are the single source of truth for repository invariants. When CLAUDE.md, contributing.md, TESTING.md, or any skill conflicts with this file, this file wins; that skill or doc is out of date and must be reconciled.

Repository-history cache reuse

  • Before creating or rebuilding any repository-derived cache or index, agents must first search the current worktree and known sibling/source repository locations for an existing compatible artifact.
  • Before initializing, rebuilding, or performing a full sync of a ZaxbyGraph issue/PR database, search the current worktree and known sibling/source repository locations for an existing cache first.
  • Validate any discovered cache against the requested repository and inspect its sync metadata before reuse. When it is compatible, reuse it in place if writable or copy it into the current worktree and run only an incremental sync.
  • Build a new cache from scratch only when no compatible, usable cache exists. Record that discovery result before starting the rebuild so agents do not repeat avoidable GitHub API work or consume rate limits unnecessarily.

Read the full file on GitHub · 182 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. 10d ago Changed · +35 tokens per session a157e17536c9
  2. 23d ago Changed · +71 tokens per session 06c533502346
  3. 1mo ago Changed · +1 lines · +95 tokens per session 09e3d91ea609
  4. 1mo ago Changed · +1 lines · +412 tokens per session 5ebcaf0240ba
  5. 1mo ago Changed · +40 tokens per session 20c587092eb4
  6. 1mo ago Changed · +7 lines · +161 tokens per session 65c9a89963ae
  7. 1mo ago Changed · +58 tokens per session d3de7baf067e
  8. 1mo ago Changed · +1 lines · +80 tokens per session b00417b65bc1
  9. 2mo ago Changed · +376 tokens per session b0bd88aebaa2
  10. 2mo ago First seen · 172 lines · 6,774 tokens per session scan A eb8a66b3a845

Subscribe to this mod's changes

opencode-swarm AGENTS.md is an instructions file published in the GitHub repository ZaxbyHub/opencode-swarm (518 stars, last pushed today), licensed MIT. It adds 8,102 tokens to every session, about $0.0324 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

opencode-swarm AGENTS.md compared with instructions from other repositories

opencode-swarm AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
opencode-swarm AGENTS.mdZaxbyHub/opencode-swarmInstructions file518todayMITA8,102Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,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