Use for any question about mutation testing in Java or Kotlin, or when a JVM suite has high line coverage but may assert nothing: sets up PIT (PITest) with Maven or Gradle, target classes, mutators, mutation-score thresholds that fail the build, incremental runs, Kotlin support and the HTML and XML reports.
92%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Detailed pitfalls and constraints for pitest-mutation. Linked inline from that skill's SKILL.md.
| Anti-pattern | Why it fails | Fix |
|---|---|---|
| Mutating the entire codebase every PR | Slow; team disables. | withHistory + per-changed-file scope. |
mutationThreshold: 100 | Unreachable; first failed run blocks all PRs. | Start at the current baseline; ratchet up. |
| Mixed Maven/Gradle config (both plugins active) | Conflicting configurations; cryptic errors. | Pick one build tool. |
| Missing JUnit 5 plugin dependency | Tests don't run; mutation coverage 0. | Add pitest-junit5-plugin for JUnit 5. |
Targeting test classes in targetClasses | Mutates test code; meaningless. | targetClasses = production package; targetTests = test package. |
All mutators (ALL mutator set) | Many irrelevant mutants; long runtime. | DEFAULTS (default) or STRONGER. |
targetClasses patterns.