code-quality-instruments
/code-quality-instruments
Measure whether a test suite is any good, not only that it passes — branch coverage, mutation score, complexity-times-coverage risk, duplication. Use when adding or reviewing tests on a change that matters, a suite passes but a bug still shipped, coverage is high and confidence is not, or before promising a module is well tested.
- Author
- jakeselby ↗
- Repository
- model-citizen ↗
- Licence
- MIT
- Last repository change
- 15.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 15.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Measure whether a test suite is any good, not only that it passes — branch coverage, mutation score, complexity-times-coverage risk, duplication. Use when adding or reviewing tests on a change that matters, a suite passes but a bug still shipped, coverage is high and confidence is not, or before promising a module is well tested.
Original author description
Measure whether a test suite is any good, not only that it passes — branch coverage, mutation score, complexity-times-coverage risk, duplication. Use when adding or reviewing tests on a change that matters, a suite passes but a bug still shipped, coverage is high and confidence is not, or before promising a module is well tested.
How it works
- What to measure, in order of what it tells you
- Per-language instruments
- How to run them
- What to do with the numbers
SKILL.md preview
--- name: code-quality-instruments description: Measure whether a test suite is any good, not only that it passes — branch coverage, mutation score, complexity-times-coverage risk, duplication. Use when adding or reviewing tests on a change that matters, a suite passes but a bug still shipped, coverage is high and confidence is not, or before promising a module is well tested. --- The `testing` stance says whether tests are required. This is how you find out whether the ones you wrote are worth anything. A suite can reach full line coverage with no assertions at all. Every line executes, nothing is checked, and the gate is green. Coverage measures what ran; it does not measure what was verified. Everything below exists to close that gap. ## What to measure, in order of what it tells you 1. **Branch coverage, not line coverage.** Line coverage counts a two-way branch as covered when one side ran. Branch coverage is the cheapest upgrade available and usually the one that reveals the untested error path. 2. **Mutation score.** Change an operator, flip a boundary, delete a statement, then rerun the suite. A mutant that survives is a change to your code no test objects to. This is the only instrument here that measures assertions rather than execution, so it is the one that catches an assertion-free suite. 3. **Complexity against coverage.** A function that is both branchy and thinly covered is where defects concentrate. Either number alone is weak; the pair ranks the work. Robert Martin's CRAP formula is one published way to combine them, and any complexity report joined to a coverage report gets you the same ranking. 4. **Duplication.** A refactor signal, never a gate. Duplicated logic means a fix lands in one copy. Do not fail a build on it, and do not let a tool talk you into a bad abstraction. ## Per-language instruments Verify each one against the `licensing` stance with the `licensing-review` skill before adopting it. These run in CI rather than shipping inside the product, and the permissive-commercial stance still makes no exception for tooling. | Language | Branch coverage | Mutation | Duplication | | --- | --- | --- | --- | | Python | `coverage.py` with `branch = true`, usually via `pytest-cov` | `mutmut`, or `cosmic-ray` for a larger tree | `pylint --enable=duplicate-code`, or `jscpd` | | TypeScript | `vitest --coverage` or `jest --coverage`, `branches` threshold set | Stryker Mutator | `jscpd` | | Rust | `cargo-llvm-cov` | `cargo-mutants` | no standard tool worth adopting | | Go | `go test -covermode=atomic -coverprofile` | `go-mutesting` | `dupl` | Read the tool's own documentation for flags before the first run. A stale flag in a skill is worse than no flag, and these move. ## How to run them - **Differentially, against what changed.** Mutating a whole tree on every change buys a number nobody reads and a loop nobody waits for. Mutate the diff. Reserve a full run for a release or a scheduled job. - **One at a time.** Coverage, mutation and duplication runs all spawn test processes. Run them concurrently and they contend for the same CPU, the same ports and the same fixtures, and the numbers get noisy in a way that looks like flakiness. - **Bounded workers.** Pass an explicit worker limit rather than letting a tool take every core, or an unrelated command in the same session will time out. - **Report progress on long runs.** A mutation run over a large module is indistinguishable from a hang without periodic output, and a killed run teaches nothing. ## What to do with the numbers - **A surviving mutant is a missing assertion**, so write the assertion. It is not a reason to delete the mutant or add it to an ignore list. - **Separate the testable from the environment-bound.** Code that opens a window, talks to a device, or needs a network is not a fair subject for these instruments. Push logic out of it until the untestable boundary is thin, then measure only the part that can be measured, and say which part that is. - **Do not set a coverage threshold as the goal.** A threshold is a floor that stops regression. Chasing a number produces tests that execute code and assert nothing, which is the exact failure mutation testing exists to find. - **Record the baseline** in the repo's agent instructions the first time you run an instrument, the way the verification gates record their clean-tree output, so a later movement is attributable.
Versions
The database has no other skills named code-quality-instruments.
Identical content appears in 1 other GitHub folders. We show one copy with the highest score.
Database snapshot: 13.11.2026 · package version 19673a1fdfdb (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90test-coverage-quality-review
Use this skill when reviewing a test suite for assertion quality rather than coverage percentage — detecting coverage theater, where line/branch coverage is high but the tests would not catch a regression. Trigger when a user provides test files, a coverage report, or asks… - 100mutation-test
Run mutation testing to validate test quality beyond code coverage. Use when assessing test effectiveness, finding weak tests, or validating test suite quality. - 100mutation-test
Run mutation testing to validate test quality beyond code coverage. Use when assessing test effectiveness, finding weak tests, or validating test suite quality. - 100objectscript-coverage
Measure ObjectScript line coverage using iris_coverage. Use when a user asks about test coverage, coverage reports, or wants to know how well their test suite exercises their code. - 100test-suite
Generates a test suite by analyzing coverage gaps, prioritizing critical and untested code paths, then writing tests in parallel that match the project's existing patterns. Use when the user wants to write tests, add test coverage, generate test cases, improve testing, or… - 100audit-test-suite
Find where an existing test suite is weak and decide what to test next, ranked by risk. Use this when asked to add missing tests, find gaps, raise coverage, assess test quality or see which areas are thin, even if the request only mentions a coverage percentage.