Governor: A Claude Code Plugin to Cut Token Waste via Output Compression, Context Slimming, and Tool Filtering

Governor is a Claude Code plugin that tackles token and context bloat beyond simple style compression. It reduces output tokens, shrinks recurring memory files like CLAUDE.md, filters noisy build/test logs, and adds planning guardrails to prevent scope drift. It's installed as a Claude Code plugin, exposing a /governor:* command namespace.
Quick Start
bash install.sh --forceRestart Claude Code, then run:
/governor:status
/governor:audit
/governor:compress CLAUDE.mdGovernor auto-starts in compact professional mode. Toggle with /governor:on and /governor:off.
Benchmarks
Small local benchmarks with Sonnet (non-interactive, no tools):
- Output tokens (three technical prompts): Control avg 989 tokens → Governor avg 440 tokens (55.5% savings). Caveman-style gives 44.9% savings.
- Memory compression: 1877-token file → 838 tokens (55.4% savings) with medium compression.
- Tool output filtering: Synthetic
pytest -vvnoisy output of 54,314 estimated tokens → 1,726 tokens (96.8% blocked) with preserved failure lines.
Key Features
- Always-on compact mode via
SessionStartandUserPromptSubmithooks. - Professional memory compression:
/governor:compress CLAUDE.mdrewrites verbose files while preserving code blocks, inline code, paths, URLs, headings, tables, warnings, and env vars. A quality guard rejects low-savings compressions and restores the backup. - Tool-output filtering: Summarizes noisy Bash/test/build output but preserves failure signals.
- Telemetry ledger:
/governor:statusreports blocked tokens, failures, compactions. - Prompt guidance: Soft suggestions for vague broad prompts.
- Plan and drift guard:
/governor:plancreates an implementation contract;/governor:guardchecks current changes against it. - Portable rule snippets: Compact-mode rules included for Codex, Gemini, Cursor, Windsurf, and Cline.
Commands
/governor:on//governor:off– Enable/disable response compression/governor:status– Usage dashboard and waste heat map/governor:audit– Find bloated memory/rule files/governor:compress CLAUDE.md– Compress memory files/governor:full– Next Bash command returns full output/governor:plan//governor:guard– Scope management/governor:benchmark– Explain benchmark results
Installation
# Local development
claude --plugin-dir .
One-line local install
bash install.sh --force
From repository
gh repo clone 0xhimanshu/governor
cd governor
bash install.sh --force
Heavy Claude Code users should try Governor if they struggle with context bloating, broad task drift, or noisy logs eating their quota. It's a serious alternative to style-only token savers.
📖 Read the full source: HN AI Agents
👀 See Also

Using Obliteratus toolkit to remove refusal weights from AI models
A Reddit user used the Obliteratus toolkit to surgically remove specific weights responsible for refusal behavior in AI models, demonstrating on Alibaba's Qwen 1.5B model that it can reveal training origins without retraining.

FFF - Fast File Finder claims 100x speed advantage over ripgrep
FFF (Fast File Finder) is a web-based file search tool that claims to be 100x faster than ripgrep, positioning itself as a next-generation alternative to regex-based search methods. The tool requires JavaScript to run and was recently discussed on Hacker News with 36 points and 17 comments.

Claude Code Limiter: Self-Hosted Rate Limiter for Shared Claude Code Subscriptions
claude-code-limiter is a self-hostable tool that adds per-user rate limits to shared Claude Code subscriptions, featuring per-model quotas, credit budgets, sliding 24h windows, time-of-day rules, and a real-time dashboard.

Chrome Skills: Save and Reuse AI Prompts as One-Click Tools
Google's Chrome Skills feature lets users save AI prompts as reusable workflows that run with a single click on any webpage. Skills can be accessed by typing forward slash (/) or clicking the plus sign (+) in Gemini in Chrome.