test-audit

test-audit is a skill for Claude Code, Codex from ArcBlock/agent-skills. It costs 167 tokens per session (3,436 once invoked), scanned A, original, MIT.

A test-analysis tool that finds automated tests unable to detect incorrect code, including empty checks, ignored assertions, and weakened or disabled coverage.

In plain words
What is it for?
Auditing changed or existing TypeScript tests, reporting machine-checkable findings, creating issue drafts, and comparing the rules with past project history.
Why use it?
It exposes tests that appear to protect the code but may never fail when the code is wrong.

Skill for Claude CodeCodex

Part of the agentloop plugin — 18 skills shipped together

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/arcblock/agent-skills/test-audit
Any agent
npx skills add ArcBlock/agent-skills --skill test-audit
Clone the repo
git clone --depth 1 https://github.com/ArcBlock/agent-skills

Made for: Claude Code, Codex.

Or install agentloop, the plugin that ships this one along with the rest of its 18 skills.

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/arcblock/agent-skills/test-audit.svg)](https://agentmods.dev/skills/arcblock/agent-skills/test-audit)
Your own site
<a href="https://agentmods.dev/skills/arcblock/agent-skills/test-audit"><img src="https://agentmods.dev/badge/skills/arcblock/agent-skills/test-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 167 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,436 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.00167 $0.03436
Opus 5 $0.00084 $0.01718
Sonnet 5 $0.00033 $0.00687
Haiku 4.5 $0.00017 $0.00344

Measured 4d ago against content hash aba1cdcc26d1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d ago.

The scan reads SKILL.md. This mod also ships 25 executable files (fixtures/assertion-weakened/bad-after.fixture.ts, fixtures/assertion-weakened/before.fixture.ts, fixtures/assertion-weakened/good-after.fixture.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

plugins/agentloop/skills/test-audit/SKILL.md · 232 lines

How it starts

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

Test Audit

A test suite has one job: go red when the code is wrong. This skill looks for the places it cannot do that.

Repo profile. The engine here is repo-agnostic. Every repo fact — scan surface, assertion dialect, per-rule severity, how to run a subset of tests — comes from an adapter at .claude/test-audit.config.ts in the consuming repo. Arc is the reference implementation.

Usage

# One PR / working tree: what did this change do to the suite?
bun <plugin_root>/skills/test-audit/scripts/audit.ts diff [--base origin/main] [--json]

# Whole tree: which tests verify nothing? (advisory backlog, never a gate)
bun <plugin_root>/skills/test-audit/scripts/audit.ts scan [--json] [--rule <id>]
bun <plugin_root>/skills/test-audit/scripts/audit.ts scan --write-baseline

# Turn a sweep into a handful of actionable issue drafts (prints; never creates)
bun <plugin_root>/skills/test-audit/scripts/audit.ts issues [--rule <id>] [--json]

# Calibration: what would these rules have done to real merged history?
bun <plugin_root>/skills/test-audit/scripts/replay.ts [--limit 300] [--rule <id>] [--verbose]

issues groups findings by (rule × owning unit), gives each draft the four blocks a work item needs (问题 / 证据 / 方案 / 验收) and a test-audit-key marker for upsert, and rolls the long tail of one-off groups into a single per-rule list. On arc that turns 108 findings into 17 drafts. It prints and exits — creating issues is a side effect on a shared surface and stays an explicit act by whoever ran it.

When invoked — pick the mode, then read the output

There are four modes and they answer different questions. Choose from what was actually asked; do not run all of them.

What you were asked Mode Then
"review this PR's tests" / a PR number / you are inside pr-review diff --base <merge-base> Read the gate row first. In a repo where this is wired as a verification check (arc: testQuality), pre-merge already ran it — quote that row rather than re-running. Only run it yourself when there is no such row.
"what's wrong with our tests" / "sweep" / "backlog" scan Report the NEW-vs-baseline split, not the raw total. The baseline is accepted debt; re-announcing it every time is how a report becomes wallpaper.
"file issues for this" issues Print the drafts. Add --create --repo <owner/name> only if the human asked for issues to be created — the flag is the authorisation, and it is never inferred.
"should rule X block?" / "is this rule any good?" replay --rule X --verbose Read the hits. A rule earns block only with a demonstrated true positive and a near-zero false-positive rate on that history.

Read the full file on GitHub · 232 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 · 232 lines · 167 tokens per session scan A aba1cdcc26d1

Subscribe to this mod's changes

test-audit is a skill published in the GitHub repository ArcBlock/agent-skills (5 stars, last pushed 3d ago), licensed MIT. It adds 167 tokens to every session and 3,436 once invoked, about $0.0008 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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens