compress

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

A command for reducing the token usage of one Markdown file while keeping the information an AI agent needs. It supports lossless structural compression and lossy semantic compression.

In plain words
What is it for?
Use it to validate and compress a specified Markdown file, preserve YAML frontmatter, and choose either structural compression or deeper semantic reduction with review.
Why use it?
It makes a documentation file shorter for AI processing while preserving its required instructions and information. Lossless mode avoids changing the meaning; lossy mode can remove more wording.

Command for Claude Code

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

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

Good fit Use it to validate and compress a specified Markdown file, preserve YAML frontmatter, and choose either structural compression or deeper semantic reduction with review.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/oborchers/fractional-cto/compress
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/oborchers/fractional-cto

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

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

agentmods 80×15 button for compress

Your own site · 80×15
<a href="https://agentmods.dev/commands/oborchers/fractional-cto/compress"><img src="https://agentmods.dev/badge/commands/oborchers/fractional-cto/compress.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 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,649 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.00027 $0.01649
Opus 5.5 $0.00011 $0.00660
Sonnet 5.5 $0.00005 $0.00330
Haiku 4.5 $0.00003 $0.00165

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

Security

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 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.md · 173 lines

How it starts

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

Compress the specified markdown file using the markdown-compression skill. The goal is to reduce token usage while preserving the information an LLM needs.

Follow this process exactly:

Step 1: File Validation

Read the file specified in $ARGUMENTS. If no file was provided, use AskUserQuestion to ask the user which file to compress.

Verify:

  • File exists and is readable
  • File is markdown (.md extension)
  • File is not empty

If the file has YAML frontmatter, note it — frontmatter must be preserved exactly.

Step 2: Mode Selection

If --lossless was passed in arguments, use lossless mode. Otherwise, use AskUserQuestion to ask:

  • Lossy (recommended) — semantic compression with compressor-reviewer loop. Maximum token reduction.
  • Lossless — structural optimization only. Zero semantic change.

If --auto was passed in arguments, enable auto-approve mode and skip the question below. Otherwise, immediately after the mode selection answer is received, use AskUserQuestion to ask about review style — do NOT proceed to Step 3 until this question is answered:

  • Section-by-section (recommended) — review and approve/skip/edit each section individually.
  • Auto-approve — compress all sections without per-section review. The compression-reviewer agent still runs in lossy mode and auto-incorporates fixes, but the user is not gated.

Both mode and review style must be resolved before moving to Step 3.

Step 3: Pre-Analysis

Read the full file and analyze its structure:

  1. Parse the heading hierarchy (identify all #, ##, ###, etc.)
  2. Split the file into sections at the highest sensible heading level (typically ##)
  3. For each section, count approximate tokens (words * 1.3)
  4. Flag any structural issues:
    • Skipped heading levels (e.g., # → ###)
    • Sections over ~500 tokens (candidates for attention)
    • Empty sections
    • Duplicate content across sections

Present the structural analysis as a table:

| # | Section | Tokens | Notes |
|---|---------|--------|-------|
| 1 | Overview | ~130 | |
| 2 | Configuration | ~340 | |
| 3 | Deployment | ~520 | Large section |
| 4 | Testing | ~0 | Empty |

Read the full file on GitHub · 173 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 · 173 lines · 27 tokens per session scan A d3684c9efe75

Subscribe to this mod's changes

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