agentleFS
ku5icku5ic/claude-kit/skills/audit-tests/SKILL.md

audit-tests

Skill2 starsChanged 14 days agoMITView on GitHub

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

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use close-spec, design-with-images and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • dzhngSkill

    close-spec

    When a spec under specs/<feature>/ is done shipping (a write-spec build, or any planned task that produced a spec), archive it to specs/done/ and rewrite it from a build-plan into a durable rationale — the why, the principles, the invariants — pointing back to the real code for the how. Use when implementation has landed and the plan no longer matches what shipped, or the user says a feature/spec is finished. Pairs with [write-spec](../write-spec/SKILL.md) (the plan this closes) and [review](../review/SKILL.md) (run before closing).

    Also in 5 projects that use this

  • dzhngSkill

    design-with-images

    Explore UI and visual design with image generation, then iterate the real implementation against the user-selected concept. Use when brainstorming visual directions, offering mockup variants, or implementing an approved generated design; do not stop at the mockups or the first code approximation.

    Also in 5 projects that use this

  • LucasMatuszewskiSkill

    audit-agents

    Audit and maintain agent configuration files (.claude/agents, AGENTS.md, CLAUDE.md, agent-memory). Checks for duplicates, outdated info, naming conflicts, wrong technical facts, and files over 200 lines. Fixes all issues and commits.

    Also in 5 projects that use this

  • transitive-bullshitSkill

    compare-screenshots

    Compare screenshots against the intended design, distinguishing approved references from historical baselines. Use for iterative implementation matching, before/after visual review, objective image telemetry, or checking a lone capture for flat, empty, or badly framed content.

    Also in 5 projects that use this

  • rhnfzlSkill

    explore-unknowns

    Walk the user through mapping the unknowns of a task before, during, and after they build it, and hand them a four-quadrant map (settled ground, open decisions, taste, and landmines) they keep. Reach for this eagerly whenever a request is ambiguous or underspecified, the codebase or domain is unfamiliar, the user will "know it when they see it", a reference implementation must be understood before porting, a build-queue or architecture-changing task is about to start, a mid-build deviation needs capturing, or a finished change needs buy-in or verified understanding before merge. Trigger even when the skill is not named: "do a blindspot pass", "find my unknown unknowns", "interview me about this change", "brainstorm the approach for a task I am about to build", "help me scope this", "what am I missing here", "plan this before I build", "I know nothing about X in this codebase". When a territory profile is present it reads memory and the graph first and feeds the map into the build pipeline; without one it degrades to a plain general map. Not for trivial or mechanical tasks with clear acceptance criteria, single-fact lookups, pure debugging of a known symptom, or pure code review, those have their own tools. Do not use it to run the build itself; the map is the deliverable and implementation remains a separate task, whether it has not started or is already underway.

    Also in 5 projects that use this

  • +7 more from dzhng

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 14 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read each test in the target, and the code it calls.

    line 28
  2. Very specific:

    Can't fail: no assertion, an assertion always true or always false, or an unawaited async assertion (anti-patterns.md).

    line 30
  3. Distinctive:

    delete it, with the lines saved

    line 52

“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/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 /audit-debt's Testing debt.

Run

Resolve the target, then dispatch the auditor agent (subagent_type: kit:auditor, foreground) with this file's procedure and the resolved target. It writes the report. 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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.