Skip to content
Back to skills

Audit Tests

ASecurity

Tests that add code and catch no regression, each with the cut, merge, or rewrite that fixes it

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 23, 2026
ai-agentsgobashgitsecurity

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add ku5ic/claude-kit --skill audit-tests --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Audit Tests?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Audit Tests
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ku5ic-audit-tests/badge)](https://www.skillsdirectory.com/skills/ku5ic-audit-tests)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: audit-tests
description: Tests that add code and catch no regression, each with the cut, merge, or rewrite that fixes it
argument-hint: "<optional: a path, or --all for the whole suite>"
allowed-tools:
  - Bash(git log *)
  - Bash(kit git-base *)
---

# /audit-tests

Find the tests that cost code and catch nothing: ones that can't fail, ones bound to the implementation, duplicates, and trivial ones. Missing coverage is outside this audit; `/audit-debt` ranks an untested core path that keeps breaking.

## Run

Resolve the target, then work this file's procedure on the resolved target per `skills/kit-rules/reference/subagents.md` section 4, and write the report yourself. Then run the report-format skill's Runtime checks yourself, and reply per `skills/kit-rules/reference/output.md` section 3.

The target, first match wins:

- `--all`: every test file in the repo.
- A path: the test files under it.
- Nothing: the test files `kit git-base --diff --name-only` lists. None, say so and stop.

## Procedure

1. Load `test-patterns`, and the pattern skill for the stack the `<repo-context>` block names. Read `test-patterns`' `reference/principles.md`, `reference/anti-patterns.md`, and `reference/coverage-and-skip.md`. They hold every criterion below; this file only says how to apply them.
2. Read each test in the target, and the code it calls.
3. Flag a test of one of these kinds:
   - **Can't fail**: no assertion, an assertion always true or always false, or an unawaited async assertion (`anti-patterns.md`).
   - **Tests the implementation**: asserts on internals, call counts of private functions, or a mock of every import (`principles.md`, `anti-patterns.md`).
   - **Duplicate**: a copy of another test with only its inputs changed, or the same condition asserted twice (`anti-patterns.md`).
   - **Trivial**: covers a pass-through wrapper, a getter or setter, or a framework default (`coverage-and-skip.md`).
4. A finding comes from reading the test. Quote the lines that make it one of the four kinds.
5. For a test added or changed since `kit git-base` whose subject also changed, name one runtime check under "Needs a runtime check": the test run alone against the base's code, in a worktree at `"$(kit scratch-dir)/tests-base"` with the branch's test file copied in, using the project's own test command. It touches only that worktree, removed with `git worktree remove --force` after. A test that passes there too caught none of the branch's change.

## Not a finding

- A test the project's coverage rules require for a business rule, auth, payment, or security boundary, however plain it reads (`coverage-and-skip.md`).
- A snapshot of stable serialized output (`anti-patterns.md`).

## Severity anchors

`anti-patterns.md` gives each kind its level. A trivial test is `info`.

## Output per finding

- What it is, with `file:line`, and its kind
- Evidence: the quoted lines, or the runtime check's command and output once it ran
- Why it matters: the code it costs, and the regression it would miss
- Fix, one of:
  - delete it, with the lines saved
  - merge it into a table-driven or parametrized test, naming the rows
  - rewrite it to assert behavior, naming the behavior
  - the regression the suite still misses once it's gone, as the test to write

## Output file

Load the report-format skill and use its format. Write to the path `kit scratch-dir tests <target-slug>` prints.

## Rules

- Change no test. The report is the only output.
- A test that passes on the base's code is confirmed as catching nothing only after its runtime check ran.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.