
Readfirst
io.github.jeonghun917由 GitHub 账号 jeonghun917 发布v0.22.3更新于 Nov 7, 2026
What to read and check before changing a file: project rules, risks, checks and tests per file.
概览
本地 MCP 服务器,在编码助手修改某个文件之前,提供与该文件相关的项目规则、风险、检查项和测试。
- 可以做什么
- 在改动前读取单个文件的上下文:规则、风险、检查项、测试和调用方
- 扫描代码库中固定的缺陷形态,例如被丢弃的结果或未 await 的 promise 断言
- 在收尾前校验检查是否通过、与改动相关的映射内容是否遗漏
- 初始化首份映射,并把各类助手和 PR 动作接入其中
- 适用场景
- 适合 AI 编码助手修改已有代码仓库时使用,需要补足仅靠 import 无法得知的团队知识,例如金额单位约定、需保留的旧字段,或改动后应运行的测试。
- 运行要求
- 以本地进程方式通过 npm(npx readfirst)运行,需要 Node 20 或更高版本,支持任意语言。它读取本地 git 检出目录和仓库中提交的 .readfirst/map.json 文件。无需服务器、账号或模型调用。
安装
在 SourceWeft 中
- 打开 控制台中的 Readfirst,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
readfirst
What to read and check before you — or your AI agent — change a file.
Bugs it found that are now fixed upstream: Saleor, Wagtail, n8n, django-allauth. 120 real findings across 44 open-source repositories, reported to 17 projects.
Coding agents can follow imports. What they don't know is what your team knows: "amounts here are in cents", "this table is read by the mobile app, keep old columns", "run the payment e2e after touching this". readfirst keeps that knowledge in one file next to the code and hands it out, file by file, at the moment someone is about to change something.
No server, no account, no model calls. MIT. It reads your git checkout and .readfirst/map.json.
What it caught
On the free side, readfirst shows where your code broke before, from git history, on the first run, no map needed.
The hosted version scans for fixed bug shapes taken from real bugs: a result computed and thrown away, a range check
with no type check, a secret compared with !==, and more. Run over 44 open-source repositories, 616 hits, each one
judged and recorded (real, caveat, false positive, dead code):
- 84 bugs in app code, 21 of them low-severity secret comparisons
- 36 tests that can never fail, every one the same shape:
expect(promise).resolves...with noawaitorreturn, so the test ends before the assertion runs - the false positives are kept on record too; the counts come after tuning on the same repositories, so read them as "what is there", not as precision
Fixed upstream:
- saleor: an "only recalculate what changed" option recalculated every discounted price (saleor/saleor#19984).
- wagtail: a superuser who submits a page for moderation got the moderation email about their own submission (wagtail/wagtail#14790).
- n8n: the RabbitMQ node handed back its channel before the queue bindings were made, and a failed bind escaped as an unhandled rejection; the n8n team fixed it after our issue (n8n-io/n8n#43033).
- django-allauth: a provider callback returned a 500 instead of a clean failure on a non-ASCII value; fixed the day it was reported (f1e06cc).
- mealie: a household safety filter that never applied (mealie#8964) is gone on main since a maintainer's scope fix (mealie#8965).
Still with their maintainers: a Tandoor filter that never applied (TandoorRecipes/recipes#4917), and findings sent privately to other projects, which stay unnamed until they are fixed.
Start
Any language; needs Node 20+.
Commit .readfirst/map.json. Filled maps for real repositories (vercel/ai, cal.com, excalidraw and two more):
examples/.
Everything else (Claude Code plugin and hook, MCP for any agent, Cursor rules, the GitHub Action, the map format,
audit, find, monorepos, pinning a version): the guide.
Hosted
The CLI, hook, MCP server and Action are free and never send your code anywhere. The readfirst-app GitHub App can write the first map for you (free once per account) and, on Pro, keep it in step after merges and comment on pull requests. Details in the guide.
License
MIT
来源:README.md,提交 73c0962
工具
0版本历史
9- v0.22.3最新Nov 7, 2026
- v0.17.1Nov 6, 2026
- v0.16.0Nov 5, 2026
- v0.15.1Nov 5, 2026
- v0.15.0Nov 4, 2026
- v0.14.0Nov 4, 2026
- v0.13.0Nov 3, 2026
- v0.7.0Nov 1, 2026
- v0.6.2Nov 1, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分