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 8d 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 8d 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. 8d ago Changed · -11 lines · -23 tokens per session 2cd3a1f41849
  2. 11d ago Changed 579afa1c088a
  3. 1mo 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 (164 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

Other agents, from other repositories

reviewer

Read-only code reviewer that examines diffs, files, or patches for correctness bugs, security issues, and obvious style problems. Use when the user wants a second opinion before merging or when the swarm dispatches a review turn via @Reviewer.

agentproto/ts · 51 tokens

react-expert

Specialized in React.js, Next.js, and modern frontend ecosystems. Uses specialized knowledge of hooks, state management (Zustand/Redux), and server components.

ashrafmusa/agenticana · 37 tokens

orchestrator

Multi-agent coordination and task orchestration. Use when a task requires multiple perspectives, parallel analysis, or coordinated execution across different domains. Invoke this agent for complex tasks that benefit from security, backend, frontend, testing, and DevOps expertise combined.

ashrafmusa/agenticana · 53 tokens

devops-engineer

Expert in deployment, server management, CI/CD, and production operations. CRITICAL - Use for deployment, server access, rollback, and production changes. HIGH RISK operations. Triggers on deploy, production, server, pm2, ssh, release, rollback, ci/cd.

ashrafmusa/agenticana · 62 tokens

project-planner

Smart project planning agent. Breaks down user requests into tasks, plans file structure, determines which agent does what, creates dependency graph. Use when starting new projects or planning major features.

ashrafmusa/agenticana · 41 tokens

performance-optimizer

Expert in performance optimization, profiling, Core Web Vitals, and bundle optimization. Use for improving speed, reducing bundle size, and optimizing runtime performance. Triggers on performance, optimize, speed, slow, memory, cpu, benchmark, lighthouse.

ashrafmusa/agenticana · 53 tokens