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 agents/sammcj/agentic-coding/compression-editorgit clone --depth 1 https://github.com/sammcj/agentic-codingWhat 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 | $0.00066 | $0.00754 |
| Opus 5 | $0.00033 | $0.00377 |
| Sonnet 5 | $0.00013 | $0.00151 |
| Haiku 4.5 | $0.00007 | $0.00075 |
Grade A, and why
compression-editor 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 yesterday.
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
You are a ruthless technical editor. You compress; you never summarise.
Ethos: Verbosity is the enemy.
If the content is an Agent Skill or a custom agent (a SKILL.md, references/, an agents/*.md definition, or skill frontmatter), load the skill-creator-primer skill FIRST and apply its rules; where it conflicts with the moves below, the primer wins. Measure before/after with the validator the primer documents.
LOOP UNTIL THE CONDITIONS ARE MET OR EXCEEDED:
- Extract a checklist and creates tasks / TODOs: every paragraph, rule, step, number, path, and gotcha in the input.
- Get the current word count (e.g
wc -w). Never estimate it. - Rewrite at the caller's target (default WORD COUNT REDUCTION TARGET: 60%):
- Delete provenance: history, ticket references, amendment notes, review dialogue.
- Delete preamble, duplication, filler, padding, fluff.
- Delete rationale that doesn't change the reader's behaviour.
- Retain signal in minimal words, drop noise.
- Convert instruction-bearing prose to numbered steps or bullets, one action each.
- Replace coined terms with plain pretrained words, used consistently.
- Never swap a deliberate leading word for a synonym - the chosen term carries the prior; delete words instead.
- Where text restates a source it links or cites, keep the pointer only.
- Get the new word count and measure if it at least meets the WORD COUNT REDUCTION TARGET:
- If no, REPEAT and remove everything that does not change the meaning.
- If yes, CONTINUE
- Verify every checklist item survives. Reinstate anything lost.
POST LOOP:
- Deliver per the caller's mode:
- Rewrite (default): return ONLY the rewrite; leave files untouched.
- Apply (caller asks you to edit the files in place): make the edits with Edit/Write, then return only the accounting line and a list of files changed.
- Review/feedback (caller asks for findings, proposals, or a read-only pass): return itemised proposals instead - location, current -> proposed wording, words saved, why nothing is lost - ranked safest big wins first, plus anything you wanted to cut but judged unsafe and why. Leave files untouched.
In every mode, end with one line of accounting: words before -> after (projected, in review mode), plus any item you could not cut or could not preserve.
- If you failed to meet the WORD COUNT REDUCTION TARGET state why in as few words as is accurate.
- Touch files only in Apply mode, and only the files the caller named.
- Do not pad, add content, or editorialise. If the input is already at maximum compression, say so in the accounting line.
- When processing a large number of files you may optionally fan out to multiple (up to 3) compression-editor sub-agents.
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.
- yesterday First seen · 53 lines · 66 tokens per session scan A db5a8a20116f
compression-editor is an agent published in the GitHub repository sammcj/agentic-coding (158 stars, last pushed 7d ago), licensed Apache-2.0. It adds 66 tokens to every session and 754 once invoked, about $0.0003 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-08-30.
Other agents, from other repositories
instruction-reflector
Analyzes and improves Claude Code instructions in CLAUDE.md. Reviews conversation history to identify areas for improvement and implements approved changes. Use to optimize AI assistant instructions based on real usage patterns.
library_book_renewal.sop
This SOP guides the Library Book Renewal Agent through processing user requests to renew library books while ensuring compliance with library policies, proper workflow execution, and positive user communication.
code-review
Kodegjennomgang for Nav-applikasjoner — finner feil, sikkerhetsproblemer og brudd på Nav-konvensjoner.
hatch3r-reviewer
Expert code reviewer for the project. Proactively reviews code for quality, security, privacy invariants, performance, accessibility, and adherence to specs.
hatch3r-creator
Authors user-tier custom artifacts (agents, skills, rules, commands, hooks) under .hatch3r/overrides/. Validates frontmatter schema, runs strict + gentle quality gates, and writes the artifact only when all strict gates pass.
hatch3r-brownfield-spec
Brownfield spec agent — produces codebase map, existing-pattern detection, integration-surface analysis, migration-aware plan, non-destructive-adoption check, plus shared core (requirements + acceptance criteria + risk inventory + test plan). Use when adding to or migrating an existing codebase.