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.
git clone --depth 1 https://github.com/sammcj/agentic-codingWrote 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/sammcj/agentic-coding/compact-prep)<a href="https://agentmods.dev/commands/sammcj/agentic-coding/compact-prep"><img src="https://agentmods.dev/badge/commands/sammcj/agentic-coding/compact-prep/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.
<a href="https://agentmods.dev/commands/sammcj/agentic-coding/compact-prep"><img src="https://agentmods.dev/badge/commands/sammcj/agentic-coding/compact-prep.svg" alt="Reviewed on agentmods" width="80" 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.00030 | $0.00393 |
| Opus 5.5 | $0.00012 | $0.00157 |
| Sonnet 5.5 | $0.00006 | $0.00079 |
| Haiku 4.5 | $0.00003 | $0.00039 |
Grade A, and why
compact-prep 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 1mo 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.
What it actually says
This is an automated message to state that the context window usage is getting high and the user is going to run a compaction
As such, could you please:
-
(Only if applicable) Update any state that tracks the work currently in progress / the state of the tasks being worked on, e.g. A development plan if operating from one, the CLAUDE.md ( Only if that is where the user has asked you to track in flight work and it does not only contain rules), etc... to ensure it's up to date without any now outdated or invalid information, if it has next steps that they are correct, and if you're mid troubleshooting a complex problem - where you've got to and what you've tried so far (but keep it concise).
-
Give me a concise prompt that I can provide to the compaction agent that will be compacting our conversation to ensure the signal to noise ratio is kept high and focused. The agent will already be aware of it's task to compact the conversation so only needs additional guidance on specific things that may not be obvious but are important to keep (e.g. the WHY not just the WHAT).
-
Give me a concise prompt that I can provide to continue our work after compaction is complete. Keep in mind that the new agent / session will have access to the same files and will have the same CLAUDE.md agent rules in context.
Be terse / concise. Don't add filler. Less is more. The agent reading this is a capable model, not an audience. TLDRs are great.
Note: You must not quote, indent or format the prompts in any way that might impact me copying and pasting them without cleaning them up.
$ARGUMENTS
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.
- 1mo ago First seen · 23 lines · 30 tokens per session scan A 7fbdda1f5d8b
compact-prep is a command published in the GitHub repository sammcj/agentic-coding (164 stars, last pushed 3d ago), licensed Apache-2.0. It adds 30 tokens to every session and 393 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-30.
Other commands, from other repositories
remember
Write-side memory: stores decisions, patterns, and outcomes in the MCP memory knowledge graph as entities with typed observations and relations. Use when something worth persisting across sessions was just learned or decided. To search or read existing memory, invoke memory; to debug retrieval internals…
save-to-md
Save session documentation with Neo4j memory integration.
revise-claude-md
Update CLAUDE.md with learnings from this session.
pm-crystallize
Promote a project-local lesson to /.great-pm/decisions.md (cross-project memory) when it has 3+ hits with high confidence. Surfaces candidates as PROPOSALS — never auto-promotes; human approval required.
search
Search your memories using Memento hybrid retrieval.
checklist
Generate a custom checklist for the current feature based on user requirements.