Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Playwright E2E Test Writer and Flaky Test Fixer

    1

    Writes Playwright end-to-end tests for real user journeys, fixes flaky tests from traces, and sets up CI sharding. Verdict STABLE, FLAKY or BROKEN.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Playwright E2E Test Writer and Flaky Test Fixer

    Playwright E2E Test Writer and Flaky Test Fixer

    Example session with this skill installed

    Our checkout test in tests/checkout.spec.ts passes locally but fails on CI about once every few runs. The cart is $50.00 and the SAVE10 coupon should take 10% off. Find the cause, fix it, and prove it is stable.

    • Read your context and instructions
    • Compiled the playwright e2e test

    Playwright E2E: shop-web (Next.js) — FLAKY → STABLE after fix

    Playwright version as reported by npx playwright --version in your repo · browsers: chromium, webkit

    Diagnosis

    Reproduced with npx playwright test tests/checkout.spec.ts --repeat-each=20 --retries=0:

    3 of 20 runs failed on CI-like settings (--workers=4).

    TestCauseEvidence (trace step)Fix
    checkout › applies couponRACEclick Apply fired while GET /api/cart was pending; total re-rendered to old valuewait for the cart response before asserting
    checkout › applies couponWRONG-LOCATORlocator('.total') matched 2 elements (summary + mobile drawer)getByRole('region', { name: 'Order summary' }) scope

    The waitForTimeout(2000) on line 31 hid the race locally and was removed.

    Key code

    test('applies coupon', async ({ page }) => {
      await page.goto('/cart');
      const summary = page.getByRole('region', { name: 'Order summary' });
      await expect(summary.getByText('Subtotal')).toBeVisible();
    
      const cartUpdated = page.waitForResponse(r =>
        r.url().includes('/api/cart') && r.request().method() === 'POST');
      await page.getByLabel('Coupon code').fill('SAVE10');
      await page.getByRole('button', { name: 'Apply' }).click();
      await cartUpdated;
    
      await expect(summary.getByTestId('order-total')).toHaveText('$45.00');
    });
    

    Your prompt gave a $50.00 cart and a 10% coupon, so the expected total is $45.00.

    Verify

    --repeat-each=20 --retries=0: 20 of 20 passed, 0 flaky.

    Changes

    • tests/checkout.spec.ts: removed fixed sleep, scoped locators, awaited response
    • eslint: added @typescript-eslint/no-floating-promises
    • playwright.config.ts: trace: 'on-first-retry', retries CI-only (was 3 everywhere)

    Commands to reproduce

    npx playwright test tests/checkout.spec.ts --repeat-each=20 --retries=0 --workers=4
    npx playwright show-report
    

    Next steps

    1. Add --fail-on-flaky-tests to the CI run once the suite is clean.
    2. Create the coupon via API per test instead of relying on a shared seeded coupon.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    End-to-end suites usually fail in one of two ways: nobody writes them, or they get written fast with CSS selectors, fixed sleeps and shared test data, and then fail on CI one run in five until the team stops trusting them. This skill gives your coding agent a fixed method for Playwright that follows the playwright.dev guidance.

    What it does:

    • Detects your framework and any existing Playwright setup, or initializes one with baseURL, webServer, browser projects, CI-only retries and trace on first retry
    • Picks 3 to 5 critical user journeys and writes one spec per journey with role, label and text locators, test IDs only as a fallback
    • Uses auto-retrying web-first assertions and bans fixed sleeps and unawaited calls
    • Sets up login once through an auth setup project and storageState, with per-test data created and cleaned up through the API
    • Mocks third-party services with page.route
    • In fix mode, reproduces flakes with repeat runs, reads the trace, classifies the cause (race, animation, shared state, order dependency, unawaited promise, wrong locator, CI timing, or a real app bug) and verifies the fix
    • Adds a GitHub Actions workflow with sharding and a merged HTML report artifact
    • Ends with a STABLE, FLAKY or BROKEN verdict based on actual run counts

    Who it is for: frontend and full-stack developers, QA engineers and teams adding or rescuing a Playwright suite. TypeScript by default, with notes for pytest-playwright.

    Honesty: the skill tells the agent to check versions and flags against playwright.dev or the CLI help, report only pass and fail counts it actually observed, and label real app bugs instead of hiding them behind retries or skips. The reference file reflects the docs as of October 2026.

    The skill needs a runnable app (local or staging) and test credentials or seed data; it will not run against production with real payments. It follows playwright.dev as of October 2026, so new releases may add or change flags. Pass rates come only from runs the agent performs in your environment.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 29 days ago

    Requires

    @playwright/test or pytest-playwright
    Playwright browsers
    Python
    playwright
    Node.js
    macOS
    Windows

    Permissions

    Browser
    Read Files
    Network Access
    Environment Variables
    Listed29 days ago

    What's inside

    Frequently Asked Questions

    SKILL.md (the method, verdict rules, output template and checklist) and references/playwright-patterns.md (config template, auth setup project, flake cause table, GitHub Actions single-job and sharded workflows, and the doc sources, as of October 2026).

    Any agent that reads SKILL.md skills, such as Claude Code, Codex CLI, Cursor, VS Code Copilot and Gemini CLI. The agent needs terminal access to run Playwright and read traces.

    Unzip the folder into your agent's skills directory (for Claude Code, .claude/skills/ in the project or your home folder) and ask for e2e tests or a flaky test fix. Your project needs Node.js, or Python for the pytest-playwright variant.

    It cannot test an app it cannot start or reach, and it needs a test account or seed data you provide. Visual comparison and mobile native apps are out of scope beyond the notes given. Results depend on the agent actually running the commands.

    A plain prompt often produces CSS selectors, fixed waits and retries that hide flakes. This skill enforces a locator order, web-first assertions, isolated data, a named root cause for every flake, repeat-run verification and a verdict tied to real run counts.

    Yes. TypeScript is the default, and the skill includes a short pytest-playwright variant covering setup, locators, login state and traces for Python projects.

    New in Testing & Debugging