Quick answer
- Core problem
- Agents cheat: mock the module under test, soften assertions, write tests after the code
- The shortlist
- 8 skill categories: planning, red-green, coverage, flakes, e2e, mocks, snapshots, refactor
- The keystone skill
- failing-test-first, red before green, with a human approval gate on the test
- Skills vs MCP
- Skills tell the agent how to test; MCP lets it actually run the runner and read CI
SKILL.md, in One Paragraph
An agent skill is a folder with a SKILL.md file: YAML frontmatter declaring a name and a description, followed by Markdown instructions and any bundled scripts. The model reads the descriptions of every available skill and, when a task matches, loads the full instructions into context, only then. A skill you never trigger costs one line of description. That property is what makes skills the right place for testing procedure: a red-green-refactor rule set does not belong in your CLAUDE.md (where it would be reread on every CSS tweak), but it does belong somewhere the agent picks up automatically the moment a task says “add a feature” or “fix a bug.”
The Shortlist: Eight Testing Skill Categories
Rather than name-drop specific published skills that may or may not still exist by the time you read this, here are the categories worth having, either adopted from a pack you trust or authored yourself. Each solves a distinct failure mode. Pick the ones that map to how your agent actually fails today; do not install all eight at once.
| Skill | What it does | When it fires |
|---|---|---|
| test-plan-writer | Reads a spec or story, produces a written test plan: happy path, edge cases, error paths, and what is deliberately out of scope, before any code is written. | Before implementation, on any story with acceptance criteria. |
| failing-test-first | Enforces red-green-refactor. Writes one failing test, gets human approval, then writes the minimum implementation to pass. Refuses to soften the assertion. | On any story that adds or changes observable behavior. |
| coverage-gap-finder | Reads coverage output, ranks uncovered branches by risk (public API, error paths, complex conditionals), and proposes the two or three highest-value tests to add. | After a story lands, or as a scheduled sweep on a module. |
| flaky-test-triage | Reads recent CI history, identifies tests that fail intermittently vs tests that fail consistently, and separates real regressions from flakes needing quarantine or rewrite. | When a CI run fails, or on a weekly maintenance pass. |
| e2e-scenario-writer | Turns a user story into an end-to-end scenario, scaffolds a Playwright or Cypress test, and stubs the setup/teardown, with realistic selectors instead of xpath fragments. | On a story flagged as user-facing, or when explicitly asked for an e2e. |
| mock-boundary-review | Reviews a PR's test changes for over-mocking: an integration test that mocks the very thing it claims to integrate with, or a unit test that has mocked away the code under test. | On any PR that touches tests, before the human reviewer. |
| snapshot-hygiene | Deletes orphan snapshots, flags snapshot tests whose diffs the agent is about to auto-accept, and refuses to update a snapshot for a change that has no accompanying assertion. | On any change that regenerates snapshots. |
| test-refactor-safety | Before a refactor, verifies that tests actually cover the surface being changed. If coverage is thin, blocks and asks for tests to be added first, so the refactor has a real safety net. | On any story tagged as a refactor. |
These categories are deliberate: no specific published skill names, because the ecosystem is young enough that the good ones move around. Write your own SKILL.md against the pattern, or adapt a skill from a pack you already trust.
Your AI workspace for shipping software.
Download AIDEN free and point it at your existing Claude Code or Codex setup. No credit card, running in minutes.
Download AIDEN freeFree to start · macOS 12+ · No credit card required
The Failing-Test-First Pattern: Why This One Matters Most
Skills vs CLAUDE.md Rules
A reasonable objection: “Can't I just put ‘write a failing test first, do not mock the module under test’ in my CLAUDE.md?” You can, and for a small enough project it is fine. It stops working for two reasons as the project grows.
CLAUDE.md is read on every task
CLAUDE.md is a wall of guidance
Use CLAUDE.md for the always-true facts (test command, package manager, folder layout) and reserve skills for the procedures that apply to a subset of tasks. A short pointer in CLAUDE.md like “For any behavior change, the failing-test-first skill applies” is a useful bridge.
Skills vs MCP Servers for Testing
Skills and MCP both show up when people talk about testing setups, and they are not interchangeable. They solve different layers of the same problem, and a mature testing setup uses both.
| Layer | Skill | MCP server |
|---|---|---|
| What it provides | Procedure: how the agent should approach testing (red-green order, mock discipline, coverage gates). | Capability: the ability to run the test runner, read CI history, query coverage output, or hit a Playwright browser. |
| When to reach for it | When the agent's testing behavior is wrong: it cheats, it over-mocks, it writes tests after the code. | When the agent can't reach the data or action it needs: no way to see the last 20 CI runs, no way to actually execute the runner. |
| Where it lives | ~/.claude/skills/<name>/SKILL.md or .claude/skills/ inside a repo. | ~/.claude.json (claude mcp add) or the repo's .mcp.json. |
| Example | failing-test-first, mock-boundary-review, snapshot-hygiene. | A CI-history MCP server the flaky-test-triage skill queries; a coverage MCP the coverage-gap-finder skill reads. |
How AIDEN Loads Testing Skills
AIDEN is a cockpit over your coding-agent CLIs: it runs your local Claude Code and Codex behind a spec-first kanban with a PR per story, using your own inference (your Claude or Codex subscription, or your API key). Because AIDEN launches your existing CLI rather than replacing it, every skill you have in ~/.claude/skills or a project's .claude/skills is available to every agent AIDEN launches, no separate configuration.
The structural piece AIDEN adds is exactly what testing skills need to work well: every story gets an approved spec (which is what test-plan-writer and failing-test-first read for acceptance criteria), its own worktree (so a failing test on one story does not pollute another), and a fresh session (so the skill's rules load into a clean window instead of a marathon session cluttered with earlier wrong turns). Skills stay yours; AIDEN just makes sure they fire under the conditions where they actually change behavior. See agent skills for the full mechanics and context engineering for why the clean-window part matters as much as the skill itself.