Unit Test Analyzer skill for Claude and Codex
Audits a unit test suite against its results and coverage data and returns a prioritised, machine-readable report: what fails, what is flaky, which modules…
Install it once and Claude or Codex runs it for you. When your request matches, your AI loads the skill, asks for anything it is missing, and works through the template itself. Prefer to fill it in by hand? See the full prompt template.
Download the skill (.zip) · View SKILL.md
When it is used
Use when a unit test run has failures, suspected flaky tests, or coverage below the bar and you need a prioritised report of what to fix before release. Do not use for writing new tests for a function or planning a test suite for an untested module. Related topics: coding, unit.
What it will ask you for
- Project language (choose one: Python, Java, JavaScript, TypeScript, C#, Go, Ruby)
- Test framework (choose one: pytest, JUnit, Jest, Mocha, NUnit, Go test, RSpec)
- Test results (longer free text)
- Coverage report (longer free text)
- Coverage threshold in percent (number from 0 to 100)
- Recent commit or change (free text, e.g. "a1b2c3d or the feature just merged")
- Focus area (choose any: Business logic, Data access, UI, Performance, Security)
- Detect flaky tests (choose one: Yes, No)
How it works
- Group every failing test by its root cause (fixture, signature change, environment) rather than listing names.
- Compare coverage per module against the threshold and flag the focus-area modules below it with their uncovered branches.
- Identify tests that prove nothing: no assertions, mock-only assertions, broad exception catches.
- When flake detection is on, mark tests whose failures involve timing, ordering, network, or shared state and name the fix for each.
- Order recommendations by release risk and emit the JSON with every key present, including empty arrays.
What you get
A JSON object with summary, coverage_percent, failing_tests, flaky_tests, and recommendations (target, action, reason) ordered by priority, and nothing outside it.
What it watches out for
- Reporting the overall coverage number when one focus-area module sits at 20 percent behind a healthy average.
- Calling a test flaky because it failed once, without a timing or ordering clue in the failure output.
- Recommending more tests for code that is already covered while the changed code in the commit has none.
How to install
Claude.ai and the Claude desktop app
- Download the skill .zip.
- Open Settings, then Capabilities, and find Skills.
- Choose Upload skill and select the .zip.
- Ask Claude for help with the task. It loads the skill when your request matches.
Claude Code
- Download the skill .zip.
- Unzip it into ~/.claude/skills/ (or .claude/skills/ inside a project).
- Start a new session. Claude Code loads the skill when your request matches.
Codex
- Download the skill .zip.
- Unzip it into ~/.agents/skills/ (or .agents/skills/ inside a project).
- Codex picks it up on its own. Type $ and the skill name to use it, or just ask for the task.
Cursor
- Download the Cursor rule (.mdc).
- Save it in .cursor/rules/ inside your project.
- Cursor's agent applies the rule when your request matches its description.
AGENTS.md (Codex, Cursor, and other coding agents)
- Copy the AGENTS.md section.
- Paste it into AGENTS.md at the root of your repository, creating the file if needed.
- Coding agents that read AGENTS.md follow it when your request fits.