Code assistant
Give a coding agent (Claude Code, Mistral Vibe, Codex, Cursor, Continue, Copilot Chat, other "harness" that is shipping next week) access to your reports data. Instead of inventing what went wrong, the agent has access to test history, LLM analyses, your feedback, and failure clusters from the server.
Two pieces responsible for this:
@cyborgtests/pwrs-cli: a tiny CLI. Zero runtime dependencies. JSON in, JSON out.playwright-reportsClaude Code skill (packages/skill/): a plugin plus aSKILL.mdthat tells Claude Code when to call the CLI and how to read what comes back.
ask your agent "why is login test failing?", "what's flaky this week?", "what is the current state of the test project qa:main" and it fetches the relevant context, and comes back with an answer based on the actual data.
Step 1: install the CLI
npm install -g @cyborgtests/pwrs-cli
pwrs-cli --helpPoint it at your server:
pwrs-cli config set server https://reports.example.com
pwrs-cli config set token <api-token> # skip if the server runs without API_TOKENEnv vars override the saved config (handy for debugging):
| Var | What |
|---|---|
PWRS_SERVER_URL | Server URL |
PWRS_API_TOKEN | API token |
PWRS_PROJECT | Default --project for every command (explicit --project still wins) |
Step 2a: wire it into Claude Code
/plugin marketplace add cyborgtests/playwright-reports-server
/plugin install playwright-reportsThat's it. The playwright-reports skill is now registered.
Now ask Claude Code things like:
"why is
Xtest failing?""what's flaky this week?""triage the latest report""compare the last two reports for thee2eproject"
The skill fetches context and answers. If your model is being stubborn about picking it up automatically, ask explicitly: "using the playwright-reports skill, find what failed in the latest report". Works on the most reluctant llms.
Want to build it from source locally?
/plugin marketplace add /path/to/playwright-reports-server
/plugin install playwright-reportsAnd symlink the local CLI build onto $PATH:
pnpm install
pnpm --filter pwrs-cli run build
sudo ln -sf "$(pwd)/packages/cli/dist/bin.js" /usr/local/bin/pwrs-cliStep 2b: wire it into Codex / Cursor / Continue / anything else
The CLI is just JSON-over-stdout. Any agent that can shell out can use it. Two options:
Drop the SKILL.md into your assistant's rules. Copy
packages/skill/skills/playwright-reports/SKILL.mdinto:- Codex CLI:
AGENTS.md - Cursor:
.cursor/rules - Continue:
config.jsonsystem prompt - GitHub Copilot Chat: workspace instructions
The SKILL.md is portable text. It explains when to call
pwrs-cliand what to expect in the output.- Codex CLI:
Tell the agent the CLI exists. With
pwrs-clion$PATH, say: "usepwrs-clito fetch Playwright report data when debugging tests. Runpwrs-cli helpfirst to discover commands." Most modern agents would understand.
What the agent can ask for
The full command reference lives in packages/cli/README.md. The shape that matters when you're sizing your context budget:
Drill-down (you already have an ID). One call per entity:
test brief <testId> one-call context for one test
test analysis <testId> full persisted LLM markdown
test analysis-prompt <testId> --report-id <id> the exact prompt+response we sent last
test failure-context <testId> --report-id <id> evidence envelope, no LLM call
test history <testId> [--limit N] per-run history + signature rollup
test find <query> resolve test name -> testId
test from-file <path>[:line] resolve spec file -> testIds
report latest [--with-failures] latest report brief
report brief <reportId> [--with-failures] specific report brief
report summary <reportId> LLM failure summary for a report
report resolve <displayNumber> resolve #479 -> UUID
cluster brief <clusterId> drill into one failure cluster
attachment <url> fetch screenshot/error-context with authDiscovery (you don't have an ID yet):
project list list known projects
project summary [--project P] LLM project health digest
report list [filters] filtered reports
report compare <a|latest|prev> <b|latest|prev> diff two reports
test search [filters] search across tests
stats [filters] aggregate health + trend deltas
cluster list [filters] active failure clusters
tag list / category list enums for filtersConfig:
config set <server|token> <value> persist config
config get [<key>] show config (token masked)
ping sanity-check
--version CLI versionThe two "brief" payloads worth knowing
test brief and report brief stitch together test detail, LLM analysis, team feedback, failure history, and failure clusters.
Date filters
ISO dates (YYYY-MM-DD) or full ISO timestamps. Always explicit ranges:
pwrs-cli test search --tier flaky --from 2026-05-13 --to 2026-05-20
pwrs-cli report list --pass-rate failing --from 2026-05-20 --to 2026-05-21Output and errors
Every command prints JSON to stdout. Errors go to stderr in the shape { "success": false, "error": "...", "kind": "http|config|unknown" } with a non-zero exit code. Lists include pagination (total, hasMore, limit, offset).
Briefs are compact by default. Escalate with --with-failures when you actually need full details.
See also
- LLM analysis: the source of the analyses the CLI returns
- LLM routing: how those analyses can be produced by several models (fusion, council, cascade, refine)