compress-all

compress-all is a command for Claude Code from oborchers/fractional-cto. It costs 21 tokens per session (1,030 once invoked), scanned A, original, MIT.

A command that searches a repository recursively for matching Markdown files and compresses them in batches. Markdown is a plain-text format commonly used for documentation.

In plain words
What is it for?
Use it to find every file with a chosen name and process those files with the markdown-compression skill. It can run in automatic approval mode and supports lossless mode when requested.
Why use it?
It reduces the amount of documentation an AI agent must read while preserving the information needed from files such as CLAUDE.md or ARCHITECTURE.md.

Command for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions CLAUDE.md; mentions subagents; names the AskUserQuestion tool.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is | 2 | ./src/CLAUDE.md | ~320 | 5 |.

Part of the markdown-compressor plugin — 1 skill, 2 commands, 2 agents shipped together

Good fit Use it to find every file with a chosen name and process those files with the markdown-compression skill. It can run in automatic approval mode and supports lossless mode when requested.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/oborchers/fractional-cto
agentmods
npx agentmods add commands/oborchers/fractional-cto/compress-all

Made for: Claude Code.

Or install markdown-compressor, the plugin that ships this one along with the rest of its 1 skill, 2 commands, 2 agents.

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 compress-all

README.md
[![agentmods](https://agentmods.dev/badge/commands/oborchers/fractional-cto/compress-all/github.svg)](https://agentmods.dev/commands/oborchers/fractional-cto/compress-all)
Your own site
<a href="https://agentmods.dev/commands/oborchers/fractional-cto/compress-all"><img src="https://agentmods.dev/badge/commands/oborchers/fractional-cto/compress-all/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 compress-all

Your own site · 80×15
<a href="https://agentmods.dev/commands/oborchers/fractional-cto/compress-all"><img src="https://agentmods.dev/badge/commands/oborchers/fractional-cto/compress-all.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,030 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.00021 $0.01030
Opus 5.5 $0.00008 $0.00412
Sonnet 5.5 $0.00004 $0.00206
Haiku 4.5 $0.00002 $0.00103

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

Security

Grade A, and why

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

markdown-compressor/commands/compress-all.md · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Recursively find and compress all files matching the given filename using the markdown-compression skill. Always runs in auto-approve mode with batched section processing.

Follow this process exactly:

Step 1: Discover Files

Use the Glob tool to search for **/<filename> in the current working directory, where <filename> is the argument from $ARGUMENTS (e.g., CLAUDE.md).

If no filename was provided, use AskUserQuestion to ask which filename to search for (e.g., CLAUDE.md, ARCHITECTURE.md, TREE.md).

If no files are found, inform the user and stop.

Step 2: Confirm File List

For each discovered file, read it and count approximate tokens (words * 1.3).

Present the file list:

| # | File | Tokens | Sections |
|---|------|--------|----------|
| 1 | ./CLAUDE.md | ~850 | 12 |
| 2 | ./src/CLAUDE.md | ~320 | 5 |
| 3 | ./supabase/CLAUDE.md | ~1,200 | 18 |

Total: ~X tokens across N files.

Use AskUserQuestion to confirm:

  • Compress all — process every file in the list
  • Exclude some — let the user specify files to skip (then confirm the reduced list)

Step 3: Determine Mode

If --lossless was passed in arguments, use lossless mode for all files. Otherwise, default to lossy mode (no question needed — lossy is the recommended default for batch operations).

Step 4: Process Each File

For each file in the confirmed list, in order:

4a: Announce

Show a header for the current file:

## Compressing [N]/[total]: [file-path]

4b: Pre-Analysis

Read the file, parse heading hierarchy, split into sections, flag structural issues. Show a brief section table (same format as /markdown-compressor:compress Step 3).

4c: Batched Compression

Process sections using the same batched approach as /markdown-compressor:compress Step 4, with auto-approve always active:

  1. For each batch of up to 5 non-empty sections:
    • Dispatch all section-compressor agents in the batch in a single message (parallel Agent tool calls)
    • Agents are read-only (Read/Grep/Glob only) and receive section text in their prompt — they do not read or modify the target file. It is safe to dispatch all agents in a batch simultaneously.
    • Wait for all to return
  2. If in lossy mode, dispatch all compression-reviewer agents in the batch in a single message (parallel Agent tool calls). Wait for all to return. Incorporate critical fixes automatically.
  3. Show batch summary (one line per section):
    Section [N]/[total]: [heading] — ~X → ~Y tokens (-Z%)
    
  4. Write all compressed sections in the batch to the file sequentially (top to bottom) using the Edit tool.
  5. Re-read the file before processing the next batch.

Read the full file on GitHub · 111 lines

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 First seen · 111 lines · 21 tokens per session scan A dbe3c86134a5

Subscribe to this mod's changes

compress-all is a command published in the GitHub repository oborchers/fractional-cto (32 stars, last pushed 5d ago), licensed MIT. It adds 21 tokens to every session and 1,030 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-08-30.