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.
npx agentmods add commands/fusengine/agents/lessons-compactgit clone --depth 1 https://github.com/fusengine/agentsWrote 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.
[](https://agentmods.dev/commands/fusengine/agents/lessons-compact)<a href="https://agentmods.dev/commands/fusengine/agents/lessons-compact"><img src="https://agentmods.dev/badge/commands/fusengine/agents/lessons-compact.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00049 | $0.01143 |
| Opus 5 | $0.00024 | $0.00571 |
| Sonnet 5 | $0.00010 | $0.00229 |
| Haiku 4.5 | $0.00005 | $0.00114 |
Grade A, and why
lessons-compact 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 69 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/lessons-compact
Compact the project's MEMORY/LESSON.md (project root). Over time this file accumulates near-duplicate entries, several lessons about the same root cause, and entries a later lesson has since contradicted.
Use /lessons to just view or append a single lesson — this command is the dedicated compaction pass.
How it runs — delegate, then arbitrate
Do not classify the entries yourself. Spawn the fuse-lessons:lessons-compactor agent and let it do the reading and the analysis.
Why delegate: compaction is a heavy-context, light-output task — it means reading the whole file, classifying every entry, and cross-checking each against all the others, to produce a verdict of a dozen lines. Doing that inline burns the lead's context for a result that fits in a paragraph.
Step 1 — spawn the agent
Pass it, in its prompt:
- the absolute path of
MEMORY/LESSON.md, - the absolute path of a scratchpad directory where it must write its proposal (it needs one — it will ask rather than guess if you omit it),
- any specific concern the user raised when invoking the command.
Step 2 — relay its report to the user
The agent returns a verdict, before/after sizes, the observed ordering convention, the merge list (with the shared root cause of each) and the drop list (each naming the later entry that supersedes it).
Show the user the proposed merges and drops, and ask for explicit confirmation before anything is written.
This is deliberately ask-first, not write-then-diff. Compaction is inherently lossy — it deletes lines — and MEMORY/LESSON.md is committed team memory, force-read into every session and every subagent. An unwanted compaction that already overwrote the file is far harder to notice and walk back than one caught in review. Nobody misses a lesson until the mistake it prevented happens again.
If git diff shows uncommitted changes on the file, the agent flags it — pass that warning on. Compacting on top of unsaved manual edits makes the proposal harder to trust.
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.
- 2d ago First seen · 69 lines · 49 tokens per session scan A a1f904d15f7f
lessons-compact is a command published in the GitHub repository fusengine/agents (25 stars, last pushed yesterday), licensed MIT. It adds 49 tokens to every session and 1,143 once invoked, about $0.0002 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-09-03.
Other commands, from other repositories
setup-agents
Scaffold a multi-agent AI setup for any repo. Scans the codebase, interviews the developer, generates agent configs for whichever AI tools the repo uses (Copilot, Claude Code, Cursor, Codex, Windsurf). Use when asked to "set up agents", "scaffold Copilot agents", or "create an AGENTS.md".
on
Turn on senior mode — refuses vague questions, hints instead of answers, never writes code.
unwrap
You are resuming a Claude Code session. Execute all steps below in order — no confirmation needed.
continue
Resume an interrupted autoimprove session from where it left off.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.