defprod-create-ui-tests

Generates Playwright or Cypress e2e tests from DefProd user stories with UI surface.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/defprod1/defprod-skills --skill defprod-create-ui-tests-defprod1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: defprod-create-ui-tests
Source: https://github.com/defprod1/defprod-skills/tree/main/skills/defprod-create-ui-tests
Command: npx skills add https://github.com/defprod1/defprod-skills --skill defprod-create-ui-tests-defprod1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing end-to-end browser tests that stay aligned with product definitions is tedious and error-prone. This Skill reads user stories and acceptance criteria directly from DefProd and generates one test file per UI story, keeping tests traceable to the product definition. ## Core Features & Use Cases - Story-driven test generation: Creates one Playwright or Cypress spec file per in-scope user story, with test cases mapped to individual acceptance criteria. - Surface filtering: Selects only stories whose surface is ui (explicit or inferred from the story-key prefix), skipping API, MCP, and CLI stories for sibling skills. - Testability analysis and coverage reporting: Classifies acceptance criteria as testable or untestable, runs the generated tests, fixes test bugs, and reports a per-story coverage summary. - Use Case: Given a DefProd product with a BILLING area containing UI stories, run the skill to produce Playwright specs in your e2e directory, execute them, and receive a coverage table flagging untestable criteria. ## Quick Start Ask your AI agent to run /defprod-create-ui-tests with your product name and area key to generate and run browser tests for that area's UI stories.

Frequently Asked Questions about defprod-create-ui-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Playwright tests from user stories?

Invoke the skill with a product name and area key, for example /defprod-create-ui-tests my-product BILLING. It fetches stories and acceptance criteria from the DefProd MCP server, then writes one Playwright spec file per UI story with tests mapped to each criterion.

Does this skill support Cypress as well as Playwright?

Yes, Cypress is supported alongside Playwright. The skill detects your framework by looking for playwright.config.ts or cypress.config.ts and matching dependencies, then generates tests following your project's existing patterns.

Which user stories are included when generating UI tests?

Only stories whose surface is ui are included, either set explicitly or inferred when the story-key prefix is not API, MCP, or CLI. Stories on other surfaces are skipped and logged, with a suggestion to use the matching sibling skill.

What happens if e2e tests already exist for some stories?

The skill detects existing tests and asks whether to fill gaps, replace all tests, or cancel. This prevents accidentally overwriting coverage you already have.

What happens when an acceptance criterion cannot be automated?

Untestable criteria, such as backend-only logic or external integrations, are documented with a specific reason in the final report. The skill still creates a test file covering the remaining testable criteria for that story.

Will the skill modify my production code to make tests pass?

No, the skill only creates and fixes test code. If a failing test reveals a genuine product bug, it flags the issue to you instead of changing production code.