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/anshss/shiploopWrote 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/anshss/shiploop/compress)<a href="https://agentmods.dev/commands/anshss/shiploop/compress"><img src="https://agentmods.dev/badge/commands/anshss/shiploop/compress/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/anshss/shiploop/compress"><img src="https://agentmods.dev/badge/commands/anshss/shiploop/compress.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.00028 | $0.01989 |
| Opus 5.5 | $0.00011 | $0.00796 |
| Sonnet 5.5 | $0.00006 | $0.00398 |
| Haiku 4.5 | $0.00003 | $0.00199 |
Grade A, and why
compress 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 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.
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 — 158 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/shiploop:compress
The ONLY thing that compresses
CLAUDE.md. Nothing automatic ever edits that file.scripts/govern/claudemd-trim.sh(operator-invoked, asgovern:context-budgetsorgovern:trim) detects and reports only (`trim: CLAUDE.md / chars, compression candidate(s)
- run /shiploop:compress
), andscripts/govern/claudemd-trim.sh --apply ` moves one pre-approved block. Everything else happens here, with an operator watching.
CLAUDE.md is re-sent to the model in full on every turn, so a rule that only matters while editing a
shell script is charged to every session that never opens one. This command reduces that per-turn tax
without deleting a single rule.
The lever is delivery, not prose. On the workspace this method came from, a wording-only pass over
the whole file bought 759 chars (2.9%) because the file was already at its hand-compressed floor. The
same file then dropped 26,511 -> 18,830 chars (-29%) with no rule removed, purely by moving
mechanically-triggered rules into scripts/rules-on-touch.sh. Do not open this command by rewriting
sentences.
Sort by DETECTABILITY, never by frequency. Frequency was tested as a sort key and rejected: a rule that fires rarely but prevents a destroyed box is high value precisely because nobody recalls it, which argues for just-in-time delivery, not against it. The only question that decides a block is whether its trigger is mechanically detectable from a tool call.
Step 1 - Measure composition per section
Do not skip this. It is what proves where the mass actually is, and it usually contradicts the guess.
awk '/^## /{if(h)printf "%6d %s\n",n,h; h=$0; n=0} {n+=length($0)+1} END{if(h)printf "%6d %s\n",n,h}' CLAUDE.md | sort -rn
wc -c CLAUDE.md
Report the table to the operator before touching anything.
Step 2 - Read the candidates the automatic pass already found
governor/claudemd-trim-proposals.md. Each proposal carries a Class: field:
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.
- 2mo ago Changed · +1 lines c835c0edb14d
- 2mo ago First seen · 157 lines · 28 tokens per session scan A 74dd1296b02c
compress is a command published in the GitHub repository anshss/shiploop (11 stars, last pushed 4d ago), licensed Apache-2.0. It adds 28 tokens to every session and 1,989 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-09-09.
compress compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| compressanshss/shiploop | Command | 11 | 4d ago | Apache-2.0 | A | 28 | Claude Code |
| minutes-ideassilverstein/minutes | Command | 1.6k | today | MIT | A | 48 | Claude Code, OpenCode |
| learnReflexioAI/claude-smart | Command | 799 | yesterday | Apache-2.0 | A | 14 | Claude Code |
| memory-storeverygoodplugins/mcp-automem | Command | 68 | 3d ago | MIT | A | 10 | Claude Code |
| analyze-contextRohiRIK/OpenLtm | Command | 31 | today | MIT | A | 39 | Claude Code |
| vertical-spawnStarlight-Intelligence/Starlight-Intelligence-System | Command | 12 | today | MIT | A | 43 | Claude Code |
| recallnaimkatiman/continuous-improvement | Command | 11 | today | MIT | A | 44 | Claude Code |