kagan: Skill for Claude Code

.agents/skills/test-audit/SKILL.md

test-audit is a skill for Claude Code, Codex from kagan-sh/kagan. It costs 45 tokens per session (1,843 once invoked), scanned A, original, MIT.

A set of rules for creating and reviewing software tests. It checks whether each test protects observable behavior and adds coverage that existing tests do not already provide.

In plain words
What is it for?
Use it when writing, changing, auditing, or systematically reducing tests while preserving meaningful coverage.
Why use it?
It helps avoid tests that merely repeat other tests, depend too closely on implementation details, or require production-only code paths that exist just for testing.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md.

This is kagan-sh/kagan's own configuration. It tells Claude Code and Codex how to work on kagan itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything kagan configures →

Reuse

Borrowing it

Nothing to install: this file belongs to kagan-sh/kagan. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/kagan-sh/kagan/main/.agents/skills/test-audit/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/kagan-sh/kagan

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/kagan-sh/kagan/test-audit/github.svg)](https://agentmods.dev/skills/kagan-sh/kagan/test-audit)
Your own site
<a href="https://agentmods.dev/skills/kagan-sh/kagan/test-audit"><img src="https://agentmods.dev/badge/skills/kagan-sh/kagan/test-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for test-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/kagan-sh/kagan/test-audit"><img src="https://agentmods.dev/badge/skills/kagan-sh/kagan/test-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,843 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.00045 $0.01843
Opus 5.5 $0.00018 $0.00737
Sonnet 5.5 $0.00009 $0.00369
Haiku 4.5 $0.00005 $0.00184

Measured 11d ago against content hash dca6d089fdba, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

test-audit 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 11d 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.

.agents/skills/test-audit/SKILL.md · 178 lines

How it starts

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

Test Audit

Three modes, one value bar. Authoring mode gates every new or changed test at write time. Audit mode runs focused sweeps of tests that re-assert source, duplicate stronger proof, couple behavior to implementation, or keep test-only production seams alive. Continue broad audits as separate coherent follow-up PRs; optimize for confidence, not deletion count. Campaign mode prunes one crate's test surface; before starting one, read CAMPAIGN.md.

Authoring gate

Before adding any test, answer four questions; a missing answer means do not add it yet:

  1. What observable behavior, invariant, or independent contract does it protect?
  2. What credible regression makes it fail?
  3. Why does existing coverage not already catch that failure? Each contract has one primary test owner at the strongest boundary; another layer needs its own distinct risk, such as a transport or lifecycle failure the owner cannot reach. Prefer extending a table-driven case or shared fixture over a near-duplicate test; consolidate duplicated setup in the same change.
  4. Does it need a production seam (export, flag, wrapper, injection hook) that no production caller needs? If yes, move the test to the real boundary instead.

Then check the test against every junk pattern; a match fails the gate unless the retention bar names the contract it independently guards. A test that would break under behavior-preserving refactoring is asserting implementation, not behavior; rewrite it at the owning boundary before landing it.

Bug regression tests must fail on the pre-fix code for the intended reason and pass after the owner-boundary repair. A regression test that never demonstrably failed proves the mock, not the fix. One regression at the owner boundary covers the bug; do not replay the same scenario at every layer it crosses.

kagan test rules: Rust, cargo nextest. Tests only at the edges: Workspace::dispatch for core, a view's public interface through GPUI's test context for ui, and the kg CLI. docs/behaviour.md is the contract a test protects. Never touch ~/.makerspace; use a temp data dir. Tests follow the no-comments rule.

Read the full file on GitHub · 178 lines

Files

What ships with it

2 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. 11d ago First seen · 178 lines · 45 tokens per session scan A dca6d089fdba

Subscribe to this mod's changes

test-audit is a skill published in the GitHub repository kagan-sh/kagan (106 stars, last pushed 11d ago), licensed MIT. It adds 45 tokens to every session and 1,843 once invoked, about $0.0002 per session on Opus 5.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-10-15.

Related

Other skills, from other repositories

superqa

Browser QA for any website: turns a plain prompt into test scenarios, drives a real browser, and flags side effects (console/JS errors, failed requests, unexpected dialogs/popups/tabs) in plain-language reports. Also click-to-record, visual baselines, a clickable web admin, and CI/JUnit output. Use when the user says…

cskwork/oh-my-symphony · 0 tokens

google-agents-cli-eval

This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics…

google/agents-cli · 149 tokens

adk-go-self-review

Review an ADK Go change the way a maintainer will — a fresh-context pass over the whole diff, five lenses (correctness and tests, scope, simplicity, style, adk-python parity), and the mutation check that proves your tests pin the change. Use before opening a PR, before any later push that changes code, and when asked…

google/adk-go · 87 tokens

ccg-workflow

How to run a non-trivial change end to end with the CCG role tools (ccganalyze / ccgdesign / ccgbuild / ccgdebug / ccgoptimize / ccgreview / ccgtest) and the verify- quality gates. Use when a task is a whole feature, a refactor, a bug whose cause is not yet known, or any change large enough that one straight-through…

fengshao1227/ccg-workflow · 97 tokens

red-team-review

Unified adversarial review, two modes. Strategic Matrix v4.3 (MTA-004) for arguments/plans/decisions: Priors → Rubric → Adversarial Lenses → SWOT/TOWS → MCDA → Blind Spot/Kill Switch → Summary. Deliverable Audit for built artefacts (assignments, reports, code outputs): isolated fresh-context hunt against the brief…

winstonkoh87/Athena-Public · 103 tokens

voice-agent-test-harness

Drive a fixed suite of spoken tests against a voice agent ("subject") from a co-located machine ("prober"), measure response latency / clarity / accuracy, diff against baseline, and report to the owner over Telegram.

sonichi/sutando · 0 tokens