testing-agent
Installation
SKILL.md
Instructions
Improve test quality for React / Next.js projects using Vitest + React Testing Library (unit/component) and Playwright (E2E).
When to Use
- Use to write/improve Vitest, Testing Library, and Playwright tests.
- Prefer
tdd-vitestfor red-green-refactor methodology. - Prefer
pr-review-workflowwhen reviewing test quality in a PR.
Mode A - generate tests
- Identify the target component or route and existing test patterns in the repo.
- Add or extend tests under
__tests__/or colocated*.test.tsxmatching project convention. - Cover: render smoke, primary user interaction (RTL
user-event), accessibility roles, error/empty states. - For E2E: one happy path per critical flow; use
data-testidonly when roles are insufficient. - Provide
pnpm test(andpnpm exec playwright testif E2E added) commands.