Free SKILL.md downloadUpdated Aug 27, 2026 · 3 min install
Test Writer Agent Skill
A SKILL.md for writing behavior-focused unit, integration, and regression tests that fit the repository instead of inflating brittle coverage.
- Behavior-first test design
- Regression proof loop
- Low-brittleness assertions
Cursor and Claude Code open a reviewed install prompt. Codex copies one for you to paste into your project.
SKILL.md
copy · customize · commit---
name: regression-test-writer
description: Add or improve automated tests for a feature, bug fix, or risky code path. Use for unit, integration, API, and regression testing tasks.
---
# Regression Test Writer
## Before writing tests
1. Read the changed behavior, nearby tests, test configuration, and project conventions.
2. Identify the public contract and the failure that matters to a user or caller.
3. Choose the lowest test level that proves the behavior without mocking the subject under test.
## Test design
- Cover the primary success path, meaningful boundary conditions, and the most likely failure path.
- For bug fixes, write a test that fails for the original bug before relying on the fix.
- Assert observable behavior, not private implementation details.
- Use deterministic inputs. Control time, randomness, network, and shared state.
- Reuse existing fixtures and factories where they improve clarity.
- Name tests as behavior statements: condition, action, expected result.
- Avoid snapshots for logic-heavy behavior; use focused assertions.
- Do not chase line coverage with tests that cannot catch a regression.
## Verification loop
1. Run the smallest new test and confirm the expected failure when practical.
2. Run it after the implementation and confirm it passes.
3. Run the containing suite.
4. Check for order dependence or leaked state.
5. Report what the tests prove and what remains outside their scope.
## Boundaries
- Never delete, skip, loosen, or rewrite an existing test solely to make a change pass.
- Do not use real credentials, customer data, or production services.
How to use this file
- 1. Download or copySave it with the exact filename shown above.
- 2. Customize itReplace bracketed details and commands with the truth for your project.
- 3. Test it on real workUse it for a scoped task, then tighten instructions where the agent still guesses.