欣淇
发布于 2026-05-19 / 0 阅读
0
0

🩹 Clawpatch:OpenClaw 出品 4 天狂揽 542 Stars 的 AI 代码审查机器人,一条命令自动 Review + 修 Bug + 开 PR

🩹 Clawpatch:OpenClaw 出品 4 天狂揽 542 Stars 的 AI 代码审查机器人,一条命令自动 Review + 修 Bug + 开 PR

Clawpatch — 542 stars in 4 days. OpenClaw 官方推出的自动化代码审查工具,把仓库切成语义切片,逐块 Review,还能自动定位 + 修 Bug + 开 PR。目前已经能看懂 Node/Go/Rust/Python/Java/Elixir/C#…未来还会更多。装完 pnpm add -g clawpatch 就能用。

它能做什么?

CLI 模式下跑一套完整流程:

clawpatch init          # 初始化项目
clawpatch map           # 把代码库切成特征切片
clawpatch review        # 逐块审查,找到问题
clawpatch fix --finding <id>    # 针对某个发现执行修补
clawpatch open-pr --patch <id>  # 提交修补并开 PR

一条命令跑 CI 流水线:

clawpatch ci --since origin/main --output clawpatch-report.md

为什么不是 Lint?

Clawpatch 不是语法检查,是语义审查。 它会理解你的代码结构——npm 包入口、Next.js 路由、Go 包依赖、Rust crate 边界、Django View 分层——然后按这些真实边界逐片 Review,而不是随机扫一遍。

支持多种 Provider:Codex / Claude / Pi / Gemini / Grok / OpenCode,默认用本地 Codex CLI。

安全设计

  • Review 只读,不动文件
  • Fix 必须显式指定 finding ID,不会自动 push
  • 脏工作树默认拒绝执行修补
  • Provider 输出通过严格 JSON Schema 解析

状态文件全在项目 .clawpatch/ 目录下,可审计可追溯。

已覆盖的语言/框架

npm → Node → Next.js → Go → Rust → Python (Flask/FastAPI/Django) → Java/Kotlin → C# → Ruby → Elixir → C/C++ → Swift → Laravel/PHP

OpenClaw 自家产品,品质有保障。默认走本地 Codex,所有代码不出你机器。


🩹 Clawpatch: OpenClaw's 4-Day-Old AI Code Review Bot (542★) — Auto-Review, Auto-Fix, Auto-PR

Clawpatch maps your repo into semantic feature slices, reviews each slice with an LLM provider, persists findings, and runs explicit fix loops per finding.

One-command CI pipeline:

clawpatch ci --since origin/main --output clawpatch-report.md

Semantic mapping covers npm → Node → Next.js → Go → Rust → Python → Java/Kotlin → C# → Ruby → Elixir → C/C++ → Swift → Laravel/PHP — with more frameworks coming.

Safety-first: review is read-only, fix requires explicit finding ID, no auto-push. State lives in .clawpatch/ — fully auditable.

pnpm add -g clawpatch
clawpatch doctor    # check provider (default: local Codex CLI)
clawpatch init
clawpatch map
clawpatch review --limit 3 --jobs 3

From the OpenClaw team that brought you the 370K★ personal AI assistant. Local-first, provider-agnostic, works offline.


评论