Skip to content

commandTesting

Plan Tests

Produces a test plan for a feature: the cases, the edge conditions, the data needed and which level each test belongs to.

npx workspacetemplates add plan-tests --tool claude-code

Writes 1 file to .claude/commands/

.claude/commands/plan-tests.md15 lines · 1.1 KBFile
---
description: "Produces a test plan for a feature: the cases, the edge conditions, the data needed and which level each test belongs to."
argument-hint: "[feature name, file or ticket]"
---

Write a test plan for: $ARGUMENTS

1. Read the code or spec for the feature, plus its callers and the data it touches. Note inputs, outputs, state changes, external calls and permissions.
2. List cases in four groups: normal paths, boundaries (empty, one, many, limit, limit plus one), failures (invalid input, timeouts, dependency down, duplicate requests, partial writes) and rules that depend on role, time or locale.
3. For each case give: a one-line description, the data it needs, the expected result, and the level (unit, integration, end-to-end) with a reason. Push cases down to the cheapest level that still catches the problem.
4. Identify what must be mocked or seeded and what needs a real service.
5. Mark each case with a priority: must have, should have, nice to have.
6. Note what is deliberately not tested.

Output a Markdown table per group followed by a short list of risks. Do not write test code or edit files. Ask which priority levels to implement first.

What it does

Writing tests without a plan leads to ten copies of the happy path. This command reads the feature and lists what could go wrong, then sorts each case into unit, integration or end-to-end so effort lands in the cheapest layer that can catch it.

The plan is a document, not code. You review it, cut what you do not want and then ask for the tests.

Example

you › /plan-tests password reset flow

agent › 22 cases in 4 groups.
Unit (9): token expiry boundary, token reuse, weak new password.
Integration (8): reset email queued once, old sessions revoked.
E2E (2): full reset from link to login.
Must have: 14. Not tested: email provider delivery.
Implement the must-haves first?

Questions

Does it write the tests?
No. It writes the plan only, so you can trim it before any code exists.
How does it pick the test level?
It prefers the cheapest layer that can still detect the failure, and states the reason for each case.
  • Add Edge Case Tests

    CommandTesting

    Free
  • Add Regression Test

    CommandTesting

    Free
  • Coverage Gaps

    CommandTesting

    Free
  • E2E Scenario

    CommandTesting

    Free