Skip to main content
command CX Codex

test-scenarios — Claude Code command: what it does, how to install

Turns user stories and feature specifications into structured test scenarios covering happy paths, edge cases, and errors.

MIT ★ 28,211 updated 2026-10-16

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add phuryn/pm-skills
/plugin install pm-execution@pm-skills
Open on GitHub

What test-scenarios does

The /test-scenarios command takes acceptance criteria, PRD sections, or feature descriptions and structures them into QA-ready scenarios. The resulting markdown document outlines roles, preconditions, postconditions, and step-by-step action tables.

Output covers standard flows along with boundary conditions, error handling, security checks, and load concerns when applicable. For API specifications, it maps timeout handling, malformed requests, rate limits, and authentication failures.

The command also compiles a requirement coverage matrix and defines needed test data. If execution requires third-party service mocks or dedicated environments, the output flags those dependencies directly.

What it helps with

  • convert acceptance criteria into executable QA test cases
  • document edge cases and failure modes for feature specs
  • map requirement coverage across happy and error paths
  • identify required test data and service mocking needs

Example prompts for the agent

  • /test-scenarios User can reset their password via email link
  • /test-scenarios Checkout flow: applying coupon codes and card payment failures
  • /test-scenarios API specification for JWT authentication and rate limiting

How to install test-scenarios

1Plugin marketplace

/plugin marketplace add phuryn/pm-skills
/plugin install pm-execution@pm-skills

2Manually: put the files in place

.claude/commands/test-scenarios.md

Call it with /test-scenarios. For all projects use ~/.claude/commands/

Questions about test-scenarios

How to install test-scenarios in Claude Code?

Run /plugin marketplace add phuryn/pm-skills and then install it with /plugin install pm-execution@pm-skills. You can also configure the command directly via .claude/commands/test-scenarios.md.

What does the test-scenarios command do?

It processes user stories or feature requirements into structured markdown test scenarios, edge cases, and a requirement coverage matrix.

What details are included in each generated scenario?

Each scenario contains the user role, preconditions, priority, postconditions, and a step-by-step table pairing user actions with expected system responses.

Source text

test-scenarios.md · MIT
---
description: Generate comprehensive test scenarios from user stories or feature specs — happy paths, edge cases, and error handling
argument-hint: "<user stories, feature spec, or description>"
---

# /test-scenarios -- Test Scenario Generator

Turn user stories or feature descriptions into comprehensive test scenarios that QA can execute immediately. Covers happy paths, edge cases, error handling, and cross-browser/device considerations.

## Invocation

```
/test-scenarios [paste user stories or acceptance criteria]
/test-scenarios [upload a PRD or feature spec]
/test-scenarios User can reset their password via email link
```

## Workflow

### Step 1: Accept Input

Accept: user stories, acceptance criteria, PRD sections, feature descriptions, or any specification of expected behavior.

### Step 2: Generate Test Scenarios

Apply the **test-scenarios** skill:

For each user story or requirement, generate:

**Happy Path Scenarios**: The expected user flow works correctly
**Edge Cases**: Boundary conditions, unusual inputs, concurrent operations
**Error Scenarios**: What happens when things go wrong
**Security Scenarios**: If applicable (auth, permissions, data access)
**Performance Scenarios**: If applicable (load, timeout, large data)

### Step 3: Structure Output

```
## Test Scenarios: [Feature]

**Source**: [user stories / PRD / description]
**Total scenarios**: [count]
**Coverage**: [happy path / edge cases / errors / security / performance]

### Scenario 1: [Title]
**Tests**: [which story or requirement]
**Preconditions**: [setup needed]
**User role**: [who is performing this]

| Step | Action | Expected Result |
|------|--------|----------------|
| 1 | [user action] | [expected system response] |
| 2 | [user action] | [expected system response] |

**Postconditions**: [state after completion]
**Priority**: [Critical / High / Medium / Low]

---
[Repeat for each scenario]

### Coverage Matrix
| Requirement | Happy Path | Edge Cases | Error Handling | Notes |
|------------|-----------|-----------|---------------|-------|

### Test Data Requirements
[What test data is needed to execute these scenarios]
```

Save as markdown.

### Step 4: Offer Next Steps

- "Want me to **generate the test data** for these scenarios?"
- "Should I **add more edge cases** for any specific scenario?"
- "Want me to **create the user stories** that these scenarios test?"

## Notes

- Happy paths first, then layer in edge cases — ensure basic flows work before testing boundaries
- Every acceptance criterion from the original story should map to at least one test scenario
- Include both positive tests (it works) and negative tests (it fails gracefully)
- For APIs, include scenarios for rate limiting, timeout, malformed requests, and auth failures
- Flag scenarios that require specific test environments or third-party service mocking

© Paweł Huryn · MIT · phuryn/pm-skills

Similar slash commands

All slash commands for Testing and QA →

From the same set120

The whole set →
red-team-prd The red-team-prd command for Claude Code extracts and challenges assumptions that could break a plan, then suggests the cheapest test for each. CX Codex +1 ★ 28,211repo stars generate-data generate-data generates realistic mock datasets in CSV, JSON, or SQL using Python scripts with custom distributions and constraints. CX Codex +1 ★ 28,211repo stars write-query write-query turns plain language descriptions into SQL queries across BigQuery, PostgreSQL, MySQL and other dialects. Upload a schema or describe your tables, then ask your question. CX Codex +1 ★ 28,211repo stars value-proposition value-proposition maps a product or feature to a six-part template: target user, their job, current friction, your solution, resulting outcome, and why you beat alternatives. CX Codex +1 ★ 28,211repo stars meeting-notes Turns a transcript or rough meeting notes into structured minutes with decisions, assigned actions, open questions, and next steps. CX Codex +1 ★ 28,211repo stars review-resume review-resume is a Claude Code command that evaluates product manager resumes against best practices and gives three priority improvements with examples. CX Codex +1 ★ 28,211repo stars analyze-cohorts analyze-cohorts runs cohort retention analysis on CSV files or generates SQL frameworks to measure feature adoption. CX Codex +1 ★ 28,211repo stars transform-roadmap transform-roadmap is a Claude Code command that turns a feature list or existing roadmap into an outcome-led plan with success measures and strategic context for product planning. CX Codex +1 ★ 28,211repo stars

Project sponsors

Companies that keep this analytics open