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

✍️ OpenClawRadar📅 Published: May 2, 2026🔗 Source
Governor: A Claude Code Plugin to Cut Token Waste via Output Compression, Context Slimming, and Tool Filtering
Ad

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 --force

Restart Claude Code, then run:

/governor:status
/governor:audit
/governor:compress CLAUDE.md

Governor 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 -vv noisy output of 54,314 estimated tokens → 1,726 tokens (96.8% blocked) with preserved failure lines.
Ad

Key Features

  • Always-on compact mode via SessionStart and UserPromptSubmit hooks.
  • Professional memory compression: /governor:compress CLAUDE.md rewrites 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:status reports blocked tokens, failures, compactions.
  • Prompt guidance: Soft suggestions for vague broad prompts.
  • Plan and drift guard: /governor:plan creates an implementation contract; /governor:guard checks 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

Ad

👀 See Also

Cold Validation Architecture: Dual-Agent Code Review System Open-Sourced
Tools

Cold Validation Architecture: Dual-Agent Code Review System Open-Sourced

Open-sourced system uses two separate AI agents for code validation: one builds code, another reviews it with zero context about the builder's reasoning. The reviewer only sees plan documents, code diffs, and test outputs.

OpenClawRadar
Local-first AI tax preparer with encrypted PII built on MCP
Tools

Local-first AI tax preparer with encrypted PII built on MCP

A developer built a tax filing extension for Crow that encrypts all PII with AES-256-GCM and works with any MCP-compatible client including Claude, ChatGPT, Gemini, or local models through Ollama. The system handles 1040, Schedule 1, HSA (8889), education credits (8863), self-employment (Schedule C/SE), and capital gains (Schedule D) calculations locally.

OpenClawRadar
RCFlow: Open-source orchestrator for Claude Code, Codex, and OpenCode with multi-session management
Tools

RCFlow: Open-source orchestrator for Claude Code, Codex, and OpenCode with multi-session management

RCFlow is an AGPL v3 orchestrator for AI coding agents (Claude Code, Codex, OpenCode) providing a unified UI to manage parallel sessions across machines, with worktree support, task planning, artifact tracking, and live telemetry.

OpenClawRadar
VS Code Agent Kanban: Markdown-based task management for AI coding agents
Tools

VS Code Agent Kanban: Markdown-based task management for AI coding agents

VS Code Agent Kanban is an extension that creates a GitOps-friendly kanban board inside VS Code using markdown files as task records. It addresses context rot in AI coding agents by preserving planning conversations, decisions, and implementation details in version-controlled .md files.

OpenClawRadar