test-quality-guard
减少伪测试与“保障假象”的低价值测试
可能需要运行测试与访问代码,存在执行风险
检测并拒绝无意义、过度 Mock 或断言错误行为的测试用例。
自动识别并拒绝低价值或有害的测试用例:比如根本没断言、把被测单元本身 mock 掉,或者断言当前(可能有 bug 的)行为而非正确结果。适合在测试被生成或修改后作为质量把关,防止“假绿”或把 bug 固化进测试套件。只针对 TEST 代码质量,不用于生产代码审查。
▸ 展开 SKILL.md 英文原文
Kills fake, low-value, or bug-locking tests — tests that assert nothing meaningful, tests that mock the very unit under test, and tests that assert CURRENT (possibly buggy) behavior instead of correct behavior. Best used reactively after tests are written, generated, or changed. Use when the user says "add tests", "write unit tests", "increase coverage", "is this tested?", or after a coding agent produced or modified test code. DO NOT USE for production (non-test) code review (use clean-diff-guard) or for verifying a task is done (use evidence-before-done); this guard reviews TEST code quality specifically.
帮我安装这个 skill:https://raw.githubusercontent.com/mohamedzhioua/proofguard/main/deferred/test-quality-guard/skill/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/mohamedzhioua/proofguard/main/deferred/test-quality-guard/skill/SKILL.md"# test-quality-guard Passing tests are not proof of a good test. A test that asserts nothing, mocks the code it's supposed to check, or asserts today's buggy output will pass — and pass forever, even after the bug is "fixed" or the logic is deleted. Roughly half of AI-generated unit tests assert nothing meaningful, and Meta's TestGen-LLM study found only ~25% of generated tests actually increased real coverage. This guard exists to catch the other 50-75%. ## When to use — three modes - **Guard-pass (default).** Right after tests are written, generated, or edited — by you or by another agent turn — before presenting them as done. Review the diff of test files before moving on. - **Live