af-compound

af-compound is a command for Claude Code, OpenCode from chankov/agent-fleet. It costs 15 tokens per session (385 once invoked), scanned A, original, MIT.

A command for recording useful lessons from a coding session in the project's rules and documentation.

In plain words
What is it for?
Use it to identify a small number of lessons, remove duplicates, and propose precise updates to existing rule or documentation files.
Why use it?
It prevents repeated mistakes by turning decisions, corrections, and review findings into guidance the project can use later.

Command for Claude CodeOpenCode

Written for Claude Code and OpenCode: $ARGUMENTS substitution, but also installed under .opencode/.

Good fit Use it to identify a small number of lessons, remove duplicates, and propose precise updates to existing rule or documentation files.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/chankov/agent-fleet/af-compound
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.

Clone the repo
git clone --depth 1 https://github.com/chankov/agent-fleet

Made for: Claude Code, 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 af-compound

README.md
[![agentmods](https://agentmods.dev/badge/commands/chankov/agent-fleet/af-compound/github.svg)](https://agentmods.dev/commands/chankov/agent-fleet/af-compound)
Your own site
<a href="https://agentmods.dev/commands/chankov/agent-fleet/af-compound"><img src="https://agentmods.dev/badge/commands/chankov/agent-fleet/af-compound/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 af-compound

Your own site · 80×15
<a href="https://agentmods.dev/commands/chankov/agent-fleet/af-compound"><img src="https://agentmods.dev/badge/commands/chankov/agent-fleet/af-compound.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 385 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00015 $0.00385
Opus 5.5 $0.00006 $0.00154
Sonnet 5.5 $0.00003 $0.00077
Haiku 4.5 $0.00002 $0.00038

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

Security

Grade A, and why

af-compound 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 3mo 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.

.versions/0.0.1/.opencode/commands/af-compound.md · 17 lines

What it actually says

Invoke the compound-learning skill via the skill tool.

Capture this session's lessons into the project's own rules (HOW) and docs (WHAT/WHY), optionally focused on $ARGUMENTS:

  1. Resolve the targets: read .ai/agent-fleet-overrides.md — the ## agent-hub (legacy ## agent-team) section's rules: and docs: keys name the rule folders and documentation entry points. If absent, locate an existing rules/docs tree and confirm it with the user; never invent a new tree.
  2. Gather the evidence: this conversation (user corrections, decisions, rejected approaches), the session's git diff / git log, and any review findings produced during the session.
  3. Extract at most 5 candidate lessons — each one imperative sentence plus a one-line Why (the failure it prevents) and a one-line Evidence (what happened this session). Classify each as rule, doc, or neither; the default verdict is neither.
  4. Dedupe index-first: read the rules tree's README.md/index.md manifest, grep for existing coverage, and prefer sharpening an existing rule in place over adding a new one.
  5. Propose the surviving lessons — target file, Why, Evidence, and the exact diff — and wait for approval. The user filters preferences-of-the-moment from durable policy.
  6. Apply the approved diffs as minimal edits to existing files (at most 1 new file, registered in the tree's index), verify links and indexes still resolve, and report the changes file by file.

Run this at the end of a session, before the context is gone. If nothing rises to a lesson, say so and stop — compounding a smooth session produces filler.

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. 3mo ago First seen · 17 lines · 15 tokens per session scan A 96601d867a7d

Subscribe to this mod's changes

af-compound is a command published in the GitHub repository chankov/agent-fleet (22 stars, last pushed yesterday), licensed MIT. It adds 15 tokens to every session and 385 once invoked, about $0.0001 per session on Opus 5.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-31.

Related

af-compound compared with commands from other repositories

af-compound next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
af-compoundchankov/agent-fleetCommand22yesterdayMITA15Claude Code, OpenCode
checklistgithub/spec-kitCommand153kyesterdayMITA13Claude Code
clarifygithub/spec-kitCommand153kyesterdayMITA27Claude Code
specifygithub/spec-kitCommand153kyesterdayMITA13Claude Code
analyzegithub/spec-kitCommand153kyesterdayMITA26Claude Code
convergegithub/spec-kitCommand153kyesterdayMITA35Claude Code
implementgithub/spec-kitCommand153kyesterdayMITA14Claude Code