一键导入
tests-with-teeth
Use when writing or reviewing any test, or when about to accept "tests pass" as evidence.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when writing or reviewing any test, or when about to accept "tests pass" as evidence.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when about to show any prose a human will read - docs, README, commit bodies, UI copy, store text.
Use when building any mechanic that could fail on a machine out of reach - a shipped product, a CLI a user runs, a server.
Use when doing any work in a project that has the instincts plugin installed
Use when touching build scripts, release or packaging steps, publish flows, or CI config.
Use when about to build something someone proposed, especially when the proposer sounds confident and the idea sounds obviously fine.
Use when adding any cross-cutting change - a new gate, limit, permission check, or rule that must apply everywhere.
| name | tests-with-teeth |
| description | Use when writing or reviewing any test, or when about to accept "tests pass" as evidence. |
A test exists to fail when the thing it covers breaks. If you could delete the feature and the test stays green, it protects nothing. It's worse than no test, because it looks like coverage. Before accepting any test, run it through five questions.
This sharpens superpowers' test-driven-development: TDD's red step proves a brand-new test can fail; these questions hold for any test, including ones you didn't write.
Writing a new test, reviewing a test in a diff, inheriting a suite, or about to treat a green run as proof that something works.
You're testing a discount function. The test: applyDiscount(cart) returns a number >= 0. It passes. It's hollow. It passes whether the discount is 10%, 0%, or the function just returns the original total. Now make it distinguish: a $100 cart with a 10% code should return exactly $90. Delete the discount math and it returns $100, and the test fails. That version has teeth.
| Test smell | Why it's hollow |
|---|---|
| Asserts "does not crash" | Not crashing isn't correctness. |
| Asserts a value >= 0 / not null | Passes for almost any implementation. |
| Setup uses an input that triggers an early return | The assertion is never reached. |
| Same value passed for two different inputs | Can't tell which one the code used. |
| Only an end-to-end path, novel logic never tested alone | A compensating bug can hide. |
| Thought | Reality |
|---|---|
| "It asserts something, so it's coverage" | Coverage that can't fail is decoration. |
| "The suite is green, ship it" | Green only means these questions were never asked. |