agentleFS
ak-shipak-ship/fullstack-agent-skills/skills/browser-qa/SKILL.md

browser-qa

Skill0 starsChanged 6 months agoMITView on GitHub

Drive a real browser (Playwright) to validate user flows end-to-end — click buttons, fill forms, assert on rendered output, screenshot the moment a step breaks. Use when the user says "test this flow", "run the e2e tests", "verify the signup works", "qa my app", "does the checkout work", or asks Claude to confirm a UI change actually behaves correctly in a browser. Closes the gap between "code compiles" and "user flow works".

  • Installs packages

24 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use opensource-pipeline, security-bounty-hunter and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • TironFoxSkill

    opensource-pipeline

    Open-source pipeline: fork, sanitize, and package private projects for safe public release. Chains 3 agents (forker, sanitizer, packager). Triggers: '/opensource', 'open source this', 'make this public', 'prepare for open source'.

    Also in 3 projects that use this

  • RojiosSkill

    security-bounty-hunter

    Hunt for exploitable, bounty-worthy security issues in repositories. Focuses on remotely reachable vulnerabilities that qualify for real reports instead of noisy local-only findings.

    Also in 3 projects that use this

  • Exploration-labsSkill

    token-budget-advisor

    Proactive token budget assessment and task chunking strategy. Use this skill when queries involve multiple large file uploads, requests for comprehensive multi-document analysis, complex multi-step workflows with heavy research (10+ tool calls), phrases like "complete analysis", "full audit", "thorough review", "deep dive", or tasks combining extensive research with large output artifacts. This skill helps assess token consumption risk early and recommend chunking strategies before beginning work.

    Also in 3 projects that use this

  • ElasticSkill

    accessibility

    Accessibility guidance for Kibana. Use this skill when working with or reviewing EUI components, resolving a11y-related (@elastic/eui) ESLint issues, and ensuring proper use of ARIA attributes, focus management, keyboard interactions, and accessible naming conventions.

    Also in 3 projects that use this

  • nilssonrSkill

    seo

    Full SEO workflow for auditing pages and creating SEO-optimized content. Provides checklists with educational explanations aligned with Google Search Central documentation.

    Also in 3 projects that use this

  • Microsoft AzureSkill

    git-workflow

    Squad branching model: dev-first workflow with insiders preview channel

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

24 rules. 0 are common, 9 are distinctive, and 15 are very specific to this project.

  • 0

    Common

    Most of the 23 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 15

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After implementing a UI change, before declaring it done

    line 13
  2. Distinctive:

    When a unit test passes but the user says "it's still broken"

    line 14
  3. Very specific:

    Do *not* trigger for: pure logic tests (use test-architect), API contract tests (use api-architect), or for code that has no UI surface.

    line 17
  4. Distinctive:

    No flaky waits — every wait is anchored to an observable condition (a network response, a visible element, a URL change).

    line 25
  5. Very specific:

    Read the existing test directory (tests/, e2e/, playwright/) to learn the project's conventions before writing new tests.

    line 34
  6. Distinctive:

    Before writing the test, write the steps in plain English.

    line 38
  7. Distinctive:

    Use Playwright's built-in locators in this priority order:

    line 54
  8. Very specific:

    Never use XPath. Never use page.locator('div > div > div:nth-child(3)').

    line 61
  9. Very specific:

    After a click that submits a form → await page.waitForResponse(r => r.url().includes('/api/auth/signup') && r.ok())

    line 67
  10. Very specific:

    After a navigation → await expect(page).toHaveURL('/onboarding')

    line 68
  11. Very specific:

    After a state change → await expect(page.getByText('Welcome')).toBeVisible()

    line 69
  12. Very specific:

    Never await page.waitForTimeout(2000).

    line 71
  13. Very specific:

    When a test fails, point the user at the trace: npx playwright show-trace test-results/<name>/trace.zip.

    line 85
  14. Very specific:

    Run with --reporter=list for human-readable output.

    line 89
  15. Distinctive:

    If green: report which flows passed, and which assertions actually fired.

    line 91
  16. Distinctive:

    If red: report the specific step that failed, the expected vs actual, and the path to the screenshot.

    line 92
  17. Very specific:

    Use test.describe.serial(...) only when state is genuinely shared.

    line 98
  18. Very specific:

    Don't share auth state via global variables.

    line 103
  19. Very specific:

    Don't assert on the absence of an element with toBeHidden() without a timeout — the negative path is the flakiest in Playwright.

    line 104
  20. Distinctive:

    Don't run against prod. Have the user point at staging or local.

    line 105
  21. Very specific:

    Don't catch the error and console.log it.

    line 106
  22. Distinctive:

    Check the project for an existing Playwright config — none found.

    line 112
  23. Very specific:

    Write tests/signup.spec.ts using getByRole and getByLabel.

    line 115
  24. Very specific:

    Add waitForResponse on the signup POST and toHaveURL('/onboarding') after redirect.

    line 116

“Common” is measured: kept by at least 6 in 10 of the 23 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

browser-qa — verify with the browser, not by guessing

When to use this skill

Trigger when the user wants confirmation that a user-visible flow actually works. Strong signals:

  • "test the signup flow", "verify checkout", "qa this page"
  • After implementing a UI change, before declaring it done
  • When a unit test passes but the user says "it's still broken"
  • "screenshot what the page looks like at <state>"

Do not trigger for: pure logic tests (use test-architect), API contract tests (use api-architect), or for code that has no UI surface.

The output contract

A Playwright run that produces:

  1. A test file (or files) that another engineer can read in 60 seconds and understand the flow.
  2. A pass/fail result with the specific failing step and a screenshot of that step.
  3. No flaky waits — every wait is anchored to an observable condition (a network response, a visible element, a URL change).
  4. A trace file the user can open in npx playwright show-trace for any failure.

Workflow

1 — Reconnaissance

  • Is Playwright already installed? Check package.json and playwright.config.{ts,js}.
  • If not: npm i -D @playwright/test && npx playwright install --with-deps chromium.
  • Read the existing test directory (tests/, e2e/, playwright/) to learn the project's conventions before writing new tests.

2 — Map the flow

Before writing the test, write the steps in plain English. Example:

signup flow:
  1. visit /signup
  2. fill email + password
  3. click "Create account"
  4. expect navigation to /verify-email
  5. open the verification link from the test mailbox
  6. expect /onboarding

Show this to the user. Confirm the flow matches before coding. Half of bad e2e tests fail because they tested the wrong sequence.

3 — Write the test

Use Playwright's built-in locators in this priority order:

  1. getByRole('button', { name: 'Sign in' }) — accessible, resilient to copy changes
  2. getByLabel('Email') — for form inputs
  3. getByTestId('checkout-submit') — when nothing else is stable
  4. CSS selectors — last resort, only when the above don't fit

Never use XPath. Never use page.locator('div > div > div:nth-child(3)'). Those are landmines.

4 — Eliminate flake at write time

For every interaction that triggers async work:

  • After a click that submits a form → await page.waitForResponse(r => r.url().includes('/api/auth/signup') && r.ok())
  • After a navigation → await expect(page).toHaveURL('/onboarding')
  • After a state change → await expect(page.getByText('Welcome')).toBeVisible()

Never await page.waitForTimeout(2000). If you find yourself reaching for it, the test is wrong.

5 — Capture on failure

Configure playwright.config.ts:

use: {
  trace: 'retain-on-failure',
  screenshot: 'only-on-failure',
  video: 'retain-on-failure',
},

When a test fails, point the user at the trace: npx playwright show-trace test-results/<name>/trace.zip.

6 — Run and report

Run with --reporter=list for human-readable output. After the run:

  • If green: report which flows passed, and which assertions actually fired.
  • If red: report the specific step that failed, the expected vs actual, and the path to the screenshot.

Patterns and anti-patterns

✅ Do:

  • One flow per test file. signup.spec.ts, checkout.spec.ts, password-reset.spec.ts.
  • Use test.describe.serial(...) only when state is genuinely shared. Default to parallel.
  • Pin Playwright + browser versions in package.json. A floating browser breaks tests in CI.
  • Mock or stub external services (Stripe webhooks, email providers) — your test owns the failure, not their flakiness.

❌ Don't:

  • Don't share auth state via global variables. Use storageState per test or per worker.
  • Don't assert on the absence of an element with toBeHidden() without a timeout — the negative path is the flakiest in Playwright.
  • Don't run against prod. Have the user point at staging or local; refuse to run destructive flows against prod URLs.
  • Don't catch the error and console.log it. Let the test framework fail.

Example invocation

User: "Verify the signup → first-login flow works on localhost:3000."

  1. Check the project for an existing Playwright config — none found.
  2. Install Playwright and Chromium with deps.
  3. Map the flow with the user: visit /signup → fill form → submit → land on /onboarding → see welcome message.
  4. Write tests/signup.spec.ts using getByRole and getByLabel.
  5. Add waitForResponse on the signup POST and toHaveURL('/onboarding') after redirect.
  6. Run: npx playwright test tests/signup.spec.ts --reporter=list.
  7. Report: 1/1 passed, trace at test-results/signup/trace.zip if you want to scrub through it.

See also

  • test-architect — for unit and integration tests that don't need a browser
  • code-auditor — to find logic bugs the e2e didn't reach
  • ui-polish — when the test passes but the page still looks broken

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.