Engineering TestingPlaywrightGeneration

Playwright Pro — Generate

Generate Playwright tests from user flows and page analysis.

$skillfish add ~skills/playwright-pro-generate

Real Conversations

See how the Playwright Pro — Generate skill responds to actual requests. These are representative examples of what your AI agent will produce.

You

Generate Playwright tests for our checkout flow. User adds item to cart, enters shipping address, pays with Stripe, gets order confirmation. We use Next.js App Router with TypeScript.

Agent

Scanning your codebase for routes and existing fixtures, then generating from the checkout/ templates. This skill includes executable scripts — I'll need your permission before running them.

Found: playwright.config.ts with baseURL: http://localhost:3000, e2e/fixtures/index.ts with authedPage fixture. Using that for auth.

Generated: e2e/checkout.spec.ts

import { test, expect } from '../fixtures';

test.describe('Checkout Flow', () => {
  test('should complete purchase end-to-end', async ({ authedPage: page }) => {
    await page.goto('/products/widget-pro');
    await page.getByRole('button', { name: 'Add to cart' }).click();
    await expect(page.getByRole('status', { name: 'Cart' })).toHaveText('1');

    await page.goto('/checkout');
    await page.getByLabel('Full name').fill('Taylor Kim');
    await page.getByLabel('Address').fill('123 Main St');

    // Stripe iframe
    const stripeFrame = page.frameLocator('[name^="__privateStripeFrame"]').first();
    await stripeFrame.getByPlaceholder('Card number').fill('4242424242424242');
    await stripeFrame.getByPlaceholder('MM / YY').fill('12/26');
    await stripeFrame.getByPlaceholder('CVC').fill('123');

    await page.getByRole('button', { name: 'Place order' }).click();
    await page.waitForResponse(r => r.url().includes('/api/orders') && r.status() === 201);
    await expect(page.getByRole('heading', { name: /order confirmed/i })).toBeVisible();
  });

  test('should show error for declined card', async ({ authedPage: page }) => {
    // uses Stripe test card 4000000000000002
  });
});

Run result: 5 tests passed (8.3s) — includes empty-cart guard, coupon code, and order history tests.

Want me to add the order history verification test?

Get Started

How to install and use this skill in your preferred environment.

Skills are designed for AI coding agents (Claude Code, Cursor, Windsurf) and IDE-based workflows where the agent can read files, run scripts, and act on your codebase. Web-based AI can use the knowledge and frameworks, but won't have tool access.

Models & Context

Which AI models and context windows work best with this skill.

Recommended Models

Best
Claude Opus 4 Claude Sonnet 4 GPT-4.1 Gemini 2.5 Pro Grok 3 Kimi K2
Good
Claude Haiku 4.5 GPT-4.1 mini Gemini 2.5 Flash Grok 3 mini

Larger models produce more detailed, production-ready outputs.

Context Window

This skill's SKILL.md is typically 3–10 KB — fits in any modern context window.

8K Skill only
32K+ Skill + conversation
100K+ Skill + references + codebase

All current frontier models (Claude, GPT, Gemini) support 100K+ context. Use the full window for complex multi-service work.

Pro tips for best results

1

Be specific

Include numbers — users, budget, RPS — so the skill can size the architecture.

2

Share constraints

Compliance needs, team size, and existing stack all improve the output.

3

Iterate

Start with a high-level design, then ask follow-ups for IaC, cost analysis, or security review.

4

Combine skills

Pair with companion skills below for end-to-end coverage.

Ready to try Playwright Pro — Generate?

Install the skill and start getting expert-level guidance in your workflow — any agent, any IDE.

$skillfish add ~skills/playwright-pro-generate
← Browse all 169 skills