lake-gate
What it does
Plan review for coding agents: request review, wait for a version-bound approval, revise.
- Connects 在你的电脑上运行
- Account or key No key needed
- Category 开发者工具
可搭配使用
教 AI 做这类工作的 Skill,可与本项一起使用
graphify
Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.
archify
Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.
为什么排在这里
列表按使用分(满分 100)排序,由以下部分组成
| 热度 | 0/80 | GitHub 星标或每周下载量:较大的计 60,较小的计 20 |
|---|---|---|
| 新鲜度 | 12/12 | 30 天内有发布或代码更新得满分 |
| 仍在响应 | 0/8 | 上次检查时云端端点有响应 |
| 使用分 | 12/100 |
质量: 基础检查通过 3/3 项(仅展示,不用于排序) · 上升势头: 暂无数据 (只用于“上升中”标签)
安装
选择你使用的 AI 应用,然后复制设置。
通过 3/3 项检查 · 在你的电脑上运行 · ✓ 命令已检查 2026年11月16日
第一步:你用哪个 AI?
选择你用的应用,步骤会显示在下方。
可连接 Claude,但需要先准备
需要先在电脑上安装 Node.js(只需一次) · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用
让 AI 帮你安装
把这段话复制到 Claude 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。
请在这台电脑上为 Claude 安装 MCP server lake-gate,按顺序:1) 用 node -v 检查是否有 Node.js。没有的话,请让我从 https://nodejs.org/en/download 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "mcpServers": { "lake-gate": { "command": "npx", "args": [ "-y", "lake-gate", "mcp" ] } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 lake-gate 的工具真的出现了。这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。
安装 Node.js(如果还没有)
已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter
node -v- 显示版本号(例如 v26.13.1)= 已安装,可跳过这一步
- 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
怎么打开终端
Mac:按 ⌘ + Space,输入 Terminal 后按 Enter
Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”
还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令
装好后关掉终端再打开,重新运行同一条命令,应显示版本号:
node -v安装一次,所有需要 Node.js 的工具都能用
打开电脑版 Claude 应用的设置文件
SettingsDeveloperEdit Config
粘贴这些设置并保存文件
{ "mcpServers": { "lake-gate": { "command": "npx", "args": [ "-y", "lake-gate", "mcp" ] } } }退出 Claude 再重新打开
试一试
用 lake-gate 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Claude 说正在使用 lake-gate,或回答中出现 lake-gate 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同
ChatGPT 暂时无法连接 lake-gate
lake-gate 需要安装在你的电脑上,而 ChatGPT 只能连接在网上运行的服务器
你可以改用这些方式
A · 使用能连接 lake-gate 的应用
- 需要先在电脑上安装 Node.js(只需一次) · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用
- 需要先在电脑上安装 Node.js(只需一次)
- 需要先在电脑上安装 Node.js(只需一次)
- 需要先在电脑上安装 Node.js(只需一次)
B · 开发者工具 类中能连接 ChatGPT 的其他服务器
从同类中使用较多的里挑选,仅限用地址即可连接、无需密钥的
- Sentry✓ ChatGPT
- Compiler Explorer✓ ChatGPT
- GitDiagram✓ ChatGPT
可连接 Claude Code,但需要先准备
需要先在电脑上安装 Node.js(只需一次)
让 AI 帮你安装
把这段话复制到 Claude Code 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。
请在这台电脑上为 Claude Code 安装 MCP server lake-gate,按顺序:1) 用 node -v 检查是否有 Node.js。没有的话,请让我从 https://nodejs.org/en/download 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):claude mcp add --scope user lake-gate -- npx -y lake-gate mcp 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 lake-gate 的工具真的出现了。这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。
安装 Node.js(如果还没有)
已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter
node -v- 显示版本号(例如 v26.13.1)= 已安装,可跳过这一步
- 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
怎么打开终端
Mac:按 ⌘ + Space,输入 Terminal 后按 Enter
Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”
还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令
装好后关掉终端再打开,重新运行同一条命令,应显示版本号:
node -v安装一次,所有需要 Node.js 的工具都能用
打开终端
Mac:按 Command+空格,输入 Terminal · Windows:打开 PowerShell
粘贴这条命令并按 Enter
claude mcp add --scope user lake-gate -- npx -y lake-gate mcp在 Claude Code 中输入 /mcp
应能看到 lake-gate 在列表中并显示已连接
试一试
用 lake-gate 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Claude Code 说正在使用 lake-gate,或回答中出现 lake-gate 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同
可连接 Cursor,但需要先准备
需要先在电脑上安装 Node.js(只需一次)
让 AI 帮你安装
把这段话复制到 Cursor 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。
请在这台电脑上为 Cursor 安装 MCP server lake-gate,按顺序:1) 用 node -v 检查是否有 Node.js。没有的话,请让我从 https://nodejs.org/en/download 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "mcpServers": { "lake-gate": { "command": "npx", "args": [ "-y", "lake-gate", "mcp" ] } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 lake-gate 的工具真的出现了。这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。
安装 Node.js(如果还没有)
已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter
node -v- 显示版本号(例如 v26.13.1)= 已安装,可跳过这一步
- 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
怎么打开终端
Mac:按 ⌘ + Space,输入 Terminal 后按 Enter
Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”
还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令
装好后关掉终端再打开,重新运行同一条命令,应显示版本号:
node -v安装一次,所有需要 Node.js 的工具都能用
在 Cursor 中以 Agent 模式打开 AI 聊天
试一试
用 lake-gate 告诉我你能帮我做什么,然后做一件给我看✓ 如果 Cursor 说正在使用 lake-gate,或回答中出现 lake-gate 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 Cursor 帮助页面核实 · 你的界面可能因版本略有不同
可连接 VS Code,但需要先准备
需要先在电脑上安装 Node.js(只需一次)
让 AI 帮你安装
把这段话复制到 VS Code 的对话里。AI 会先检查电脑,告诉你要改哪个文件,并且每次都等你同意。
请在这台电脑上为 VS Code 安装 MCP server lake-gate,按顺序:1) 用 node -v 检查是否有 Node.js。没有的话,请让我从 https://nodejs.org/en/download 安装,不要自己安装。2) 只使用这份配置(已通过 PopNx MCP 检查):{ "servers": { "lake-gate": { "type": "stdio", "command": "npx", "args": [ "-y", "lake-gate", "mcp" ] } } } 3) 告诉我要修改的文件完整路径或要运行的命令,等我同意。4) 不需要密钥。5) 按约定执行,然后确认 lake-gate 的工具真的出现了。这段话不包含你的密钥。如果需要密钥,AI 会请你自己粘贴到文件或应用的输入框里。
安装 Node.js(如果还没有)
已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter
node -v- 显示版本号(例如 v26.13.1)= 已安装,可跳过这一步
- 显示 "command not found"(Windows 显示 "is not recognized")= 还没安装,或刚装好但需要关掉终端再重新打开
怎么打开终端
Mac:按 ⌘ + Space,输入 Terminal 后按 Enter
Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”
还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令
装好后关掉终端再打开,重新运行同一条命令,应显示版本号:
node -v安装一次,所有需要 Node.js 的工具都能用
在 VS Code 中以 Agent 模式打开 AI 聊天
试一试
用 lake-gate 告诉我你能帮我做什么,然后做一件给我看✓ 如果 VS Code 说正在使用 lake-gate,或回答中出现 lake-gate 的工具名称,就表示连接成功
菜单名称已于 2026年11月11日 对照 VS Code 帮助页面核实 · 你的界面可能因版本略有不同
开发者专用:终端命令和 JSON 设置
安装在电脑上
Claude Code
claude mcp add --scope user lake-gate -- npx -y lake-gate mcpClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"lake-gate": {
"command": "npx",
"args": [
"-y",
"lake-gate",
"mcp"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"lake-gate": {
"command": "npx",
"args": [
"-y",
"lake-gate",
"mcp"
]
}
}
}VS Code (mcp.json)
{
"servers": {
"lake-gate": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"lake-gate",
"mcp"
]
}
}
}这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
一览
哪些应用可以使用它
依据这个服务器的连接方式和各应用自己的文档,检查于 2026年11月10日。
在你的电脑上运行,适用于
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
它能做什么
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
基础检查i
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月16日
- ✓ 通过
作者与仓库一致
注册名称已通过 GitHub 账户 getlake 验证,该账户拥有此仓库
- ✓ 通过
仍在维护
代码最后更新于今天
- ✓ 通过
有许可证
使用 MIT
- – 不适用
端点有响应
它在你的电脑上运行,没有互联网端点
- – 不适用
使用 OAuth 登录
在你的电脑上运行,改用本地设置
- … 尚未检查
工具描述中没有隐藏指令
它在你的电脑上运行;我们只能读取互联网端点的工具列表
已公开的漏洞(OSV.dev)
尚未检查
作者:申请重新检查或报告信息错误
给作者:在 README 中加徽章
如果你是作者,可把这段代码贴到 README。徽章会链接回本页。
[](https://mcp.popnx.com/en/servers/getlake-lake-gate)讨论
提问、分享技巧或报告无法使用。按“有帮助”数量排序。
用户评价
还没有评价
与“开发者工具”中的其他服务器比较i
- 星标数多于此分类中其他 5964 个服务器的 0%
- 发布到注册中心的时间比此分类中其他 5964 个服务器的 99% 更新
- 基础检查结果等于或优于此分类中其他 5964 个服务器的 100%
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
常见问题
lake-gate 安全吗?
它在 3 项适用的基础检查中通过了 3 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
它需要哪些密钥或代码?
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在我的电脑上运行还是在云端?
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
它还在维护吗?
GitHub 仓库最后更新于今天,最新版本(0.2.3)于今天进入注册中心。
哪些应用可以使用它?
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。
有什么可以替代它?
同一分类中有:GitDiagram, Appllama, Cloudflare MCP, Omnara, Repowise
功能相近的其他选择
同一分类、其他作者、命令已通过检查。官方的排在前面,再按星标排序。
如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
GitDiagram
Architecture diagrams, explanations and Mermaid source for public GitHub repositories.
Appllama
Study screens, flows and paywalls from top-earning iOS apps, then build from what wins.
Omnara
Deploy durable AI agents with Omnara, an open-source managed-agent platform.
Repowise
Codebase intelligence for AI coding agents: graph, git history, docs, decisions, code health.
| 本项 lake-gate | GitDiagram | Appllama | Cloudflare MCP | Omnara | Repowise | |
|---|---|---|---|---|---|---|
| 运行位置 | 需要安装在电脑上 | 在云端运行,无需安装 | 在云端运行,无需安装 | 在云端运行,无需安装 | 在云端运行,无需安装 | 云端或安装在电脑上都可以 |
| 需要密钥 | 否 | 否 | 否 | 否 | 否 | 否 |
| 可在 Claude 中按 + 添加 | 否 | 否 | 否 | 是 | 否 | 否 |
| 基础检查 | 3/3 | 4/4 | 4/4 | 4/4 | 4/4 | 5/5 |
| 许可证 | MIT | MIT | MIT | Apache-2.0 | Apache-2.0 | AGPL-3.0 |
| 价格 | 登记中未列出费用 | 登记中未列出费用 | 登记中未列出费用 | 登记中未列出费用 | 登记中未列出费用 | 登记中未列出费用 |
作者的 README
打开 README
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
lake-gate
Your agent writes the plan. A teammate approves that exact version. Then the agent builds.
lake-gate is a small, free, open-source plan gate for teams using Claude Code and Cursor (other agents work through the CLI). It runs in your repo and on GitHub. There is no Lake server, no account and no telemetry.
- Plan export. When Claude Code leaves plan mode, the plan is saved to
.lake/plans/ .mdwith a complexity rating, a recommended model per step and a cost range. - Version-bound approval. A teammate approves on the PR with
/lake approve @. Edit one word of the plan and the approval no longer applies. - Local gate. A Claude Code
PreToolUsehook denies file edits and non-read-only shell commands until the active plan's current version is approved. Reading and exploring stay free. - PR check. A GitHub Action sets the
lake/plan-approvalstatus. Make it required and unapproved plans can't merge. - Review app. Rendered plans, comments on exact lines, review rounds per plan version with a diff between them, verdicts and an activity timeline. Approve or request changes in one click. Run it locally with
npx lake-gate ui, or use the hosted static app (it talks to the GitHub API straight from your browser). Live demo with a made-up team. - Approve from where you already are. The Lake review app, GitHub's own Approve button, or your agent chat (MCP server for Claude Code and Cursor). They all write to the same place, the PR, so there is one source of truth.
- Model and cost per step. Every plan shows which model runs each step and what that costs, with the same estimator and price table as lake-meter. Declare the model in the plan (
Model: Opus 5.5, or(model: haiku)on a step). Reviewers suggest a cheaper model, a dropped step or a cap, and the author accepts it in one click, which saves a new plan version. - Budget approval (optional). Above
budget.approverAbovedollars, one ofbudget.approvers(GitHub logins) must also approve that exact version. It shows in the app, the PR check and the MCP tools. - Small plans pass on their own. Tiny, low-complexity plans with a small diff (150 changed lines by default) are auto-approved, and quick fixes without a plan aren't gated at all. Once any version of a plan needed a human, shrinking it doesn't earn an auto pass, and the agent can't edit files in
.lake/directly. SetautoApprove.modetoshadoworoffto be stricter.
Install (about 10 minutes)
cd your-repo
npx lake-gate init # writes .lake/, the Claude Code hook, the GitHub workflow, and MCP config for Claude Code + Cursor npm i -D lake-gate # optional for JS repos: faster hook than npx git add .lake .claude .github .mcp.json .cursor && git commit -m "Add lake-gate" && git push npx lake-gate ui # the review app on localhost
Trying it alone first? npx lake-gate init --try sets up a local-only trial where you can approve your own plans with npx lake-gate approve. Nothing is posted anywhere.
Then in GitHub: Settings → Branches → branch protection → Require status checks → `lake/plan-approval` (the check appears after the first PR runs).
Requirements: Node 18.17+, git, a GitHub repo. macOS/Linux shells for the hook (Windows: use WSL for now).
PRs opened by an agent or bot with the workflow's `GITHUB_TOKEN` don't trigger other workflows, and GitHub may hold the Lake run as "Approval required" until a maintainer approves it, so lake/plan-approval doesn't appear. Open agent PRs with a personal token or a GitHub App token, or push one commit as a human.
The flow
- Plan. In Claude Code, use plan mode as usual. When the plan is accepted, the hook saves it to
.lake/plans/add-webhook-retries.mdand tells you its version and estimate. In Cursor, ask the agent to calllake_request_review. Any other agent: save the plan as markdown and runnpx lake-gate plan plan.md. - Open a PR with the plan first (a draft PR is fine). The Action posts one summary comment with the exact approve line.
- A teammate approves with a PR comment or review:
/lake approve add-webhook-retries@86eab4d0. The PR author and bots can't approve. Read-only users can't approve. - Sync and build.
npx lake-gate syncpulls approvals into your local checkout (usesGITHUB_TOKENorgh auth token). The agent can now edit. The code lands in the same PR and the check is green. - Plan changes? Edit the plan file. The version changes, the gate closes again and the PR check turns red until someone approves the new version.
Commands on the PR, one per line:
| Comment | Effect |
|---|---|
/lake approve @ | Approve this exact version |
/lake reject @ | Request changes. Blocks until the same person approves |
/lake revoke | Withdraw your approval |
Reviewing: the app, GitHub, and your agent
Everything is stored on the PR as normal comments and reviews. There's no database and nothing new to host. The review app, the Action, lake-gate sync and the MCP server all read the same comments.
Review app. npx lake-gate ui opens http://127.0.0.1:4848. It uses your gh login (or GITHUB_TOKEN) through a small local proxy: the token never reaches the page, the proxy only talks to this repo, and it only writes PR comments. It also shows plans you haven't pushed yet, as drafts, with their local history. The hosted copy at getlake.github.io/lake-gate/app/ is the same static app. It asks for a fine-grained token (Pull requests: read & write, Contents: read) and keeps it in your browser.
- Select text in a plan, or click a line, to comment on it (
c). Threads reply and resolve. - Each pushed version of the plan is a round. Comments stay attached to the round they were made on, and move forward to the current text when the quoted line still exists.
- Changes shows the diff between any two rounds. Activity is the timeline: who commented, approved or requested changes, on which version, and from where.
aapprove,rrequest changes,j/knext/previous thread,?for all shortcuts.
GitHub. Two ways, both counted by the same policy:
- GitHub's native review. Approve or Request changes on the PR with GitHub's own buttons. It counts for the plan version at the reviewed commit (turn it off with
nativeReviews: false). Line comments on the plan file show up as threads in the app. - Buttons in the summary comment. *Approve*, *Request changes* and *Open review* open the review app on the right plan with the approve sheet ready (
reviewUrl, default: the hosted app).
The typed /lake approve @ line still works everywhere.
Your agent (MCP). init registers npx -y lake-gate@0 mcp in .mcp.json (Claude Code) and .cursor/mcp.json (Cursor). Tools:
| Tool | What it does |
|---|---|
lake_request_review | Save the plan (with model and cost), optionally commit and push only the plan file, and return the review link |
lake_review_status | Status, verdicts, open threads with line numbers, reviewer suggestions, budget approval, and the model/cost view with Lake's suggestions. Works before a PR exists. wait_seconds (up to 240) waits for new feedback |
lake_submit_revision | Save a revised plan and resolve the threads it addresses (in Lake; GitHub's own review threads stay open until someone resolves them there). Or apply a suggestion in one step: thread_id, suggestion_id or model |
lake_review | For reviewers: approve, request_changes, comment (on lines), reply, or suggest a cheaper model or a cap. Approvals need the exact version and say "via Claude Code (MCP)" |
The PR author can't approve their own plan from any surface. An approval from an agent chat is posted under the human's GitHub account, so only use it when that person asked for it.
How it's stored. Comments from the app and the MCP server are PR comments with a small hidden marker, for example . Verdicts are the usual /lake approve|reject lines, so older versions of lake-gate and humans read them the same way.
What the estimate looks like
Planned model Opus 5.5: $2.53–$9.69 · Lake mix (cheapest model that fits each step): $2.31–$8.93
| # | Step | Complexity | Planned | Recommended | Est. cost | | 1 | Bounded retry queue with backoff | medium | Opus 5.5 | Sonnet 5.5 | $0.38–$1.28 | | 2 | Database migration: retry_count column | high | Opus 5.5 | Opus 5.5 | $2.10–$8.22 | | 3 | Fix typo in README | low | Opus 5.5 | Haiku 5.5 | $0.046–$0.18|
It's a rough heuristic, the same one lake-meter uses: complexity from keywords, token bands per level, public API list prices. It isn't a quote. On a subscription plan you spend quota, not these dollars. Override prices with catalog in .lake/config.json.
CLI
lake-gate init [--try] [--force] set up the repo (--try: local-only trial, self-approval allowed)
lake-gate approve [id] approve your own plan (trial mode only) lake-gate uninstall remove the hook, MCP entries and workflow (keeps .lake/) lake-gate plan [--id name] save a plan with an estimate and make it active lake-gate estimate print the estimate only lake-gate status plans, versions, approval state lake-gate sync [--pr N] pull approvals from the PR lake-gate check [--plan id] exit 0 only if the active plan's current version is approved lake-gate use switch the active plan (the hook blocks agents from doing this) lake-gate ui [--port 4848] [--no-open] the review app on localhost lake-gate mcp MCP server (stdio) for Claude Code / Cursor lake-gate hook claude the Claude Code PreToolUse hook (stdin JSON)
check is the pre-run gate for anything that isn't Claude Code, e.g. npx lake-gate check && codex exec "implement .lake/plans/x.md".
Configuration: .lake/config.json
| Key | Default | Meaning |
|---|---|---|
requiredApprovals | 1 | Distinct non-author approvals needed |
allowedAssociations | OWNER, MEMBER, COLLABORATOR | Who may approve |
ignoreLogins | [] | Logins that never count (e.g. a shared agent account) |
requirePlan | "warn" | PR changes code without a plan: off, warn, fail |
localGate | "block" | Hook behaviour: block (deny), ask (Claude Code prompts you), off |
readOnlyBash | git status/log/diff, ls, cat, rg... | Bash commands allowed before approval (regexes; chained commands are not) |
autoApprove | {mode:"on", maxUsd:1.5, maxSteps:3, maxComplexity:"low", maxCodeLines:150} | Tiny plans with a small diff pass without a human. off, shadow (only report), or on |
budget | {approverAbove:null, approvers:[]} | Above this many dollars (upper estimate of the planned model), one of approvers must also approve. Use GitHub logins, e.g. ["alice","bob"]. @org/team needs a token with read:org, which the default Action token doesn't have. When a team can't be read, the summary says so and repo admins can approve instead |
gateWithoutPlan | false | true blocks edits even when there's no plan |
provider, catalog | anthropic, lake-meter prices | Same shape as lake-meter's price catalog |
nativeReviews | true | GitHub's own Approve / Request changes count for the plan version at the reviewed commit |
reviewUrl | hosted review app | Where the summary comment's buttons point. "" hides them |
The PR check reads the config from the **current head of the base