jest-coverage-mutation

jest-coverage-mutation is a skill for Claude Code, Codex from pnakhat/qa-ai-repo. It costs 130 tokens per session (1,716 once invoked), scanned A, original, MIT.

A way to evaluate Jest tests using both code coverage and mutation testing. Jest is a JavaScript testing tool; mutation testing makes small deliberate changes to source code to check whether the tests detect them.

In plain words
What is it for?
Use it to find untested code and weak assertions in Jest test suites. It helps improve tests and set a CI quality gate based on whether introduced faults are detected.
Why use it?
Coverage only shows which code ran, not whether tests checked its behavior. Mutation testing exposes tests that execute code but would not catch common bugs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to find untested code and weak assertions in Jest test suites. It helps improve tests and set a CI quality gate based on whether introduced faults are detected.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pnakhat/qa-ai-repo/jest-coverage-mutation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pnakhat/qa-ai-repo --skill jest-coverage-mutation
Clone the repo
git clone --depth 1 https://github.com/pnakhat/qa-ai-repo

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for jest-coverage-mutation

README.md
[![agentmods](https://agentmods.dev/badge/skills/pnakhat/qa-ai-repo/jest-coverage-mutation/github.svg)](https://agentmods.dev/skills/pnakhat/qa-ai-repo/jest-coverage-mutation)
Your own site
<a href="https://agentmods.dev/skills/pnakhat/qa-ai-repo/jest-coverage-mutation"><img src="https://agentmods.dev/badge/skills/pnakhat/qa-ai-repo/jest-coverage-mutation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for jest-coverage-mutation

Your own site · 80×15
<a href="https://agentmods.dev/skills/pnakhat/qa-ai-repo/jest-coverage-mutation"><img src="https://agentmods.dev/badge/skills/pnakhat/qa-ai-repo/jest-coverage-mutation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 130 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,716 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00130 $0.01716
Opus 5 $0.00065 $0.00858
Sonnet 5 $0.00026 $0.00343
Haiku 4.5 $0.00013 $0.00172

Measured 11d ago against content hash aa6beb18955d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

jest-coverage-mutation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

jest-coverage-mutation/skills/jest-coverage-mutation/SKILL.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Jest Coverage & Mutation Testing

Coverage tells you what code ran during tests. Mutation testing tells you whether your tests would catch a bug in that code. You need both: coverage to find untested code, mutation to find weakly tested code (executed but not asserted). See reference.md for config, a worked survivor example, and commands.

Coverage vs mutation — what each proves

Question Coverage answers Mutation answers
Did this line execute in a test? ✅ yes/no
Did a test assert on its behavior? ❌ can't tell ✅ yes/no
Would a real bug here be caught? ❌ can't tell ✅ yes/no
Is the boundary (> vs >=) pinned down? ❌ can't tell ✅ yes/no
Cost to run cheap (one pass) expensive (N re-runs)

Coverage is the floor (find code no test touches). Mutation score is the quality bar (find code no test verifies). Report the mutation score, never coverage % alone.

The core idea

  • Line/branch coverage can be 100% with zero real assertions — a test that calls a function but checks nothing still "covers" it.
  • Mutation testing deliberately introduces small faults ("mutants") into the source (e.g. >>=, +-, truefalse, remove a statement) and re-runs the tests. If a test fails, the mutant is killed (good). If tests still pass, the mutant survived — a real bug would have slipped through.
  • Mutation score = killed / (killed + survived), ignoring no-coverage and invalid mutants. This is your real test-effectiveness metric.

Workflow — coverage first, then mutation

  1. Coverage first (cheap). Turn on Jest coverage with a sensible coverageThreshold and collectCoverageFrom scoped to source (not tests/ configs). Fix the obvious gaps — untested files, uncovered branches.
  2. Then mutation (where it matters). Run Stryker on the high-value / high-risk modules (business logic, calculations, validators, reducers). Don't mutate the whole repo on day one — it's slow.
  3. Read the survived mutants. Each survivor points at a specific weak spot: the code path is executed but the assertion doesn't pin down the behavior.
  4. Kill mutants by strengthening tests, not by deleting mutators:
    • Add/tighten assertions (assert the value, not just "no throw").
    • Cover boundary conditions the mutant exposed (>= vs >, off-by-one).
    • Add missing negative/error cases.
  5. Set thresholds and gate CI. Fail the build below a mutation break threshold on the modules you've committed to; ratchet it up over time.

Read the full file on GitHub · 120 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 120 lines · 130 tokens per session scan A aa6beb18955d

Subscribe to this mod's changes

jest-coverage-mutation is a skill published in the GitHub repository pnakhat/qa-ai-repo (2 stars, last pushed 2mo ago), licensed MIT. It adds 130 tokens to every session and 1,716 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.