Convert a developer feature ticket into lean, ticket-ready Gherkin test cases for paste into a QA ticket. Produces 1 main success scenario + 2-4 edge cases max, merges near-identical data variants into one case with annotation, flags ambiguity inline with [QUESTION:] tags. Output is pure ticket-ready text — no code, no file paths. Use when user invokes /pw-kit:create-test-cases, says they have a dev card without a QA card yet, asks to "draft test cases", "write Gherkin scenarios from this feature", or wants to prepare QA scope before implementation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pw-kit:create-test-casesWhen to use
Trigger phrases: "/pw-kit:create-test-cases", "create test cases", "draft test cases", "Gherkin scenarios", "QA scope", "test cases for ticket", "convert dev card to test cases", "test case planning". Slash command only — does not auto-activate.
This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Follow this 4-phase workflow when a user has a feature ticket but no QA test cases yet, and wants you to draft them. The output is **ticket-paste-ready text only** — no code, no file paths, no implementation. This skill produces the intermediate artifact that feeds `/pw-kit:new-test`.
Follow this 4-phase workflow when a user has a feature ticket but no QA test cases yet, and wants you to draft them. The output is ticket-paste-ready text only — no code, no file paths, no implementation. This skill produces the intermediate artifact that feeds /pw-kit:new-test.
Before starting, ensure you have:
If the dev ticket isn't pasted into the conversation, ask for it before starting.
Extract from the ticket:
Note any ambiguity. Do not guess — flag with [QUESTION: ...] for the user to answer before the test cases are final.
Search the test repo for existing tests in the same feature area:
ls tests/<feature>/ | head -20
grep -r "test.describe" tests/<feature>/ | head -10
This tells you:
Anchor your draft against this calibration. A 3-scenario ticket in a feature area where similar features have 8 tests probably means you're missing edge cases. A 12-scenario draft in a feature area where similar features have 4 tests probably means you're over-engineering.
Produce 1 main success scenario + 2-4 edge cases max. Resist the urge to test every possible variation.
When per test case — forces atomic action focus[Data variants: ...] annotationAnd/Then steps, not extra test cases — only branch into a new case when the user action differsGiven (past), When (present, exactly one), And (any number), Then (present)[QUESTION: <specific clarification needed>]Scenario 1: <Main happy path description>
Given <precondition in past tense>
And <additional preconditions if any>
When <the one action under test>
Then <expected outcome>
And <additional expected outcomes if any>
Scenario 2: <Edge case description>
Given <precondition>
When <the action>
Then <expected outcome>
[QUESTION: <if any specific ambiguity here>]
Scenario 3: <Edge case description>
Given <precondition>
When <the action>
Then <expected outcome>
[Data variants:
- Input A → Output X
- Input B → Output Y
- Input C → Output Z]
Present the draft to the user as ticket-paste-ready text. Ask:
[QUESTION:] markers resolvable now?Iterate based on feedback. Produce a clean final version after the user signs off — strip any [QUESTION:] markers that have been resolved (incorporate the answers), keep ones still open as explicit follow-ups.
Dev ticket: "User can mark a customer as VIP. Star badge appears in grid. VIP filter shows only VIP customers."
Scenario 1: Mark customer as VIP
Given User is on the customer edit page for a non-VIP customer
When User turns on the VIP toggle
And User saves the record
Then a success message appears
And the star badge is visible next to the customer name in the grid
Scenario 2: Unmark a VIP customer
Given User is on the customer edit page for a VIP customer
When User turns off the VIP toggle
And User saves the record
Then a success message appears
And the star badge is no longer visible in the grid
Scenario 3: VIP filter shows only VIP customers
Given User is on the customers grid
And the grid contains both VIP and non-VIP customers
When User turns on the VIP-only filter switch
Then only customers with the star badge are displayed
And the count reflects only the VIP customers
[QUESTION: Does the filter persist on page reload, or reset to default?]
/pw-kit:new-test after the QA ticket is created.| Mistake | Fix |
|---|---|
| Including code blocks in the output | Strip all code; this is for a QA ticket, not a developer ticket |
| One test case per data variant (10 scenarios for 10 inputs) | Merge with [Data variants: ...] annotation |
Multiple When steps per scenario | Split into multiple scenarios |
| Generic step text like "User performs the action" | Use specific verbs: "User clicks Save", "User enters an invalid email" |
| Skipping the calibration phase | Always check what similar features look like before drafting |
Filling in [QUESTION:] with a guess | Leave ambiguity flagged for the user; resolved questions become real step text |
Additional reference docs (recipes, deep-dives, edge cases) will be added based on team feedback. PRs welcome.
npx claudepluginhub antongulin/pw-kit --plugin pw-kitGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.