/skills-library:ai-generated-test-auditorfrom skills-library
Audits AI-generated test suites for three types of false confidence: tautological assertions that mirror implementation, missing boundary/error cases, and weak failure signals. Plans 2-5 sample mutations to verify tests actually catch bugs.
Ships in skills-library. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Use this skill when an AI has already proposed or written tests and you need to decide whether those tests are actually protecting behavior, or just producing a reassuring green checkmark.
This skill audits test quality, not product correctness. Its job is to find weak assertions, implementation mirroring, missing boundary/error cases, and evidence that the suite would stay green even after a meaningful bug.
Use it for:
Do not use this skill to:
ai-diff-review-protocol for that; it sends the tests inside the diff back here.If the user actually wants new tests written, a test-authoring skill should do that first. Come back to this skill once there is a candidate suite to inspect.
Ask for the smallest set that makes an audit meaningful:
If these are missing, say exactly what is missing. Do not pretend to certify tests you cannot inspect.
Before reading assertions, write down:
Prefer contract language such as:
For each test or cluster of similar tests, classify the oracle:
Anything in the last two categories is high-risk when AI wrote it.
Check whether the suite includes, skips, or hand-waves:
If a category is absent, name the missing risk explicitly.
Treat these as red flags:
Pick 2–5 small mutations that a decent suite should catch.
Prefer mutations like:
> to >= or < to <= at a threshold;For each mutation, record:
If you cannot run mutations in the current environment, still provide the plan and label runtime evidence as missing.
Run the plan only when all of these hold: you can execute the tests, the user has agreed, and every file can be restored exactly. Then:
git status --porcelain prints nothing) or a separate worktree or copy of the project. Never mutate files that have uncommitted changes you cannot restore.git checkout -- <file>, git restore <file>, or copy the saved original back) and confirm the tree is clean before the next mutation.killed (a named test turned red), survived (the suite stayed green) or not run, with the command you used.If any condition fails, deliver the plan only.
Use one of:
Use this structure:
A compact table with:
For each mutation:
Tag statements when useful:
given;observed in test code;inferred from implementation summary;should be verified by execution;missing evidence.This skill includes a dependency-free helper script:
scripts/check_test_audit_manifest.pyIt validates whether a planned audit packet is structurally complete enough to review consistently:
Allowed values, with the Step 2 and Step 3 wording the script also accepts:
| Field | Canonical value | Also accepted |
|---|---|---|
oracle | independent | independent oracle |
oracle | derived | derived oracle |
oracle | mirrored | mirrored logic |
oracle | weak-signal | weak signal |
kind (test case) | happy-path | happy path |
kind (test case) | boundary | boundary cases |
kind (test case) | error-path | error / invalid input cases |
kind (test case) | side-effect | stateful or side-effect cases |
kind (test case) | state-transition | state transition |
kind (test case) | regression | regression hooks |
A mutation's kind is free text (for example remove-validation, boundary-flip).
Example manifest shape:
{
"target": "Validate AI-generated tests for create_user",
"implementationFiles": ["src/user_service.py"],
"testCases": [
{
"id": "accepts_valid_name",
"kind": "happy-path",
"oracle": "independent",
"summary": "Creates a user when name and email are valid"
},
{
"id": "rejects_blank_name",
"kind": "error-path",
"oracle": "independent",
"summary": "Raises ValueError for blank name"
}
],
"mutationSamples": [
{
"id": "skip_blank_name_validation",
"targetFile": "src/user_service.py",
"kind": "remove-validation",
"expectedFailingTests": ["rejects_blank_name"],
"why": "A real guard should be observable through the public API"
}
]
}
Run it with any Python 3 environment:
python3 scripts/check_test_audit_manifest.py path/to/test-audit-manifest.json
python3 scripts/check_test_audit_manifest.py --selftest
Exit codes: 0 means the manifest is valid (warnings may remain), 1 means it has problems (missing fields, unknown values, a mutation naming a test that is not in the packet), 2 means the file cannot be read as JSON or the arguments are wrong.
Prefer these questions when deciding whether AI-generated tests are trustworthy:
sorted(input) as its expected value, that is often mirrored logic, not a strong oracle.200 and “response is not null”, it does not prove the payload contract.The skill has done its job when the user can say:
| 版本 | 日期 | 变更 | 类型 |
|---|---|---|---|
| 0.1.1 | 2026-09-26 | description 与 suggest_hint 不再承诺"验证测试真会变红",改成"规划 2–5 个突变抽样,能执行时再实跑",Step 5 补上实跑的安全步骤(干净工作区或副本、先征得同意、逐个突变、逐个恢复);脚本接受正文用语(mirrored logic、weak signal 等)并在正文列出枚举,改用 argparse(--help 不再被当成文件名),传入目录、非 UTF-8、坏 JSON 时报错退出 2,不认识的键给警告,补 --selftest;示例命令改为 python3;与 ai-diff-review-protocol 互相点名 | patch |
| 0.1.0 | 2026-09-05 | 初始版本 | minor |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub chromitecr/skills --plugin skills-library64 skills in this plugin
/activity-list-optimizer当学生说"Common App 活动栏写不下"、"这段活动描述超字数了"、"帮我把这几条压到限制内"时使用。先按官方申请表核对当季字符限额,再逐条检查;一次把所有条目量完并直接给出压缩版,只在需要砍掉实质内容时才用选择题问该保哪部分。每改一版都用工具重新数一遍字符,绝不凭感觉说"这样应该够了"。只压缩,不代写空白。/activity-profile-builder当学生说"我参加过一些活动但没整理过"、"帮我把经历录进去"、"我的活动档案是空的"时使用。让学生一口气把记得的活动说出来,直接把这段话拆成结构化的长期事项(角色、组织、起止时间、做了什么、结果、级别),说不清的字段留空标"待补"而不是编,再用一张选择题卡把级别判定与是否重复这类关键项一次问完,然后提案入库。只记录学生真正说出口的内容,级别按事实判定,绝不往高了写。/admissions-reader当学生问"招生官会怎么看我的档案"、"我的背景还差什么"、"帮我评估一下现在的申请竞争力"时使用。以顶尖大学招生官的视角通读学生的档案、长期活动与已写下的反思,不问任何前置问题直接产出一份指名道姓的坦诚点评:这份材料的亮点、招生官真实的解读方式、明显的短板与空白、以及接下来最值得做的一到两件事。只读不写,不修改学生的任何数据,也不代写任何申请材料。