test-critic

test-critic is a skill for Claude Code from JansenAnalytics/claudex. It costs 48 tokens per session (748 once invoked), scanned A, original, MIT.

A test-quality checker that examines coverage, finds missing test cases, scores test code, and changes code to see whether tests catch the changes. Mutation testing means deliberately introducing small bugs to test the tests.

In plain words
What is it for?
Use it after writing tests to review Jest, Vitest, or pytest projects, find gaps, measure coverage, and run mutation testing.
Why use it?
Passing tests do not always mean that tests would catch real bugs; this tool checks whether the test suite is meaningful.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Use it after writing tests to review Jest, Vitest, or pytest projects, find gaps, measure coverage, and run mutation testing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jansenanalytics/claudex/test-critic
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 JansenAnalytics/claudex --skill test-critic
Clone the repo
git clone --depth 1 https://github.com/JansenAnalytics/claudex

Made for: Claude Code.

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 test-critic

README.md
[![agentmods](https://agentmods.dev/badge/skills/jansenanalytics/claudex/test-critic.svg)](https://agentmods.dev/skills/jansenanalytics/claudex/test-critic)
Your own site
<a href="https://agentmods.dev/skills/jansenanalytics/claudex/test-critic"><img src="https://agentmods.dev/badge/skills/jansenanalytics/claudex/test-critic.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 748 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.00048 $0.00748
Opus 5 $0.00024 $0.00374
Sonnet 5 $0.00010 $0.00150
Haiku 4.5 $0.00005 $0.00075

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

Security

Grade A, and why

test-critic 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 4d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/coverage.cjs, scripts/gaps.cjs, scripts/mutate.cjs, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/test-critic/SKILL.md · 76 lines

How it starts

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

test-critic

Evaluates test quality — not just "do tests pass" but "do tests actually catch bugs?"

Quick Start

# Full audit
test-critic /path/to/project --full

# Quick (coverage only, no mutations)
test-critic /path/to/project --quick

# Individual scripts
node ${CLAUDE_SKILLS_DIR:-$HOME/.claude-agent/.claude/skills}/test-critic/scripts/coverage.cjs /path/to/project
node ${CLAUDE_SKILLS_DIR:-$HOME/.claude-agent/.claude/skills}/test-critic/scripts/gaps.cjs /path/to/project
node ${CLAUDE_SKILLS_DIR:-$HOME/.claude-agent/.claude/skills}/test-critic/scripts/quality.cjs /path/to/project
node ${CLAUDE_SKILLS_DIR:-$HOME/.claude-agent/.claude/skills}/test-critic/scripts/mutate.cjs /path/to/project --limit 50
node ${CLAUDE_SKILLS_DIR:-$HOME/.claude-agent/.claude/skills}/test-critic/scripts/report.cjs /path/to/project

Options

Flag Description
--quick Coverage + gaps + quality only (no mutations)
--full Everything including mutation testing
--framework jest|vitest|pytest|auto Test framework (default: auto-detect)
--mutate-limit N Max mutations to try (default: 100)
--output-dir DIR Where to write reports
--format md|json|both Report format

Components

  1. coverage.cjs — Runs tests with coverage, identifies untested files, happy-path-only files, critical files with low coverage
  2. mutate.cjs — Lightweight mutation testing: modifies source code and checks if tests catch the change
  3. gaps.cjs — Static analysis to find untested error handlers, null checks, boundary conditions, division-by-zero
  4. quality.cjs — Analyzes test code itself: missing assertions, poor names, excessive mocking, hardcoded sleeps
  5. review.cjs — Orchestrator that runs all components and generates final report
  6. report.cjs — Combines all results into scored report with prioritized test suggestions

Output

  • coverage-analysis.json — Coverage breakdown
  • test-gaps.json — Identified test gaps with suggestions
  • test-quality.json — Test code quality issues
  • mutation-results.json — Mutation testing results
  • test-critic-report.json — Combined report with health score
  • test-critic-report.md — Human-readable markdown report

Read the full file on GitHub · 76 lines

Files

What ships with it

6 files 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. 4d ago First seen · 76 lines · 48 tokens per session scan A 8647ea367e65

Subscribe to this mod's changes

test-critic is a skill published in the GitHub repository JansenAnalytics/claudex (5 stars, last pushed 2mo ago), licensed MIT. It adds 48 tokens to every session and 748 once invoked, about $0.0002 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-09-03.