wreck-it: AI QA testing for local web apps
Also on ClaudePluginHub and Awesome Skills. See where wreck-it is listed.
Wreck your app before your users do.
wreck-it is an open-source AI QA testing skill and CLI for Claude Code, Codex, Cursor, Gemini CLI, and GitHub Copilot. It uses Playwright to help your coding agent test user flows, reproduce bugs with screenshots, trace findings to source code, and generate candidate regression tests.
Product demo · 37 seconds
https://github.com/user-attachments/assets/2e9e3048-bbfc-4951-bcc1-d89bdbbbd8da
Download MP4 · Sample report with screenshots
Demonstrated on the seeded Gadgetly app.
Test your locally running web app the way real people break it:
- Normal users walking every core flow
- Your ideal customers, built from what your app actually does
- Rushed beginners on a phone, double-clicking and typing things in the wrong format
- Chaos monkeys feeding it hostile input, killing the network and tampering with sessions
- Traffic spikes and slow pages
Then it hands you a scored bug report that points at the code responsible, plus candidate Playwright regression tests for supported findings.
Readiness 41/100 (Not ready) → .wreck-it/report.html
Fix this first: WR-004 Double-clicking "Place order" creates two orders
app/api/orders/route.ts:18 — no idempotency key; each POST inserts
Reports include:
- Repro steps and screenshots, replayed in a fresh browser before the finding counts
- The likely
file:lineand why it causes the bug. When wreck-it can't pin a line, it lists candidate files instead of guessing. - Candidate Playwright regression tests (
tests/wreck-it/WR-NNN.spec.ts). Review and run them: unsupported assertions become skipped tests, and generated checks can need correction before they reliably distinguish the bug from its fix.
On top of that you get a deterministic readiness score (0–100) you can compare across runs and agents.
Contents
- What it finds
- How it works
- Quickstart
- Installation
- Running it
- Apps with a login
- Your data, money and inbox
- The report
- Readiness score
- Regression tests
- Configuration
- CLI reference
- Files wreck-it writes
- The demo app and benchmark
- Troubleshooting
- Limitations
- Developing wreck-it
What it finds
| Kind | Examples |
|---|---|
| Broken flows | Totals that ignore quantity, a coupon applied twice, edits that don't persist, a header badge that doesn't update after a delete |
| Oddities | undefined or NaN rendered on the page, broken images, dead links, raw ISO timestamps, a page that scrolls sideways on a phone |
| UX problems | Endless spinners on empty pages, "Something went wrong" errors that wipe the form, lists in the wrong order, missions a persona couldn't finish |
| Chaos | 500s on padded or negative input, double-submits creating duplicate orders, crashes when the network drops or an API call fails, state lost on back/refresh |
| Accessibility | axe-core violations on every page at desktop and mobile width, unlabeled inputs, low contrast, keyboard traps |
| Performance | Slow pages on a mid-range phone (Lighthouse LCP, CLS, TBT), N+1 queries, event-loop blocking, endpoints that fall over under load, memory leaks |
Security testing is planned but not part of v1.
How it works
wreck-it has two halves:
| Part | Does |
|---|---|
Skills (skills/) |
The judgment: derive personas, drive the browser through Playwright MCP, decide what's a bug, trace it to code |
CLI (npx @miyanishar/wreck-it) |
Everything deterministic: setup, discovery, page sweeps, API fuzzing, Lighthouse, load tests, accessibility scans, finding storage, scoring, reports, test generation |
The CLI never calls an LLM and needs no API key. Your agent does the thinking; the CLI keeps results consistent so scores are comparable across runs and agents.
A full run goes through these stages:
| # | Stage | What happens |
|---|---|---|
| 1 | Setup and preflight | Checks tools, the app's address, the saved login, and what to ask you before writing data |
| 2 | Login | Signs in (or asks you to, once, for Google/GitHub/SSO) |
| 3 | Personas | Writes .wreck-it/personas.md: 2–3 ideal customers plus a normal user, a rushed beginner and a chaos monkey |
| 4 | Normal user | Every core flow, plus a 9-point data-integrity checklist (totals, persistence, deletes, sorting, empty states, error messages) |
| 5 | Personas | Each persona's missions, in character, in parallel in Claude Code |
| 6 | Chaos | Page sweep, API fuzzing, hostile inputs, double submits, navigation abuse, network faults, session tampering, keyboard-only |
| 7 | Page speed and load | Lighthouse on every page, then ramp, spike and soak load tests |
| 8 | Reproduce and trace | Every finding is replayed, then traced to file:line |
| 9 | Report | Score, HTML and Markdown report, regression tests |
Each stage also runs on its own: "just stress test my API", "only check accessibility", /wreck chaos.
Quickstart
You need Node.js 22.19 or newer and your app running locally.
# 1. Start your app
npm run dev
# 2. Install the skills (or use the Claude Code plugin, below)
npx skills add miyannishar/wreck-it
# 3. Install the browsers and MCP servers wreck-it uses
npx @miyanishar/wreck-it setup --dry-run # see what it will do
npx @miyanishar/wreck-it setup
Restart your agent so it loads the new MCP servers, then ask it:
wreck my app
The report lands in .wreck-it/report.html. Add .wreck-it/ to your .gitignore.
If you skip step 3, the agent offers to run it on the first run.
Installation
Claude Code (recommended)
/plugin marketplace add miyannishar/wreck-it
/plugin install wreck-it@wreck-it
Then run /wreck, /wreck focus <feature> for one feature, or one stage: /wreck setup, /wreck login, /wreck explore, /wreck chaos, /wreck fuzz, /wreck perf, /wreck load, /wreck a11y, /wreck trace, /wreck report. Anything after the stage is passed along as notes ("focus on checkout").
The plugin brings its own MCP servers, so there's nothing else to configure:
wreck-browser-1andwreck-browser-2: desktop browserswreck-browser-3: a phone (Pixel 7: 412 px wide, touch, mobile user agent)wreck-devtools: Chrome DevTools MCP, for performance traces and slow-network tests
Personas run as up to three parallel subagents, each in its own browser. The first time, the agent may run setup once to download the browser these servers use.
Codex, Gemini CLI, Cursor, VS Code / Copilot
npx skills add miyannishar/wreck-it
npx @miyanishar/wreck-it setup
setup finds the agents on your machine and adds Playwright MCP and Chrome DevTools MCP to each:
| Agent | How |
|---|---|
| Claude Code | claude mcp add … |
| Codex | codex mcp add … |
| Gemini CLI | .gemini/settings.json in the project |
| Cursor | .cursor/mcp.json in the project |
| VS Code / Copilot | .vscode/mcp.json in the project |
It only adds entries, never edits or removes yours. Limit it with --agent codex or skip parts with --skip schemathesis.
Any other agent
Paste AGENTS.md.snippet into your AGENTS.md (or CLAUDE.md, GEMINI.md, .cursor/rules), and add these two stdio MCP servers by hand:
npx @playwright/mcp@0.0.83 --browser chromium --isolated --caps network,storage,testing,devtools
npx chrome-devtools-mcp@1.10.1 --headless=true --isolated=true --performanceCrux=false --usageStatistics=false
Then run npx @playwright/mcp@0.0.83 install-browser chromium once.
The CLI on npm
Version 0.2.0 uses @miyanishar/wreck-it under the new npm account. Use this package name to receive the current release; the source repository is still miyannishar/wreck-it.
The CLI is published as @miyanishar/wreck-it. You don't need to install it: the skills and the plugin call it with npx, which fetches the latest version on first use. To pin a version or run it in CI, add it to a project:
npm i -D @miyanishar/wreck-it
npx wreck-it --version
What gets installed
| Tool | Used for | Installed by |
|---|---|---|
| Playwright MCP | Driving the browser as each persona: clicks, forms, fake API responses, offline mode, cookie and storage tampering, traces | setup (bundled in the plugin) |
| Chrome DevTools MCP | Performance traces, slow-network and slow-CPU emulation (optional; needs Google Chrome) | setup (bundled in the plugin) |
| Lighthouse | Page speed | npm dependency of the CLI |
| axe-core | Accessibility scans | npm dependency |
| autocannon | Load tests | npm dependency |
| Schemathesis | Extra API fuzzing for apps with an OpenAPI spec | setup, through uv |
| Chromium | Scans, Lighthouse, persona browsers | downloaded automatically on first use, or by setup |
Playwright MCP is pinned to a fixed version so the browser it expects doesn't change under you. Chrome DevTools MCP runs with Google's usage statistics and CrUX lookups turned off.
Where wreck-it is listed
| Directory | Link |
|---|---|
| npm | @miyanishar/wreck-it |
| Claude Code plugin marketplace (this repo) | /plugin marketplace add miyannishar/wreck-it |
| ClaudePluginHub | miyannishar-wreck-it |
| Awesome Skills | wreck-it |
Running it
Ask your agent in plain language:
| You say | It runs |
|---|---|
| "wreck my app", "is my app ready to ship?" | The full pipeline |
| "click through my app like a user", "test the happy paths" | Normal user and personas |
| "break my forms", "try weird inputs", "test offline" | Chaos |
| "stress test my API", "check page speed", "run Lighthouse" | Page speed and load |
| "check accessibility" | Accessibility sweep and keyboard checks |
| "test the checkout", "just test signup" | A focused run on that one feature |
A full run on a small app takes roughly 15–30 minutes with a Sonnet- or Opus-class model. Small models (Haiku-class) tend to skip stages; wreck-it sweep still gives them the mechanical coverage.
Just one feature? Say "test the checkout", "just test signup", or /wreck focus checkout. The agent finds that feature's pages and API routes, walks it as a normal user and a rushed beginner, runs sweep, fuzz, chaos and page speed on that scope only, and writes a report labelled as a focused run, in a few minutes instead of a full run.
No browser tools? If Playwright MCP isn't available and you don't want to set it up, the agent does a CLI-only run: sweep, fuzz, perf, load and the report. It marks the browser stages as skipped instead of pretending.
Report only. wreck-it never edits your code. At the end, the agent offers to fix the top findings and waits for your yes.
Apps with a login
Google, GitHub, SSO, magic links, 2FA
Agents can't (and shouldn't) type a Google password, so wreck-it uses the standard approach: you log in once and every later step reuses the session.
npx @miyanishar/wreck-it login # a browser window opens
npx @miyanishar/wreck-it login --label second # optional: a second user, for "B can't see A's data" checks
npx @miyanishar/wreck-it login --check # is the saved session still valid?
- A window opens at your app's login page. It uses your real Chrome when installed, which Google is less likely to block.
- You sign in however your app works.
- wreck-it notices you're logged in: in the background, without touching the window, it asks your app's server whether the session now opens a page that logged-out visitors can't. It then saves the session and closes the window. For apps that check login only in the browser, it finishes once the window has been back on your app for a few seconds. Closing the window yourself also works.
- Only your app's cookies and local storage are saved, to
.wreck-it/auth/<label>.json(owner-readable only). The sign-in provider's cookies are left out. The account is added to.wreck-it/config.json.
From then on, sweep, fuzz and perf load the session, the persona browsers load it, and generated tests start from it. No password ever ends up in a finding or a test.
discover recognizes Google, GitHub, Apple, Microsoft and Discord providers, hosted sign-in (Clerk, Auth0, Kinde, WorkOS, Stytch) and email links, so the agent knows to ask you up front. Preflight tells you when the session has expired. If wreck-it can't find a page that requires login to check against, set "authCheck": "/dashboard" in the config.
Use a test account, not your personal one: the agents act as that user.
Email and password
Put a test account in the config:
{ "accounts": [{ "label": "main", "email": "tester@example.com", "password": "…" }] }
The first command that logs in fills the form (one-step or two-step) and saves the session, so generated tests don't need the password either.
Keeping the login alive
- The agents never log out, delete or change the password of the account whose session other stages use. On Supabase and many other apps, logging out ends every session of that user. Logout and account-deletion checks use a throwaway account, last.
sweepandfuzzwrite refreshed sessions back to the file, because apps like Supabase rotate refresh tokens. They never overwrite a good session with a logged-out one.
Your data, money and inbox
Most apps built with AI tools run locally but talk to a hosted database: Supabase, Firebase, Neon. Often it's the only one, which means production. They also call paid APIs and send real email. wreck-it checks for all of this before it writes anything.
Before any stage that writes data, preflight lists questions for you, and the agent asks them in one message:
| Situation | What wreck-it does |
|---|---|
Hosted database (from .env, or a Supabase URL hardcoded in source, Lovable-style) |
Asks whether it's a dev project or production. Writing stages wait until you agree ("allowRemoteDb": true). |
Live Stripe keys (sk_live_…) |
Never completes a payment. With test keys it uses Stripe's test card. |
| Endpoints that call AI models, send SMS or email, or take payments | fuzz and load skip them; the browser triggers them only 2–3 times. You can allow more with "allowSideEffects": ["ai"]. |
| The app sends email and there's no local inbox | Asks for an address you can read ("testEmail": "me+wreck{n}@gmail.com"). |
| A CAPTCHA | Reports flows behind it as blocked, not as bugs. Use test keys locally to test them. |
discover finds these side effects per endpoint, including calls made through helper files and plain fetch calls to APIs like api.openai.com.
Email. Sign-ups use addresses from wreck-it email new, never example.com: those bounce, and Supabase, Resend and SendGrid throttle senders with many bounces. With a local test inbox (Mailpit, or Supabase's local stack) the agent reads confirmation links itself with wreck-it email read. Otherwise it asks you for the link, or marks the check as skipped.
Cleanup. Everything the agents create is named wreck-it … and logged with wreck-it run created. fuzz logs its own writes. The report lists it all under Test data created.
Local only. The CLI refuses any target that isn't localhost or a private address, unless you pass --i-own-this for a server you own. Load tests send GET/HEAD only unless you set "allowMutatingLoad": true yourself. fuzz never sends DELETE unless you pass --include-delete.
The report
wreck-it report writes .wreck-it/report.html (self-contained, open it in a browser) and .wreck-it/report.md (for PRs and issues). It contains:
- the readiness score, its band, and a score per category
- Fix this first: the most severe confirmed finding, with its
file:line - every confirmed finding, by severity, each with:
- the steps to reproduce
- expected vs. actual behavior
- the traced source (
file:line, snippet, why, confidence) - screenshots, console errors and failing requests
- a replayable Playwright trace for serious findings (
npx playwright show-trace …) - the path to its regression test
- load-test charts (p50/p99 latency and error rate per phase, with the breaking point) and the memory trend
- coverage: stages run, personas used, routes visited and not visited
- unconfirmed (flaky) findings, which don't count toward the score
- test data created, for cleanup
Readiness score
The score starts at 100. Each reproduced finding takes off points by severity:
| Severity | Points |
|---|---|
| critical | −25 |
| high | −10 |
| medium | −4 |
| low | −1 |
Each category's total deduction is capped, so one noisy category can't sink the score alone:
| Category | Cap |
|---|---|
| functional | 60 |
| security | 50 |
| performance | 40 |
| chaos | 30 |
| ux | 20 |
| oddity | 15 |
| accessibility | 15 |
Any reproduced critical finding caps the score at 49.
| Score | Band |
|---|---|
| 0–49 | Not ready |
| 50–74 | Risky |
| 75–89 | Almost there |
| 90+ | Ship it |
Findings that couldn't be reproduced score nothing; they're listed as unconfirmed.
Regression tests
wreck-it gen-tests writes one Playwright spec per reproduced finding to tests/wreck-it/. It also adds a playwright.config.ts if you don't have one.
npm i -D @playwright/test
npx playwright test tests/wreck-it
Each test replays the finding's steps and asserts the intended correct behavior. Verify that it fails for the actual defect and passes after a fix; a failure alone can also come from an incorrect locator or fixture. Findings without a checkable assertion are generated as test.fixme. Performance findings don't get tests. See the latest test-quality evaluation for measured limitations.
Regeneration preserves edited specs and sidecar fixtures. It records generated-file hashes in .wreck-it/generated-tests.json and warns about preserved files that need review. To intentionally replace edited or pre-existing WR-NNN.spec.ts files and remove stale ones, use gen-tests --force. App-origin absolute URLs in newly generated specs become relative, so WRECK_IT_BASE_URL can target a corrected copy. Custom specs still need their own URL review.
Structured findings support completion waits (waitFor), input values (value), text patterns (textMatches), and checks of rendered images and links (imageLoaded, linkResolves). See the [regression guidance](https://github.com/miyannishar/wreck-it/blob/HEAD/skills/