generate

Generate Playwright test files from user requirements and codebase patterns.

Updated Nov 3, 2016
One-click install
npx skills add https://github.com/xleliberty/mydotfiles --skill generate-xleliberty
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generate
Source: https://github.com/xleliberty/mydotfiles/tree/main/.config/.claude/plugins/cache/claude-code-skills/pw/2.1.2/skills/generate
Command: npx skills add https://github.com/xleliberty/mydotfiles --skill generate-xleliberty

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill eliminates the manual effort of writing boilerplate test code by automatically generating comprehensive Playwright test suites based on user stories, component paths, or feature descriptions.

Core Features & Use Cases

  • Context-Aware Generation: Analyzes existing project configurations, fixtures, and page objects to ensure generated tests follow established conventions.
  • Template-Driven Testing: Utilizes specialized templates for common scenarios like authentication, CRUD operations, and API mocking to ensure high-quality, maintainable code.
  • Use Case: When you add a new user profile component, simply ask the skill to generate tests for it, and it will produce a spec file with appropriate locators and assertions based on your existing project structure.

Quick Start

Use the generate skill to create end-to-end tests for the user login feature based on the existing authentication flow.

Frequently Asked Questions about generate

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

FAQPage Schema
How do I generate Playwright tests for a new web application feature?

To generate Playwright tests, you provide user stories, component paths, or feature descriptions. The skill analyzes existing project configurations, fixtures, and page objects to produce production-ready spec files with appropriate locators and assertions.

Can I automatically create E2E tests that follow my existing TypeScript project conventions?

Yes, you can create E2E tests that adhere to project-specific TypeScript or JavaScript conventions. The skill analyzes your existing codebase patterns to ensure generated web-first assertions and semantic locators match your established project structure.

Does the generated Playwright test code include API mocking and UI interaction verification?

Yes, the generated Playwright test code includes UI interaction verification and API mocking. It utilizes specialized template-driven testing scenarios for common operations like authentication and CRUD to ensure high-quality, maintainable code.

What is the best way to automate boilerplate test code generation for UI interactions?

The best way to automate boilerplate test code generation is by using context-aware generation based on user stories. This eliminates manual effort by automatically producing comprehensive Playwright test suites that follow established conventions.

How do I ensure web-first assertions and semantic locators are used in my generated test files?

To ensure web-first assertions and semantic locators are used, the skill applies strict requirements during test file generation. It analyzes your existing codebase patterns to satisfy these criteria automatically in the output spec files.