一键导入
mutation-test
Introduce an intentional bug in source code to verify a test catches it, then revert the bug.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Introduce an intentional bug in source code to verify a test catches it, then revert the bug.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Handle Dependabot dependency-update PRs in this pnpm monorepo by redoing each upgrade with a clean lockfile. Use when asked to handle, process, or merge Dependabot PRs or dependency bumps.
Learn from user feedback — either edits they made to code or suggestions in their messages about how to improve code.
| name | mutation-test |
| description | Introduce an intentional bug in source code to verify a test catches it, then revert the bug. |
Verify that a test actually catches bugs by introducing an intentional mutation in the source code under test, running the test to confirm it fails, then reverting the mutation.
Identify the source code to mutate. Ask the user which code to mutate, or infer from context (e.g. the test file being discussed). Read the source file.
For new tests, verify the test passes first. If the test was just written (not modifying an existing test), run it once to confirm it passes before introducing a mutation.
Introduce a small, targeted bug. Examples:
range(0, n) to range(0, n - 1))> to <)Use the Edit tool to make the change. Keep the mutation minimal — one logical change only. Tell the user what mutation you chose so they can evaluate whether it's a meaningful test.
Run the test. Use pnpm test:run <file> -t "<test name>" from the
relevant package directory. Do NOT use watch mode.
Verify the test fails. If the test fails, the mutation was caught — report what failed and why. If the test passes, the test has a gap — report what mutation was not caught so the user can improve the test.
Revert the mutation. Undo the edit to restore the original source code. Confirm the test passes again after reverting.