Prompts2026年5月13日·1 分钟阅读

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.

Agent 就绪

这个资产可以被 Agent 直接读取和安装

TokRepo 同时提供通用 CLI 命令、安装契约、metadata JSON、按适配器生成的安装计划和原始内容链接,方便 Agent 判断适配度、风险和下一步动作。

Needs Confirmation · 64/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Prompt
安装
Single
信任
信任等级:Established
入口
Asset
通用 CLI 安装命令
npx tokrepo install 2138b037-73ba-54de-b213-c8d074476680

简介

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 icon

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:*.

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

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产