browser-test
Skill0 starsChanged 5 months agoMITView on GitHub
Code-as-action browser testing: verify UI changes and user flows by writing re-runnable Playwright scripts, capturing screenshots/console/network evidence, and producing test reports. Use when verifying a web feature in a real browser, reproducing a UI bug, smoke-testing a flow after changes, or asked to test the site / run browser tests.
- Reads credentials
- Installs packages
7 other projects use a version of this.
Adopted by
Most recently taken up by
- leek/agent-skillstheir own version, first seen Nov 2, 2026
- pionxzh/chatgpt-exportertheir own version, first seen Nov 1, 2026
- langwatch/langwatchtheir own version, first seen Oct 8, 2026
- alexjbarnes/cockpittheir own version, first seen Aug 13, 2026
- jpoindexter/theft-kittheir own version, first seen May 20, 2026
- alexiolan/craft-skillstheir own version, first seen Apr 16, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- langwatch/langwatch★ 5ksame name
- pionxzh/chatgpt-exporter★ 2.9ksame name
- alexiolan/craft-skills★ 17same name
- alexjbarnes/cockpit★ 16same name
- leek/agent-skills★ 5same name
- jpoindexter/theft-kit★ 1same name
- wzc-miyasaki/agent-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository38 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- api-contract-validationSkill
- architecture-scannerSkill
- auto-approve-policySkill
- auto-learningSkill
- backend-patternsSkill
- branch-syncSkill
- browseSkill
- build-checkSkill
- cache-refreshSkill
- codebase-explainerSkill
- coding-standardsSkill
- commit-styleSkill
- context-switchingSkill
- continuous-learningSkill
- db-preflightSkill
- env-preflightSkill
- eval-harnessSkill
- feature-completenessSkill
- file-indexSkill
- frontend-patternsSkill
- function-extractSkill
- idev-initSkill
- import-graphSkill
- lessons-learnedSkill
- post-creation-verifySkill
- pre-ship-verifySkill
- project-mapSkill
- self-reviewSkill
- session-resumeSkill
- skill-benchmarkSkill
- skilloptSkill
- smart-contextSkill
- strategic-compactSkill
- task-journalSkill
- tdd-workflowSkill
- test-coverageSkill
- test-mapSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Verify web features by writing Playwright scripts, not by imagining what a browser would show.
- Distinctive: line 75
When a run fails, classify before acting:
“Common” is measured: kept by at least 6 in 10 of the 6 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.
Files
Browser Test — Code-as-Action Browser Verification
Verify web features by writing Playwright scripts, not by imagining what a browser would show. The script is the durable artifact: it lands in the project's test library and re-runs on every future change to that flow. (Concept adapted from Microsoft's Webwright: treat the browser as a disposable environment your code spawns; the workspace — scripts, logs, screenshots — is the state.)
State layout
.claude/idev/browser-tests/
├── scripts/ # one script per flow — the accumulated E2E library
├── artifacts/ # screenshots, console/network logs per run (gitignorable)
└── reports/ # structured test reportsSetup detection (in order)
- Project already has
@playwright/testin package.json → use it (npx playwright test). Respect the project'splaywright.config.*. - Python
playwrightimportable → use the sync API (python3 script.py). - Neither → tell the user the one-time setup
(
npm i -D @playwright/test && npx playwright install chromium) and ask before installing anything.
Script conventions
- Reuse first: grep
scripts/for the flow before writing a new script. Adapt and parameterize an existing one rather than duplicating it. - One flow per script, named for the flow:
login-flow.spec.ts,checkout-smoke.spec.ts. - Base URL from env, never hardcoded:
const BASE = process.env.BASE_URL ?? 'http://localhost:3000'— scripts must run against dev, staging, or CI unchanged. - Assert real outcomes, not just "page loaded": visible text, URL after
navigation, row counts, toast messages. Prefer role/label selectors
(
getByRole,getByLabel) over CSS chains — they survive refactors. - Capture evidence on every run: screenshot at each key step and on failure; collect console errors and failed network requests:
import { test, expect } from '@playwright/test';
const BASE = process.env.BASE_URL ?? 'http://localhost:3000';
test('user can log in', async ({ page }) => {
const consoleErrors: string[] = [];
page.on('console', m => m.type() === 'error' && consoleErrors.push(m.text()));
page.on('requestfailed', r => consoleErrors.push(`NET ${r.url()}`));
await page.goto(`${BASE}/login`);
await page.getByLabel('Email').fill(process.env.TEST_USER ?? 'test@example.com');
await page.getByLabel('Password').fill(process.env.TEST_PASS ?? 'test');
await page.getByRole('button', { name: 'Sign in' }).click();
await expect(page).toHaveURL(/dashboard/);
await page.screenshot({ path: '.claude/idev/browser-tests/artifacts/login-ok.png' });
expect(consoleErrors, `console/network errors: ${consoleErrors}`).toHaveLength(0);
});- Credentials via env vars only (
TEST_USER,TEST_PASS) — never commit secrets into scripts; note required vars at the top of the script. - Headless by default; headed only while debugging a script.
Failure discipline (the important part)
When a run fails, classify before acting:
- Script bug (wrong selector, missing wait, bad assumption) → fix the script and re-run. Max 3 repair iterations; then report what's blocking.
- App bug (console error, failed request, wrong behavior) → do NOT silently change the app to make the test pass. Capture the evidence (screenshot, error text, request) and report it as a finding.
- Environment issue (server not running, missing test data) → report what's needed; see the project's run conventions.
Report format
Write to reports/<YYYY-MM-DD>-<flow>.md:
# Browser Test Report: <flow> — <date>
Target: <BASE_URL> Script: scripts/<name> Result: PASS | FAIL
| # | Check | Result | Evidence |
|---|-------|--------|----------|
| 1 | login redirects to /dashboard | PASS | artifacts/login-ok.png |
| 2 | zero console errors | FAIL | "TypeError: x is undefined" |
## App bugs found
- <error + repro + evidence path> (also log per the lessons-learned skill if recurring)
## Not covered
- <flows/states this run did not exercise>Report only what actually ran — no inferred results. If a check didn't execute, it's "not covered", not "pass".
Anti-patterns
- Verifying UI changes by reading the JSX/HTML and declaring it works — that's what this skill exists to replace.
- Writing a throwaway script and deleting it — save it to
scripts/; the library is the point. waitForTimeout(3000)sprinkled to "fix" flakiness — wait for conditions (expect(...).toBeVisible(),waitForURL) instead.- Testing through 10 UI steps what one API call could set up — use the API for arrange, the browser for act/assert.
Concept adapted from Webwright (MIT, © Microsoft Corporation).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

