prodtest
Skill4 starsChanged 17 days agoMITView on GitHub
Senior-QA test pass on a newly implemented feature. Detects the project's real test stack, writes unit and functional/integration tests, then drives the running app with Playwright for end-to-end coverage, saving screenshots to a gitignored folder for human review. Asks upfront whether found bugs should be fixed or only reported. Use when asked to test a new feature, add test coverage, or when the user runs /prodtest.
In this repository6 other files it gives its agents.
- skills/adonis-next-monorepo/template/AGENTS.mdAGENTS.md
- skills/adonis-next-monorepo/template/CLAUDE.mdCLAUDE.md
- adonis-next-monorepoSkill
- mergemainSkill
- prodcheckSkill
- shipitSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 13 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Test a feature the way a senior QA engineer would: find out what the feature actually claims to do, then try to break it — at the unit, …
- Distinctive: line 14
Before writing anything, ask once:
- Distinctive: line 18
Wait for the answer. It governs the whole run:
- Distinctive: line 29
Use the user's description if given.
- Distinctive: line 33
Write down, in 3–6 bullets, what the feature is supposed to do — the behaviors you are about to verify.
- Distinctive: line 39
Read, don't guess:
- Distinctive: line 50
If no test infrastructure exists at all, say so and propose the minimal setup before installing anything.
- Distinctive: line 63
No test that only re-asserts a mock.
- Distinctive: line 83
Check whether Playwright is already installed and configured.
- Distinctive: line 85
Start the app the way the project documents it, wait for readiness, and seed any data the flow needs.
- Distinctive: line 87
Write specs for the real user journeys of this feature, including at least one unhappy path (validation error, permission denied, or …
- Very specific: line 89
Prefer role/label/text selectors and web-first assertions (expect(locator).toBeVisible()).
- Very specific: line 108
Ensure .gitignore contains .prodtest/ — add the line if missing and say that you did.
- Very specific: line 110
Write .prodtest/report.md as an index: each spec, pass/fail, and relative links to its screenshots in order.
- Distinctive: line 115
Run the unit, integration, and E2E suites and paste the real summary output.
- Distinctive: line 133
Never report a suite as passing that you did not actually run to completion.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
prodtest
Test a feature the way a senior QA engineer would: find out what the feature actually claims to do, then try to break it — at the unit, integration, and browser level.
Step 0 — Ask the fix policy first
Before writing anything, ask once:
Should I fix bugs as I find them, or only report them?
Wait for the answer. It governs the whole run:
- Fix mode — when a test fails because the product is wrong, fix the product, re-run, and note the fix in the report.
- Report-only mode — leave the failing test in place (or document the repro), change no product code, and list every defect at the end.
In both modes, a test that fails because the test is wrong is always yours to fix.
Step 1 — Identify the feature under test
- Use the user's description if given.
- Otherwise diff the branch:
git diff $(git merge-base HEAD origin/main)...HEAD --statplus recent commit messages, and read the changed handlers, components, and models. - Write down, in 3–6 bullets, what the feature is supposed to do — the behaviors you are about to verify. Show these to the user as your test basis; a wrong premise here wastes the whole run.
Step 2 — Learn the real test stack (do not assume)
Read, don't guess:
package.json/pyproject.toml/composer.json/go.mod— which runner exists (vitest, jest, pytest, phpunit, go test) and which scripts run it.- An existing test file near the feature — copy its imports, factories, fixtures, mocking style, DB setup/teardown, and naming. Match the house style exactly.
- CI config — the command that must pass.
- How the app boots locally (dev script, env vars, docker compose, seed/migrate commands) and on which port.
If no test infrastructure exists at all, say so and propose the minimal setup before installing anything.
Step 3 — Unit tests
Cover the pure logic the feature introduced: calculations, validators, reducers, permission predicates, formatters, state machines.
For each unit: the happy path, then the edges that actually bite — empty, null/undefined, zero, negative, very large, unicode, duplicates, boundary values, wrong types at trust boundaries, timezone/DST for dates, rounding for money.
No test that only re-asserts a mock. If mocking the dependency makes the test tautological, promote it to an integration test.
Step 4 — Functional / integration tests
Exercise the feature through its real seams with real wiring — HTTP handler → service → database, or component → store → API client.
Cover:
- Success path with a realistic payload.
- Validation failures and the exact status codes/messages contracted.
- Authorization: unauthenticated, wrong role, and another tenant's user hitting the same resource must all be rejected.
- Persistence: assert the database state after the call, not just the response.
- Idempotency/duplicates where the feature can be retried.
- Failure of a dependency (DB error, third-party timeout) — the system should degrade, not corrupt.
Step 5 — End-to-end with Playwright
- Check whether Playwright is already installed and configured. If it is not, ask before adding it and its browsers — it is a heavy dependency.
- Start the app the way the project documents it, wait for readiness, and seed any data the flow needs.
- Write specs for the real user journeys of this feature, including at least one unhappy path (validation error, permission denied, or network failure).
- Prefer role/label/text selectors and web-first assertions
(
expect(locator).toBeVisible()); no arbitrarywaitForTimeout. - Capture the browser console and failed network requests during each spec and surface them — a green test over a console full of 500s is not green.
Screenshots for human review
Save artifacts to .prodtest/ at the repo root:
.prodtest/
screenshots/<spec-name>/01-<step>.png
report.md- Screenshot every meaningful state transition, not just failures, so the user can eyeball the feature without running anything.
- Configure Playwright with
screenshot: 'only-on-failure'plus explicitpage.screenshot()calls at each step; also enabletrace: 'retain-on-failure'. - Ensure
.gitignorecontains.prodtest/— add the line if missing and say that you did. Never commit these artifacts. - Write
.prodtest/report.mdas an index: each spec, pass/fail, and relative links to its screenshots in order.
Step 6 — Run everything and report honestly
Run the unit, integration, and E2E suites and paste the real summary output.
For each defect found:
### [Sev] Short title
Where: apps/web/src/checkout/apply-coupon.ts:73
Repro: 1. ... 2. ... 3. ...
Expected: ... Actual: ...
Evidence: .prodtest/screenshots/checkout/04-coupon-error.png
Status: fixed in <file:line> | reported onlyThen a summary: tests added (by layer), pass/fail counts, defects by severity, screenshot folder path, and — explicitly — what you did not test and why (flows you could not reach, external services you had to stub, browsers you skipped).
Never report a suite as passing that you did not actually run to completion.
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.

