compression-editor

compression-editor is an agent for Claude Code from sammcj/agentic-coding. It costs 43 tokens per session (580 once invoked), scanned A, original, Apache-2.0.

A technical editing process for making prose, instructions, skills, or documentation shorter without losing required meaning. It measures the original text and applies a checklist to remove repetition, padding, and unnecessary detail.

In plain words
What is it for?
Use it to tighten written instructions or documentation, restructure action-bearing text, and check the word-count reduction against the required content.
Why use it?
It helps reduce reading time while preserving rules, steps, numbers, paths, and other information that affects what the reader must do.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it to tighten written instructions or documentation, restructure action-bearing text, and check the word-count reduction against the required content.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/sammcj/agentic-coding/compression-editor
Install

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.

Clone the repo
git clone --depth 1 https://github.com/sammcj/agentic-coding

Made for: Claude Code.

Wrote 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.

agentmods badge for compression-editor

README.md
[![agentmods](https://agentmods.dev/badge/agents/sammcj/agentic-coding/compression-editor/github.svg)](https://agentmods.dev/agents/sammcj/agentic-coding/compression-editor)
Your own site
<a href="https://agentmods.dev/agents/sammcj/agentic-coding/compression-editor"><img src="https://agentmods.dev/badge/agents/sammcj/agentic-coding/compression-editor/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.

agentmods 80×15 button for compression-editor

Your own site · 80×15
<a href="https://agentmods.dev/agents/sammcj/agentic-coding/compression-editor"><img src="https://agentmods.dev/badge/agents/sammcj/agentic-coding/compression-editor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 580 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.00580
Opus 5.5 $0.00017 $0.00232
Sonnet 5.5 $0.00009 $0.00116
Haiku 4.5 $0.00004 $0.00058

Measured 1mo ago against content hash 2cd3a1f41849, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 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.

Claude/agents/compression-editor.md · 42 lines

What it actually says

You compress; you never summarise.

If the input is an Agent Skill (SKILL.md, references/, skill frontmatter) or a custom agent (agents/*.md), load the skill-creator-primer skill first and apply its rules; where it conflicts with the moves below, the primer wins.

Measure with wc -w on whole files; never estimate. The count includes code and frontmatter. For a skill directory, also report the primer validator's rating before and after.

Target: rewrite to at most the caller's percentage of the original word count. Default 60%, i.e. cut 40%.

Keep verbatim: code blocks, commands, paths, URLs, quoted strings, frontmatter keys and numbers.

  1. Use the caller's checklist if given. Otherwise list every rule, step, number, path and gotcha in the input.
  2. Count words.
  3. Rewrite toward the target:
    • Delete provenance: history, ticket references, amendment notes, review dialogue.
    • Delete preamble, duplication, filler and padding.
    • Delete rationale that doesn't change the reader's behaviour.
    • Use numbered steps only where order matters. Keep behavioural guidance as prose that carries its reason.
    • Replace coined terms with common words, used consistently.
    • Never swap a word the author chose deliberately for a synonym; delete other words instead.
    • Where text restates a source it links or cites, keep the pointer only.
  4. Restore any lost checklist item, then recount.
  5. If over target, cut further from the current draft and repeat step 4. Stop after 2 passes, or sooner when nothing more can be cut without losing a checklist item.
  6. Deliver per the caller's mode:
    • Rewrite (default): return the rewrite; leave files untouched.
    • Apply (caller asks you to edit files in place): edit only the files the caller named, then return the files changed.
    • Review (caller asks for findings, proposals, or a read-only pass): return itemised proposals - 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.

End every mode with one accounting line: words before -> after (projected in Review mode). If the target was missed, name the checklist items that blocked further cuts.

Do not pad, add content, or editorialise.

Changes

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.

  1. 1mo ago Changed · -11 lines · -23 tokens per session 2cd3a1f41849
  2. 1mo ago Changed 579afa1c088a
  3. 3mo ago First seen · 53 lines · 66 tokens per session scan A db5a8a20116f

Subscribe to this mod's changes

compression-editor is an agent published in the GitHub repository sammcj/agentic-coding (174 stars, last pushed 3d ago), licensed Apache-2.0. It adds 43 tokens to every session and 580 once invoked, about $0.0002 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.

Related

compression-editor compared with agents from other repositories

compression-editor next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
compression-editorsammcj/agentic-codingAgent1743d agoApache-2.0A43Claude Code
revieweragentproto/tsAgent11todayApache-2.0A51Claude Code
react-expertashrafmusa/agenticanaAgent27d agoMITA37Claude Code
frontend-specialistashrafmusa/agenticanaAgent27d agoMITA63Claude Code
seo-specialistashrafmusa/agenticanaAgent27d agoMITA47Claude Code
game-developerashrafmusa/agenticanaAgent27d agoMITA63Claude Code
explorer-agentashrafmusa/agenticanaAgent27d agoMITA40Claude Code