skills/go-test/SKILL.md
Advanced Go testing skill with mutation testing and coverage analysis. Activate when writing tests, improving test quality, or analyzing coverage. Uses Selene for mutation testing and testquery for SQL-based coverage analysis.
npx skillsauth add danicat/godoctor go-testInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill guides writing effective Go tests and objectively measuring their quality using mutation testing and coverage analysis.
Tests exist to catch bugs, not to hit coverage numbers. Use mutation testing to prove your tests actually detect real defects.
Before writing tests, be aware of these common mistakes:
err == nil — verify the result-race, test concurrent accesssmart_read(filename="target.go", outline=true)
t.Run()t.Parallel() for independent subtests-racesmart_build(run_tests=true)
mutation_test(dir=".")
Review surviving mutants — each one is a real defect your tests missed. Fix the tests to catch them.
Use SQL queries to find gaps:
test_query(query="SELECT * FROM all_coverage WHERE count = 0")
Repeat steps 2-5 until mutation score is acceptable.
See assets/queries.sql for useful testquery SQL patterns.
references/tq_schema.md: TestQuery database schema and common SQL patterns.smart_read: Understand the code under testsmart_build: Run tests and verifymutation_test: Measure test quality with mutation testing (Selene)test_query: Query test results and coverage with SQL (testquery/tq)development
Guidelines and templates for structuring software development goals and ideas into actionable, bounded tasks using Context/Todo/AC, enforced by the DoR gate. Activate when scoping user requests, decomposing RFCs into tasks, or creating a new task file.
development
Guidelines and templates for authoring Request for Comments (RFCs). Activate when proposing significant features/refactorings, exploring design alternatives under high ambiguity, or gathering technical consensus.
development
Pre-release checklist and quality gate to verify codebase health, docs, and security before interacting with Git. Activate when preparing to tag/publish a release, concluding milestones, or running final verification on a pull request.
development
Highly actionable step-by-step checklist for diagnosing and resolving Go compilation errors, type errors, build/test failures, and runtime issues. Activate on any build or execution failure.