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.01958 |
| Opus 5 | $0.00014 | $0.00979 |
| Sonnet 5 | $0.00006 | $0.00392 |
| Haiku 4.5 | $0.00003 | $0.00196 |
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 today.
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 — 157 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. The run-end pass 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:
| Class | Meaning |
|---|---|
dead-citation |
every path or knob it cites is provably gone |
duplicate |
an exact duplicate of another block |
jit-candidate |
mechanically detectable trigger: it can become a rule pack |
judgment |
judgment-call trigger: never a candidate, it stays resident |
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.
- today First seen · 157 lines · 28 tokens per session scan A 74dd1296b02c
compress is a command published in the GitHub repository anshss/shiploop (7 stars, last pushed today), licensed Apache-2.0. It adds 28 tokens to every session and 1,958 once invoked, about $0.0001 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-09.
Other commands, from other repositories
polisade-review-pr
Run a quality review on an open pull request (by PR number or linked TASK) via an independent clean-context subagent and post the verdict (self-review path only on opencode; the self flag is accepted for Claude/Codex parity and is a no-op here). Use when PM mentions "review PR", "PR review", "review pull request"…
polisade-review
Run a second-opinion quality review on a completed TASK via an independent clean-context subagent (self-review path only on opencode; the self flag is accepted for Claude/Codex parity and is a no-op here). Use when PM mentions "review TASK", "second opinion", "check my implementation", "codex review", "self-review"…
rekindle
Recover a fellowship after a session crash. Scans worktrees and quest state, presents a recovery dashboard, and re-spawns Gandalf with recovered quest context. Use when returning to a crashed or expired fellowship session.
context
Analyze and optimize Claude Code's context configuration (analyze, optimize, or reset).
pin
Break checkpoint — status display, session log, optional MEMORY.md update.
atlas
Cross-project atlas with an adaptive render — ≤4 projects in scope get detail cards, more get one aligned digest line each, grouped by domain. Facets projects · sessions · memory · plans · specs · plugins · claude.md; a bare run renders all of them except plugins (opt-in, machine-global). --dir NAME|PATH anchors the…