run-playwright-suite
Skill1 starsChanged 3 months agoMITView on GitHub
Type: skill (deterministic) · Used by: func-run-one, corroborate-2-sources · Status: LIVE (2026-07-08) You will execute a single Playwright functional suite and save its output. Follow these steps exactly. Required inputs (caller must supply all three): - suite_path — e.g. live/redline-dashboard/functional or drafts/saucedemo-team/functional (a directory containing playwright.config.ts and tests/) - run_id — unique string, e.g. redline-dashboard_functional_local_20260708T143022Z - env — local or stg (case-insensitive) Optional: - extra_args — extra CLI args (e.g. --last-failed, passed by corroborate-2-sources) Reject and STOP if any of…
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- k6-browser-testSkill
- k6-load-testSkill
- k6-playwright-converterSkill
- k6-smoke-testSkill
- k6-test-plannerSkill
- apply-ws2-conventionsSkill
- author-resilient-playwrightSkill
- build-status-viewsSkill
- choose-k6-execution-modeSkill
- compare-coreSkill
- compare-to-baselineSkill
- corroborate-2-sourcesSkill
- curate-baselinesSkill
- doc-consistency-checkSkill
- emit-otlp-and-prometheusSkill
- estimate-token-costSkill
- explore-product-structureSkill
- file-perf-regression-jiraSkill
- func-verdictSkill
- heal-playwright-suiteSkill
- k6-profile-benchmarkSkill
- k6-profile-loadSkill
- k6-profile-soakSkill
- k6-profile-spikeSkill
- k6-profile-stressSkill
- learn-via-k6-docsSkill
- link-grafana-panelSkill
- notify-responsible-teamSkill
- open-draft-prSkill
- parse-k6-json-summarySkill
- parse-playwright-summarySkill
- perf-run-logSkill
- run-k6-scriptSkill
- run-ledgerSkill
- scope-reviewSkill
- scrub-har-secretsSkill
- triage-func-verdictSkill
- triage-perf-verdictSkill
- verify-k6-scriptSkill
- verify-playwright-suiteSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 37
Create reports/<run_id>/ if it does not exist.
- Very specific: line 61
After the run, look in test-results/ at the repo root — Playwright's default outputDir resolves to …
- Distinctive: line 94
Never persist a trace from a non-local env.
≈ “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
run-playwright-suite
Execute one team's Playwright functional suite and save the raw JSON results artifact.
Type: skill (deterministic) · Used by: func-run-one, corroborate-2-sources · Status: LIVE (2026-07-08)
Prompt
You will execute a single Playwright functional suite and save its output. Follow these steps exactly.
1 — Validate inputs
Required inputs (caller must supply all three):
suite_path— e.g.live/redline-dashboard/functionalordrafts/saucedemo-team/functional(a directory containingplaywright.config.tsandtests/)run_id— unique string, e.g.redline-dashboard_functional_local_20260708T143022Zenv—localorstg(case-insensitive)
Optional:
extra_args— extra CLI args (e.g.--last-failed, passed by corroborate-2-sources)
Reject and STOP if any of the following are true:
suite_pathdoes not start withlive/ordrafts/(absolute or../paths are forbidden)<suite_path>/playwright.config.tsdoes not existenvisprod— functional suites NEVER run on PROD (v1 hard rule — no carve-out, stricter than k6)run_idis empty or missing
drafts/ is a valid, first-class run location — not a fallback for a missing feature.
A freshly-authored suite that never gets committed to live/ is still a real, runnable suite;
"graduating" to live/ only matters for putting a script under source control / CI, and is
never required just to see whether a test passes. Prefer live/<team>/functional when it
exists (it's the reviewed, committed version); otherwise run drafts/<team>/functional
directly — the caller decides which path to pass.
2 — Prepare the output directory
Create reports/<run_id>/ if it does not exist.
3 — Run the suite
$env:PLAYWRIGHT_JSON_OUTPUT_NAME = "reports/<run_id>/results.json"
npx playwright test -c <suite_path>/playwright.config.ts --reporter=json <extra_args>The suite's webServer config auto-starts the app under test — do not start it manually.
Capture stdout, stderr, and the exit code.
4 — Handle exit codes
| Exit code | Meaning | Action |
| 0 | all tests passed | Continue |
| 1 | ≥1 test failed | Continue — parse-playwright-summary will surface the failures |
any other, OR results.json missing/empty | runner crash, config error, webServer failed to start | Write reports/<run_id>/run-error.txt with stderr; mark run as FAILED; STOP |
A broken runner is a fail, never a red — it must not enter the regression path.
5 — Artifacts (screenshots + traces, secret hygiene)
After the run, look in test-results/ at the repo root — Playwright's default outputDir
resolves to <nearest-package.json-directory>/test-results — the repo root in this project's
layout — not relative to <suite_path>. (A suite that ships its own package.json would move
it; none do today.)
- Screenshots (
**/*.png): copy each toreports/<run_id>/artifacts/, flattening the name to<parent-dir-name>--<file>so the test identity survives. Kept on BOTH envs — a screenshot of the failing page carries no auth headers and is the primary debugging artifact the dashboard's Results view shows. - Traces (
**/trace.zip) — the hygiene rule is UNCHANGED:env=local→ move them toreports/<run_id>/traces/.env=stg→ DELETE them unconditionally and writereports/<run_id>/trace-note.txtwithtraces deleted (may embed auth headers; scrub step not yet live)— the same interim rulerun-k6-scriptapplies to HARs.
6 — Return
Return { "results_path": "reports/<run_id>/results.json", "exit_code": <n> }.
Tools
Bash (npx playwright test), Read, Write — no MCP, no model calls.
Data
- Reads:
live/<team>/functional/ordrafts/<team>/functional/(config + specs) - Writes:
reports/<run_id>/results.json,reports/<run_id>/run-error.txt,reports/<run_id>/artifacts/,reports/<run_id>/traces/,reports/<run_id>/trace-note.txt
Hard rules
- PROD is rejected before anything runs. No exceptions in v1.
- Never persist a trace from a non-local env.
- Exit 1 is a signal (test failures), not an error — only "other" codes are crashes.
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.

