Install Browser Test Loop
Pick your agent. Every command is ready to paste.
npx skills add OneWave-AI/claude-skills --skill browser-test-loopThe open skills CLI detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.
01
Install it
Run the command above, or upload the folder in Claude.
02
Ask naturally
Describe the task. Your agent loads browser-test-loop when the request matches its description.
03
Name it if needed
If it does not trigger, say “use the browser-test-loop skill”. In Codex, type $browser-test-loop.
Browser Test Loop
Code that compiles is not code that works. This is the loop that closes the gap between "the diff looks right" and "the page does the thing".
Core Behavior
Drive a real browser against the running app, assert on what actually rendered, and fix what fails. Never report a UI change as working on the strength of the diff alone.
Setup
Playwright is the default. It installs its own browsers and runs headless in CI.
npm i -D @playwright/test && npx playwright install chromium
Start the app first and hold the port — a test suite against a dead server produces a wall of timeouts that tells you nothing:
npm run dev > /tmp/dev.log 2>&1 &
npx wait-on http://localhost:3000
The Loop
- Name the assertion in one sentence. "After submitting the contact form with a valid email, a success message appears and no console error fires." Vague goals produce vague tests.
- Write the smallest script that proves it. One flow per file.
- Run it. Read the failure, not the summary.
- Fix the app, not the test — unless the test encoded the wrong expectation, in which case say so out loud.
- Re-run until green, then run it once more from a cold start to catch state that leaked between runs.
What to Assert
- The user-visible outcome: text on screen, a URL change, a row that appeared.
- Zero unexpected console errors. Collect them explicitly; a silent React error boundary looks like a blank success.
- Network calls that should have fired, and their status codes.
- The empty, loading, and error states — not just the happy path.
const errors = []
page.on('console', m => m.type() === 'error' && errors.push(m.text()))
page.on('pageerror', e => errors.push(e.message))
// ... drive the flow ...
expect(errors).toEqual([])
Selector Rules
Query the way a person looks at a page: role, label, and visible text. getByRole('button', { name: 'Send' }) survives a restyle; .btn-primary > span:nth-child(2) does not. Add data-testid only where the visible text is genuinely ambiguous.
Screenshots
Take one on failure automatically, and one at the end of a flow when a human needs to eyeball the result. Full-page for layout questions, element-scoped for a component. Save under /tmp unless the user wants them kept.
npx playwright test --reporter=line 2>&1 | tail -30
Pipe the output. A full Playwright HTML reporter dump is thousands of tokens of nothing.
Common Failure Modes
| Symptom | Real cause |
|---|---|
| Every test times out | App never started, or wrong port |
| Passes locally, fails headless | Animation or viewport size, not logic |
| Flaky on CI only | Waiting on a timeout instead of a condition |
| Blank page, no error | Client-side exception swallowed by an error boundary |
| Works once, fails on re-run | Test wrote state it never cleaned up |
Never fix flake with waitForTimeout. Wait for the condition — a selector, a response, a URL.
Reporting
Say what flow was driven, what was asserted, and the result. If something is still unverified, name it. Screenshots go with the answer when the question was visual.
Tips for Browser Test Loop
- • Start a fresh session after installing so your agent picks up the new skill.
- • It is part of a pack with 30 skills. Install only the ones you need with --skill to keep triggers precise.
- • If two skills overlap, mention the one you want by name.
Questions about Browser Test Loop
What does the Browser Test Loop skill do?
Use to actually verify a web change in a real browser instead of assuming it works — click through a flow, catch console errors, check a form submits, confirm a fix on the page. Trigger when a UI change needs proof, a bug only reproduces in the browser, or the user asks to test, check, or screenshot the running app.
How do I install Browser Test Loop?
Run "npx skills add OneWave-AI/claude-skills --skill browser-test-loop" in your project. The skills CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.
Does Browser Test Loop work in Cursor and Codex?
Yes. Browser Test Loop uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.
Is Browser Test Loop free?
Browser Test Loop is open source on GitHub under the MIT license. It is free to install; check the license before commercial use.
Who made Browser Test Loop?
Browser Test Loop is published by OneWave-AI in the OneWave-AI/claude-skills repository, together with 29 other skills.



