Skip to content
Development
Command

/compress

Automatically compress CLAUDE.md or other memory files with protected-span safety. One-command token savings.

From plugin
governor
1325 skills5 commands5 hooks
> /plugin marketplace add 0xhimanshu/governor
> /plugin install governor@governor

Command definition

compress.md
description: Automatically compress CLAUDE.md or other memory files with protected-span safety. One-command token savings.
disable-model-invocation: false

Governor Compress

Automatically compress memory files with dense professional prose while strictly protecting critical spans.

Usage:

/governor:compress [light|medium|aggressive] [file]

Default target: `CLAUDE.md` Default level: `medium`

Compression targets:

  • `light`: remove filler/repetition; target 15-30% savings outside protected spans.
  • `medium`: collapse narrative into decision bullets; target 35-55% savings outside protected spans.
  • `aggressive`: keep only rules, facts, commands, risks, decisions; target 50-70% savings outside protected spans.

One-command rule: do not ask the user to edit drafts, copy paths, or run follow-up commands unless manual mode is explicitly requested or a safety fallback is required.

Internal flow:

  • Run Governor auto mode.
  • Parse the returned JSON payload.
  • Rewrite the protected payload internally.
  • Run the JSON finalize command, then inspect `status`.
  • If `status=quality_guard_failed` and `next_level` is present, retry once at

the stronger level using `retry_auto_command`.

  • Finalize, validate, recover if needed, and restore the backup on unrecoverable

failure.

  • Reject low-savings output with a quality guard.
  • Return only the result summary.

Manual mode (`manual` or `--manual`) is only for very large files or explicit user request.

Protected spans are never modified:

  • Code blocks and inline code.
  • Paths, URLs, commands, env vars.
  • API names, model names, versions, dates.
  • Headings, frontmatter, tables.
  • Warnings and irreversible rules.
  • Brand and design tokens.

After compression, report:

  • Original vs compressed token estimate.
  • Memory saved percentage.
  • Validation status.
  • Quality-guard status.
  • Backup location.
Read more
@0xhimanshu
Ships withgovernor

Claude Code usage governor: compact professional output, context slimming, tool-output filtering, telemetry, and drift guardrails.

Stars on GitHub

Momentum

stars in total
132
Star history of 0xhimanshu/governor on GitHub, a chart by star-history.com

Other commands on governor.

mode

mode

Command

Control Governor. Show or set mode (on/off), allow full output for the next diagnostic step, or apply strict governance to the…

@0xhimanshu@0xhimanshuInstall Command
plan

plan

Command

Create an implementation contract before broad work, or check current changes against the saved contract.

@0xhimanshu@0xhimanshuInstall Command

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command