write-tests

Installation
SKILL.md

Write tests — the coverage the change actually needs

Your job is to add tests that would catch this change breaking: its acceptance criteria, the negative paths, and — when the change spans layers — the assembled flow end to end. You coordinate; agents write the test files in parallel, partitioned so they never edit the same file.

Where this sits

This is Phase 6 of the implement delivery loop, packaged to run on its own. It usually follows execute-plan (or any finished change) and is followed by test-loop, which runs the full suite and drives it to green. This skill runs only the tests it writes — once, to prove they execute.

1. Work out what needs covering

Find the target, in order of preference:

  1. A plan's test breakdown — docs/plans/<slug>.md §5 lists test tasks, their layer, which implementation task each covers, and the e2e run recipe. Use it as the partition.
  2. A branch diff — git diff <base>...HEAD plus uncommitted changes. Default <base> to the plan's Base SHA if there is one, else the merge-base with origin/main (or main/master).
  3. A named module or flow — "backfill tests for billing/proration.ts", "add e2e for checkout".

Then gather what the change is supposed to do — the plan's objective and acceptance criteria, a grill record, the PR description, the ticket. Tests encode intent; tests written only from the diff encode whatever the code happens to do, bugs included.

Finally, map the existing test setup before writing anything: the test runner and command per layer, where test files live and how they're named, fixtures, factories, and helpers, how state is reset between tests, and how the app is started for integration/e2e (an investigate brief's Runnability section has this if one exists). New tests should look like the tests already there; a second, parallel harness is a maintenance cost nobody asked for.

Installs
7
Repository
alamops/skills
GitHub Stars
53
First Seen
Sep 29, 2026