mutation-testing
Skill3 starsChanged 8 months agoMITView on GitHub
Mutation testing with Gremlins for Go. Use when assessing test quality, finding weak tests, or when the user asks about mutation testing. Triggers on "mutation test", "gremlins", "test quality", "test effectiveness", or after completing a feature to verify test strength.
- Installs packages
30 other projects use a version of this.
Adopted by
Most recently taken up by
- camunda/camundatheir own version, first seen Nov 8, 2026
- DnsQueen/orcinus-skillstheir own version, first seen Nov 8, 2026
- Integralist/agent-skillstheir own version, first seen Nov 1, 2026
- shangyiy/life-kittheir own version, first seen Nov 1, 2026
- Hakkadaikon/hymmetheir own version, first seen Oct 26, 2026
- proffesor-for-testing/agentic-qetheir own version, first seen Oct 25, 2026
Used with
Projects with it also use domain-modeling, code-review and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
GoogleSkilldomain-modeling
Build and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model.
Also in 3 projects that use this
GoogleSkillcode-review
Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.
Also in 5 projects that use this
MicrosoftSkillgrill-with-docs
Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.
Also in 3 projects that use this
Other versions30 projects use a version of this.
Word for word · 1
- masonhuemmer/dops★ 3100% same
Edited · 0
None found.
Wrote their own version · 29
- metabase/metabase★ 50ksame name
- recharts/recharts★ 28ksame name
- camunda/camunda★ 4.4ksame name
- ThibautBaissac/rails_ai_agents★ 665same name
- proffesor-for-testing/agentic-qe★ 524same name
- s3s-project/s3s★ 315same name
- jvm-skills/jvm-skills★ 140same name
- Amplicode/spring-skills★ 126same name
- GGGODLIN/gggodlin-cc-harness★ 73same name
- Integralist/agent-skills★ 23same name
19 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository19 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- bubbletea-patternsSkill
- charm-stylingSkill
- clean-code-boundariesSkill
- clean-code-designSkill
- clean-code-errorsSkill
- clean-code-functionsSkill
- clean-code-namingSkill
- clean-code-solidSkill
- clean-code-testingSkill
- cli-structureSkill
- create-runbookSkill
- demo-recordingSkill
- shell-scriptsSkill
- spec-workflowSkill
- tdd-workflowSkill
- tui-layoutSkill
- tui-testingSkill
- wizard-formsSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 4 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 26 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 51
Default operators (all enabled):
- Very specific: line 71
Create .gremlins.yaml in the project root:
- Very specific: line 144
Use --diff origin/main in PRs for fast runs.
- Distinctive: line 160
Test doesn't verify the computed value precisely.
- Distinctive: line 174
When you encounter these, exclude the file or accept the lower efficacy score.
- Very specific: line 189
Targeted runs: Always use --coverpkg or --diff instead of full-module runs
- Distinctive: line 192
Schedule full runs: Run full-module mutation testing weekly, not per-commit
“Common” is measured: kept by at least 6 in 10 of the 26 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Mutation Testing with Gremlins
Gremlins tests your tests. It introduces small bugs (mutants) into your code and checks whether your test suite catches them. Surviving mutants = weak tests.
Install
brew tap go-gremlins/tap && brew install gremlins
# or
go install github.com/go-gremlins/gremlins/cmd/gremlins@latestQuick Start
# Dry run — see what would be mutated, no testing
gremlins unleash --dry-run
# Run mutation testing on the full module
gremlins unleash
# Run only on specific packages
gremlins unleash --coverpkg ./internal/vars/...
# Run only on code changed since main (fast, use in PRs)
gremlins unleash --diff mainReading Results
| Status | Meaning | Action |
| KILLED | Tests caught the mutation | Good. No action needed. |
| LIVED | Tests did NOT catch the mutation | Bad. Write a better test. |
| NOT COVERED | No test coverage at mutation site | Write tests for this code. |
| TIMED OUT | Tests hung on the mutant | Usually good (mutation broke a loop). |
| NOT VIABLE | Mutation caused compile error | Ignore. |
Key metrics:
- Efficacy = KILLED / (KILLED + LIVED) — target 70-80%
- Mutant coverage = tested mutations / total mutations
What Gremlins Mutates
Default operators (all enabled):
| Operator | Example |
arithmetic-base | + becomes -, * becomes / |
conditionals-boundary | > becomes >=, < becomes <= |
conditionals-negation | == becomes !=, < becomes >= |
increment-decrement | ++ becomes -- |
invert-negatives | -x becomes x |
Additional operators (opt-in):
gremlins unleash --invert-logical # && <-> ||
gremlins unleash --invert-loopctrl # break <-> continue
gremlins unleash --invert-assignments # += <-> -=Configuration
Create .gremlins.yaml in the project root:
unleash:
diff: ""
workers: 0 # 0 = all CPUs
exclude-files:
- ".*_generated\\.go$"
- "internal/executor/demo_data\\.go$"
threshold:
efficacy: 70 # exit code 10 if below
mutant-coverage: 80 # exit code 11 if below
mutants:
arithmetic-base:
enabled: true
conditionals-boundary:
enabled: true
conditionals-negation:
enabled: true
increment-decrement:
enabled: true
invert-negatives:
enabled: true
invert-logical:
enabled: false # enable when baseline is strong
invert-loopctrl:
enabled: false
invert-assignments:
enabled: falseWorkflow
After Completing a Feature
# 1. Run tests first (must be green)
go test ./...
# 2. Mutation test the packages you changed
gremlins unleash --diff main
# 3. Filter to only survived mutants
gremlins unleash --diff main --output-statuses l
# 4. For each LIVED mutant, write a test that kills it
# 5. Re-run to confirm the mutant is now KILLEDImproving Test Quality on Existing Code
# 1. Pick a package
gremlins unleash --coverpkg ./internal/config/...
# 2. Focus on LIVED mutants in business-critical code
# 3. Ignore LIVED mutants in:
# - Logging/formatting code
# - Error message strings
# - Generated code
# - Demo/fixture dataIn CI (GitHub Actions)
- uses: go-gremlins/gremlins-action@v1
with:
version: latest
args: --diff origin/main --threshold-efficacy 70Use --diff origin/main in PRs for fast runs. Run full module weekly on a schedule.
Interpreting LIVED Mutants
A LIVED mutant means: "I changed this line and no test noticed."
Common patterns and fixes:
- Boundary mutation survived (
>became>=)- Missing edge case test. Add a test for the exact boundary value.
// If maxItems > 100 survived becoming >= 100: // Add test: {name: "exactly 100", items: 100, wantErr: false} - Arithmetic mutation survived (
+became-)- Test doesn't verify the computed value precisely. Add exact value assertions.
- Condition negation survived (
==became!=)- Both branches produce acceptable results. Either the test is too loose or the code has an equivalent mutant (false positive).
- Increment survived (
++became--)- Loop counter or index not tested at boundaries. Add tests for first/last element.
Equivalent mutants (false positives): Some mutations produce semantically identical code. These show as LIVED but aren't real weaknesses:
- Changing
<to<=when the boundary value never occurs - Arithmetic on constants used only for cosmetic purposes
- Negating conditions that return the same value in both branches
When you encounter these, exclude the file or accept the lower efficacy score.
What Gremlins Does NOT Catch
- Logic errors in test assertions themselves
- Missing test scenarios (it only mutates covered code)
- Concurrency bugs
- Integration issues between packages
- Incorrect error messages (doesn't mutate strings)
- Missing validation for new fields
Mutation testing complements — not replaces — code review, integration tests, and property-based testing.
Performance Tips
- Targeted runs: Always use
--coverpkgor--diffinstead of full-module runs - Worker control:
--workers 4to limit CPU usage - Exclude data files: Exclude
demo_data.go, generated files, fixtures - Schedule full runs: Run full-module mutation testing weekly, not per-commit
- Start small: Begin with default operators; enable extras as baseline improves
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

