Skip to main content
Glama

为什么需要 KeepFix?

让 Agent 重构代码、开发新功能时,它只看局部上下文,极易把几周前专门修线上边缘故障的几行防御代码(Safari 日期兼容、浮点舍入、弱网重连防抖、并发锁顺序)当成“冗余逻辑”顺手删掉,老 Bug 于是反复复活。

KeepFix 为关键历史修复建立护栏,记在 .keepfix/seals.jsonl 里,不往源码里加任何注释:

  • 自动采集:修完 Bug 由 Agent 结印;老项目一键扫描 Git 历史,挖出存活至今的关键 fix 提交作为候选。

  • 事前预防:Agent 准备修改含护栏的文件时,注入一句不到 60 token 的提醒。

  • 事后核对:按 git diff 毫秒级核对。行号平移、Prettier/Black/rustfmt/gofmt 格式化、文件重命名都不报警;防御代码被删就当场报出原故障背景、缺失的代码和对应 diff。

  • 等价重构:Agent 用 rebind 说明理由并换新指纹,由你在面板里确认或驳回。

支持 TypeScript/JavaScript、Python、Rust、Go、C/C++,其他文本文件(Shell、SQL、YAML)按通用规则核对。

Related MCP server: FlowCheck MCP Server

安装

宿主

方式

Claude Code(完整:钩子 + MCP + 面板)

npx -y keepfix-mcp@latest install --claude

Claude Code(仅技能)

插件市场添加本仓库:/plugin marketplace add zhiyuanvision-lang/KeepFix

Cursor

npx -y keepfix-mcp@latest install --cursor,或在 Open VSX 安装扩展

VS Code

扩展市场搜索 KeepFix

Antigravity

下载 Release 里的 keepfix-antigravity-<版本>.zip,解压后运行 node install.mjs

DeepSeek Harness

插件 dsh-keepfix

任意 MCP 客户端

npx -y keepfix-mcp@latest mcp

Git pre-commit

npx -y keepfix-mcp@latest install --git-hook

诚实边界

  • 护栏核对的是“关键防御代码还在不在”,不运行测试,也不证明逻辑正确。

  • 护栏片段如果只出现在字符串或文档字符串里,目前也会被当成仍然存在;同一文件里别处有一模一样的代码时,删掉其中一处也可能不报。我们在回归语料里跟踪这些情况。

  • 100% 在本机运行,不上传源码。

7 天免费试用,之后 KeepFix Pro 一次买断 ¥29.9 / $15,不限设备数。


Why KeepFix?

Coding agents only see local context. Weeks after you fixed a Safari date bug, a float rounding error or a lock-order race, an agent "simplifies" those odd-looking lines away and the old bug is back.

KeepFix pins those fixes in .keepfix/seals.jsonl (nothing is added to your source):

  • Capture: the agent seals a fix right after making it; on an existing project, scan Git history for surviving fix: commits.

  • Prevent: before editing a guarded file the agent gets a one-line reminder (< 60 tokens).

  • Check: every git diff is checked against the guards. Line shifts, Prettier/Black/rustfmt/gofmt and renames are not alarms; a deleted guard is reported with the original reason, the missing code and the diff.

  • Equivalent rewrites: the agent rebinds a guard with a reason, you confirm or reject it in the panel.

Languages: TypeScript/JavaScript, Python, Rust, Go, C/C++; other text files (shell, SQL, YAML) with generic rules.

Install

Host

How

Claude Code (hooks + MCP + panel)

npx -y keepfix-mcp@latest install --claude

Claude Code (skill only)

/plugin marketplace add zhiyuanvision-lang/KeepFix

Cursor

npx -y keepfix-mcp@latest install --cursor, or the extension on Open VSX

VS Code

Search KeepFix in the Marketplace

Antigravity

Unzip keepfix-antigravity-<version>.zip from the Release and run node install.mjs

DeepSeek Harness

Plugin dsh-keepfix

Any MCP client

npx -y keepfix-mcp@latest mcp

Git pre-commit

npx -y keepfix-mcp@latest install --git-hook

Honest limits

  • KeepFix checks that the load-bearing code is still there. It does not run your tests or prove the logic correct.

  • A guard snippet that survives only inside a string or docstring still counts as present, and an identical line elsewhere in the same file can hide a deletion. These cases are tracked in the regression corpus.

  • Runs 100% locally; no source code is uploaded.

7-day free trial, then KeepFix Pro: one-time ¥29.9 / $15, any number of devices.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Stops your AI from re-introducing bugs, leaking provider keys, or weakening tests. Bug fixes become permanent regression guards; blocked mistakes become AI lessons the agent reads and learns from before its next edit.
      6
      2
      Apache 2.0
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI coding agents to avoid irreversible mistakes by intercepting risky deletions, overwrites, and commands before execution, applying path, pattern, and blast-radius safeguards with quarantine backups.
      3
      MIT