一键导入
debug-tests
Debug Playwright failures using fresh sub-agents, optional parallelism for independent failures, and --dry-run/--debug visibility.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Debug Playwright failures using fresh sub-agents, optional parallelism for independent failures, and --dry-run/--debug visibility.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Live browser accessibility testing with Playwright and axe-core against a running URL. Use when validating real rendered accessibility behavior.
Accessibility audit for WCAG 2.1 AA, keyboard support, ARIA usage, and semantic HTML. Use when reviewing React/Next.js UI accessibility.
Orchestrate selected audit roles with fresh sub-agents, configurable model tier, and optional --dry-run/--debug validation. Use when running full multi-role audits.
DevOps and production-readiness audit for observability, resilience, scalability, and deployment hygiene. Use when reviewing operational risk before release.
DRY and abstraction audit for duplication, reusable hooks/components, and maintainability patterns. Use when looking for refactor opportunities.
Principal Engineer audit covering architecture, code quality, React/Next.js patterns, and tech debt. Use for senior-level maintainability reviews.
| name | debug-tests |
| description | Debug Playwright failures using fresh sub-agents, optional parallelism for independent failures, and --dry-run/--debug visibility. |
Run a retry loop that fixes failing Playwright tests with fresh worker context.
/debug-tests -> configure + execute/debug-tests -in -> interactive mode/debug-tests -auto -> unattended mode/debug-tests --dry-run -> configure + discover failures + show worker plan only/debug-tests --debug -> execute with prompt/worker-trace logging/debug-tests --dry-run --debug -> show worker plan + debug log paths onlyDo not directly apply failure fixes in the orchestrator context.
At start, ask:
.cursor/debug-session.json exists):
Derived runtime values:
MODEMAX_RETRIESWORKER_MODELSTATE_FILE = .cursor/debug-session.jsonDEBUG_MODE (true if --debug is present)npx playwright test --project=chromium 2>&1
test-results.json.suites[].specs[].tests[].results[].error.message, error.stack, error.snippetSTATE_FILE if presentClassify each failure as:
Prepare worker handoff per failure:
Worker prompt template:
You are a focused test-debug worker.
Failure:
- title: [title]
- spec: [file:line]
- status: [status]
- error: [message]
- stack/snippet: [trimmed]
- prior attempts: [history]
Tasks:
1) Read relevant test and app files.
2) Identify root cause.
3) Apply one concrete fix.
4) Return:
- rootCause
- fixSummary
- filesChanged
- why this fix should resolve the failure
If debug mode is enabled:
5) Write an execution trace to: [debugExecutionPath]
6) Include:
- ## Received Context (exact worker prompt)
- ## Files Read
- ## Root Cause Analysis
- ## Fix Applied
- ## Validation Reasoning
- ## Final Output
Debug paths per worker (when --debug):
debugPromptPath: .cursor/debug-logs/[timestamp]-attempt-[N]-[failureSlug]-prompt.mddebugExecutionPath: .cursor/debug-logs/[timestamp]-attempt-[N]-[failureSlug]-execution.mdIf --debug is present, orchestrator must:
.cursor/debug-logs/ exists.[debugPromptPath].If --dry-run is present:
No workers were launched. Remove --dry-run to execute.If not dry-run:
--debug, ensure .cursor/debug-logs/ exists and write/print resolved prompts before each worker launch.npx playwright test --project=chromium 2>&1
STATE_FILE with retries, attempts, failures, fix summaries, and remaining failures.test-results.json and compare with previous attempt.attempt >= MAX_RETRIESIn -in mode, after each failed attempt:
continue -> next interactive attemptauto -> switch to unattended modestop -> end and print final summaryRemind user:
To switch models: change the model in the Cursor dropdown, then reply continue.
Print:
--debug)Delete STATE_FILE if session is complete.
test-results.json).lastCompletedAttempt and re-run tests before continuing.