audit-tests

audit-tests is a skill for Claude Code, Codex from conn-castle/agent-layer. It costs 27 tokens per session (618 once invoked), scanned A, original, MIT.

A one-time review of an existing automated test suite, checking whether tests are redundant, misleading, poorly organized, or missing important behavior.

In plain words
What is it for?
It audits tests, fixes safe mechanical issues, deletes duplicate or false-coverage tests, and adds behavior-focused tests when the expected behavior is clear.
Why use it?
It removes tests that provide little value and repairs clear problems without changing production behavior unnecessarily.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/conn-castle/agent-layer/audit-tests
Any agent
npx skills add conn-castle/agent-layer --skill audit-tests
Clone the repo
git clone --depth 1 https://github.com/conn-castle/agent-layer

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 audit-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/conn-castle/agent-layer/audit-tests.svg)](https://agentmods.dev/skills/conn-castle/agent-layer/audit-tests)
Your own site
<a href="https://agentmods.dev/skills/conn-castle/agent-layer/audit-tests"><img src="https://agentmods.dev/badge/skills/conn-castle/agent-layer/audit-tests.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 618 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00027 $0.00618
Opus 5 $0.00014 $0.00309
Sonnet 5 $0.00005 $0.00124
Haiku 4.5 $0.00003 $0.00062

Measured 4d ago against content hash bf74af5bd187, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

audit-tests 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.

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.

internal/templates/skills/audit-tests/SKILL.md · 73 lines

How it starts

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

audit-tests

Audit tests and fix clear negative-value or mechanical problems.

Scope

  • Default to all tests; accept paths, modules, repository-defined tiers, and a report limit that does not reduce coverage.
  • Derive tiers from repository configuration. If ambiguous, audit concrete tests without tiers and report the limitation.

Write .agent-layer/tmp/audit-tests.<run-id>.report.md, using YYYYMMDD-HHMMSS-<short-rand> for run-id.

Contract

  • Findings identify concrete tests, behavior, and evidence; coverage percentage alone is not a finding.
  • Delete tautological, self-confirming, dead, rubber-stamp, or duplicate tests, preserving the strongest behavioral coverage.
  • Make mechanical assertion, naming, tier, helper, and fixture repairs when the intended behavior is established.
  • Add behavior-focused tests for material gaps when the expected behavior is established.
  • Do not delete partially valuable tests or change production for testability without a user decision. Replace false coverage only for a clear behavior contract.
  • Ignore framework conventions and style preferences that do not affect value.

Workflow

Read COMMANDS.md before selecting commands. Identify the test runner, configuration, conventions, fixtures, helpers, and tiers. Inventory the scope. For large scopes, parallelize non-overlapping read-only investigations; the owning agent validates candidates, reconciles gaps/duplication, and edits.

Review:

  • duplicate scenarios, setup, assertions, helpers, and fixtures
  • false, fragile, dead, misleading, or misplaced tests
  • unexpected I/O, network, sleeps, or other tier violations
  • material gaps in failures, boundaries, interactions, or critical workflows

Use coverage when documented and useful, reusing results until edits invalidate them. Apply safe deletions, consolidation, and mechanical fixes. Leave judgment-dependent work untouched. Fix material gaps with behavior-focused tests; report only gaps that require a user decision.

Read the full file on GitHub · 73 lines

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 · 73 lines · 27 tokens per session scan A bf74af5bd187

Subscribe to this mod's changes

audit-tests is a skill published in the GitHub repository conn-castle/agent-layer (10 stars, last pushed yesterday), licensed MIT. It adds 27 tokens to every session and 618 once invoked, about $0.0001 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.