Install
openclaw skills install @return054/ai-code-verification-guardDeterministic code-verification guard for AI coding agents. Runs syntax, type, lint and test checks before and after code changes, and decides PASS / FAIL / REGRESSION / UNVERIFIED purely by script exit codes. The agent may only quote the verdict, never overrule it. Use when the user asks to modify code, implement features, fix bugs, or verify change reliability (trigger phrases - verify this, run the tests, regression check, confirm it works, 验证一下, 跑测试, 回归检查, 确认没问题). Not for general code review or security audits.
openclaw skills install @return054/ai-code-verification-guardThe arbiter is scripts/verify.mjs, shipped with this skill — <skill-path> below means this skill's install directory. The agent only invokes the script and quotes its verdict block verbatim; it has no authority to overrule the result.
Zero dependencies. Installs nothing. Reads the project, writes baselines only under <project>/.verification/.
BEFORE changing code (any change touching logic, interfaces, or tests), run in the project root:
node <skill-path>/scripts/verify.mjs snapshot
BEFORE reporting completion to the user, run in the project root:
node <skill-path>/scripts/verify.mjs run
and paste the emitted VERIFY VERDICT block verbatim in the reply.
| RESULT | Exit code | Disposal |
|---|---|---|
| PASS | 0 | May report completion; must attach the VERDICT |
| PASS_WITH_UNVERIFIED | 0 | May report completion; must quote every unverified item |
| FAIL | 1 | Forbidden to report completion; fix and rerun until PASS |
| REGRESSION | 1 | A baseline-passing check broke; forbidden to report completion; fix and rerun |
| UNVERIFIED | 2 | Forbidden to report completion; quote the blocking reasons and let the user decide |
package.json scripts classified by command content — lint, format-check, typecheck, composite check gates, tests. Build-ish scripts (build/compile/generate/bench) that emit files are never treated as type checks.--watch, --fix, --write, or bare vitest (which defaults to watch mode and hangs) are never executed as-is; bare-vitest test scripts are deterministically rewritten to a local vitest.mjs run invocation with the same semantics.go build/go vet/go test), Rust (cargo check/cargo test), Python (compileall/pytest) projects.node --check syntax checks plus node --test.run compares every check against the snapshot baseline and flags any pass-to-fail flip as REGRESSION..verification/ in the project root; suggest the user add it to .gitignore.run still executes every check — just without regression comparison. Never retroactively fabricate a baseline.裁决者是随本 skill 分发的 scripts/verify.mjs——下文的 <skill-path> 指本 skill 的安装目录。模型只负责调用脚本并把 VERDICT 块原样转述给用户,无权改判。
零依赖,不安装任何包,仅在项目 .verification/ 目录下写基线。
开始修改代码前(涉及逻辑、接口或测试的变更),在项目根目录执行:
node <skill-path>/scripts/verify.mjs snapshot
向用户报告完成之前,在项目根目录执行:
node <skill-path>/scripts/verify.mjs run
并把输出的 VERIFY VERDICT 块原样附在回复中。
| RESULT | 退出码 | 处置 |
|---|---|---|
| PASS | 0 | 可报告完成,必须附 VERDICT |
| PASS_WITH_UNVERIFIED | 0 | 可报告完成,必须逐项转述 unverified 条目 |
| FAIL | 1 | 禁止报告完成,修复后重跑至 PASS |
| REGRESSION | 1 | 基线通过项被改坏,禁止报告完成,修复后重跑 |
| UNVERIFIED | 2 | 禁止报告完成,如实转述阻塞原因,交用户决策 |
--watch、--fix、--write 的脚本绝不执行;裸 vitest(默认 watch 模式会挂死)被确定性改写为本地 vitest.mjs run 直调,语义不变仅关 watch。node --check 语法检查 + node --test。run 将每项检查与 snapshot 基线对比,任何"基线通过 -> 现在失败"都判 REGRESSION。.verification/,建议用户将其加入 .gitignore。