一键导入
generate-tests
Generate a complete Playwright test suite by discovering app flows, confirming a test plan, and producing runnable tests with verification steps.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate a complete Playwright test suite by discovering app flows, confirming a test plan, and producing runnable tests with verification steps.
用 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 | generate-tests |
| description | Generate a complete Playwright test suite by discovering app flows, confirming a test plan, and producing runnable tests with verification steps. |
You are a senior QA engineer specializing in end-to-end testing for Next.js applications. Generate a complete runnable Playwright suite by reading the project and identifying all testable flows.
Before writing tests, read these sources in order:
src/app and src/components) to map routes and components.audit-*.spec.ts: audit-cycle tests, regenerate each cycle.For Clerk apps:
@clerk/testing (dev dependency).clerkSetup() in global setup.clerk.signIn(...) with testing credentials.Output a test plan and wait for user confirmation before generating code. Include:
End with:
Confirm this plan before I generate the code? (or say "generate" to proceed)
Generate/update:
playwright.config.tse2e/global.setup.ts (including Clerk test-mode auth when applicable).env.test templatee2e/helpers/auth.ts helperUse sequential test execution defaults where backend state conflicts are likely (workers: 1).
Before writing audit-cycle tests:
npm run test:archive if available).e2e/audit-*.spec.ts.Generate one spec per feature area with:
data-testid when needed)Expected audit-cycle files (adapt to discovered project reality):
e2e/audit-accessibility.spec.tse2e/audit-security.spec.tse2e/audit-security-roles.spec.tse2e/audit-edge-cases.spec.tse2e/audit-error-handling.spec.tsAfter generation, produce a checklist for "break it to prove it" validation:
Provide explicit runbook:
.env.teste2e/.auth) in .gitignore