# Governor for Claude Code — Compact Output + Hygiene
> Governor is a Claude Code plugin for compact output, context hygiene, and structured tool-output filtering via /governor:* commands plus local benchmarks.
## Install
Paste the prompt below into your AI tool:
## Quick Use
```bash
bash install.sh --force
# Restart Claude Code, then:
# /governor:status
# /governor:audit
# /governor:compress CLAUDE.md
```
## Intro
Governor is a Claude Code plugin that keeps responses compact and professional while improving context hygiene and filtering noisy tool output. It documents `bash install.sh --force` and /governor:* commands, and is GitHub-verified at 74★.
**Best for:** heavy Claude Code users who want concise answers, cleaner context, and reduced tool-log noise over long sessions
**Works with:** Claude Code; /slash commands namespace; installs via install.sh; includes benchmark fixtures
**Setup time:** 5–10 minutes
### Key facts (verified)
- README shows version 0.2.2 and install command `bash install.sh --force`.
- README lists a pilot table with an ~8% output token reduction (as stated in README).
- README includes micro-bench tables for output tokens, memory compression, and tool-output filtering.
- GitHub: 74 stars · 1 forks; pushed 2026-05-10 (GitHub API verified).
## Main
Treat Governor as a long-session stabilizer:
- Turn it on for repos with noisy tool output (tests, builds, network dumps).
- Use its audit/compress commands to keep always-loaded context files small.
- Validate impact with its benchmark fixtures so you can quantify savings vs regressions.
Start with a single repo and compare one real task with and without Governor before rolling it out team-wide.
### README excerpt (verbatim)
Governor for Claude Code
Keep Claude Code concise, clean, and under control.
Version 0.2.2
Compact professional output, context hygiene, tool-output filtering, and usage
telemetry for Claude Code Max users.
Governor is the serious alternative to style-only token savers. It keeps the
agent concise, shrinks recurring memory files, blocks noisy logs from flooding
context, and adds planning guardrails for broad tasks.
The installed Claude Code command namespace is still `/governor:*`.
## Quick Start
```bash
bash install.sh --force
```
Restart Claude Code, then run:
```text
/governor:status
/governor:audit
/governor:compress CLAUDE.md
```
Governor auto-starts in compact professional mode when the plugin is loaded.
Use `/governor:off` to disable response compression and `/governor:on` to
re-enable it.
## V2 Highlights
- **VCLR benchmark harness:** fixture-based benchmarks now score valid-context
loss, decision preservation, and wrong-decision rate, not only token counts.
- **Structured tool filtering:** Governor preserves high-signal clues from noisy
MCP-style payloads such as Burp history and Playwright network dumps.
- **No-compress safety boundaries:** risky source reads and code-heavy tool
outputs stay intact instead of being compacted into something misleading.
- **Capture-ready Caveman comparisons:** the benchmark suite can now replay real
captured Caveman comparator outputs when Claude CLI auth is available, while
falling back cleanly to reference text when it is not.
- **Replayable Governor reference cases:** the last reference-style Governor
benchmark rows can now be refreshed into captured replay files instead of
staying hand-written forever.
## Why It Exists
Heavy Claude Code users do not only burn quota on long answers. The bigger
session killers are often:
- bloated always-loaded context such as `CLAUDE.md`, notes, and rules
- huge Bash/test/build output copied into conversation context
- vague prompts that trigger broad scans and repeated failed attempts
- scope drift during long coding tasks
- compactions caused by preventable context growth
Governor attacks those system problems while keeping the interaction
professional and readable.
## Early Results
These are directional pilot results, not universal claims.
Same machine, fresh Claude CLI Sonnet sessions, same multi-turn task, same
### FAQ
**Q: Is Governor a prompt or a plugin?**
A: README describes it as a Claude Code plugin with a /governor:* command namespace.
**Q: How do I install it?**
A: Run `bash install.sh --force`, restart Claude Code, then use /governor commands per README.
**Q: What problem does it solve?**
A: Compact output, context hygiene, and tool-output filtering to reduce quota burn (per README).
## Source & Thanks
> Source: https://github.com/0xhimanshu/governor
> License: MIT
> GitHub stars: 74 · forks: 1
---
## 快速使用
```bash
bash install.sh --force
# 重启 Claude Code 后运行:
# /governor:status
# /governor:audit
# /governor:compress CLAUDE.md
```
## 简介
Governor 是 Claude Code 插件,目标是让输出更精简专业,并改善上下文卫生、过滤噪声 tool 输出。它提供 `bash install.sh --force` 与 /governor:* 指令,GitHub 已验证 74★。
**最适合:** Claude Code 重度用户:希望回答更精简、上下文更干净、长会话更不容易爆掉
**适配:** Claude Code;/slash 指令命名空间;install.sh 安装;包含 benchmark 用例
**配置时间:** 5–10 分钟
### 关键事实(已验证)
- README 标注版本 0.2.2,并给出安装命令 `bash install.sh --force`。
- README 给出 pilot 表:输出 token 约减少 8%(README 自述)。
- README 包含 micro benchmark:输出 token、记忆压缩、tool 输出过滤等对比表。
- GitHub:74 stars · 1 forks;最近更新 2026-05-10(GitHub API 验证)。
## 正文
把 Governor 当作“长会话稳定器”:
- 对工具输出很吵的仓库(测试、构建、网络抓包等)启用它。
- 用 audit/compress 指令把常驻上下文文件压小,避免持续膨胀。
- 用它自带的 benchmark fixture 做对比,既看节省,也看是否引入行为回归。
建议先在一个仓库里跑一次真实任务对比(开/关 Governor),再决定是否全团队推广。
### README 原文节选(verbatim)
Governor for Claude Code
Keep Claude Code concise, clean, and under control.
Version 0.2.2
Compact professional output, context hygiene, tool-output filtering, and usage
telemetry for Claude Code Max users.
Governor is the serious alternative to style-only token savers. It keeps the
agent concise, shrinks recurring memory files, blocks noisy logs from flooding
context, and adds planning guardrails for broad tasks.
The installed Claude Code command namespace is still `/governor:*`.
## Quick Start
```bash
bash install.sh --force
```
Restart Claude Code, then run:
```text
/governor:status
/governor:audit
/governor:compress CLAUDE.md
```
Governor auto-starts in compact professional mode when the plugin is loaded.
Use `/governor:off` to disable response compression and `/governor:on` to
re-enable it.
## V2 Highlights
- **VCLR benchmark harness:** fixture-based benchmarks now score valid-context
loss, decision preservation, and wrong-decision rate, not only token counts.
- **Structured tool filtering:** Governor preserves high-signal clues from noisy
MCP-style payloads such as Burp history and Playwright network dumps.
- **No-compress safety boundaries:** risky source reads and code-heavy tool
outputs stay intact instead of being compacted into something misleading.
- **Capture-ready Caveman comparisons:** the benchmark suite can now replay real
captured Caveman comparator outputs when Claude CLI auth is available, while
falling back cleanly to reference text when it is not.
- **Replayable Governor reference cases:** the last reference-style Governor
benchmark rows can now be refreshed into captured replay files instead of
staying hand-written forever.
## Why It Exists
Heavy Claude Code users do not only burn quota on long answers. The bigger
session killers are often:
- bloated always-loaded context such as `CLAUDE.md`, notes, and rules
- huge Bash/test/build output copied into conversation context
- vague prompts that trigger broad scans and repeated failed attempts
- scope drift during long coding tasks
- compactions caused by preventable context growth
Governor attacks those system problems while keeping the interaction
professional and readable.
## Early Results
These are directional pilot results, not universal claims.
Same machine, fresh Claude CLI Sonnet sessions, same multi-turn task, same
### FAQ
**Governor 是提示词还是插件?**
答:README 描述为 Claude Code 插件,并提供 /governor:* 指令命名空间。
**怎么安装?**
答:按 README:`bash install.sh --force`,重启 Claude Code 后使用 /governor 指令。
**解决什么问题?**
答:按 README:精简输出、上下文卫生、tool 输出过滤,减少会话配额消耗。
## 来源与感谢
> Source: https://github.com/0xhimanshu/governor
> License: MIT
> GitHub stars: 74 · forks: 1
---
Source: https://tokrepo.com/en/workflows/governor-for-claude-code-compact-output-hygiene
Author: Skill Factory