Comprehensive testing strategy. Creates test plans covering unit, integration, and E2E. Uses specialist agents for each test type. Supports vitest and Playwright with auth testing guidance for Clerk and WorkOS.
Creates comprehensive test strategies and executes them using specialized agents for unit, integration, and E2E testing.
/plugin marketplace add howells/arc/plugin install arc@howellsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
<tool_restrictions>
EnterPlanMode — BANNED. Do NOT call this tool. This skill has its own structured testing workflow. Execute it directly.ExitPlanMode — BANNED. You are never in plan mode.
</tool_restrictions>Create comprehensive test strategies covering the full test pyramid. Execute with specialist agents.
<required_reading> Read before planning:
${CLAUDE_PLUGIN_ROOT}/references/testing-patterns.md — Test philosophy, vitest/playwright patterns${CLAUDE_PLUGIN_ROOT}/rules/testing.md — Project conventions${CLAUDE_PLUGIN_ROOT}/references/llm-api-testing.md — If testing LLM integrations${CLAUDE_PLUGIN_ROOT}/disciplines/change-impact-testing.md — Blast radius analysis for code changes
</required_reading>This skill uses 3 writers + 2 runners:
| Agent | Model | Purpose | Framework |
|---|---|---|---|
unit-test-writer | sonnet | Write unit tests | vitest |
integration-test-writer | sonnet | Write integration tests (API, auth) | vitest + MSW |
e2e-test-writer | opus | Write E2E tests | Playwright |
test-runner | haiku | Run vitest, analyze failures | vitest |
e2e-runner | opus | Run Playwright, fix issues, iterate | Playwright |
Test Pyramid:
/\
/ \ E2E (few)
/────\ - Critical user journeys
/ \ - Auth flows
/────────\ Integration (some)
/ \ - API interactions
/────────────\ - Component + state
/ \ Unit (many)
/────────────────\- Pure functions
- Isolated components
<rules_context> Check for project testing rules:
Use Glob tool: .ruler/testing.md
If exists, read for MUST/SHOULD/NEVER constraints.
Detect test framework:
| File | Framework |
|---|---|
vitest.config.* | vitest (unit + integration) |
playwright.config.* | Playwright (E2E) |
| </rules_context> |
"What would you like to do?"
| Intent | Action |
|---|---|
| Create test strategy | Full test plan → dispatch agents |
| Run tests | Execute with appropriate runner |
| Fix failing tests | Dispatch debugger or e2e-runner |
| Review coverage | Analyze gaps and recommend |
Gather context:
For each feature, plan across all levels:
## Test Plan: [Feature Name]
### Risk Assessment
- **Criticality**: [high/medium/low]
- **Has Auth**: [yes/no — Clerk/WorkOS/custom]
- **Has API Calls**: [yes/no]
- **User-Facing**: [yes/no]
### Unit Tests (vitest)
**Agent:** unit-test-writer
| Test Case | What it Verifies |
|-----------|------------------|
| `should [behavior]` | [Pure function/component behavior] |
| `should [behavior]` | [Edge case handling] |
| `should [behavior]` | [Error throwing] |
**Files to create:**
- `src/[path]/[module].test.ts`
### Integration Tests (vitest + MSW)
**Agent:** integration-test-writer
| Test Case | What it Verifies |
|-----------|------------------|
| `should [behavior]` | [Component + API interaction] |
| `should [behavior]` | [Auth state handling] |
| `should [behavior]` | [Error from API] |
**Mocking required:**
- API endpoints: [list]
- Auth: [Clerk/WorkOS mock setup]
**Files to create:**
- `src/[path]/[feature].integration.test.ts`
### E2E Tests (Playwright)
**Agent:** e2e-test-writer
| Test Case | What it Verifies |
|-----------|------------------|
| `should [complete flow]` | [Happy path journey] |
| `should [handle error]` | [User-visible error] |
| `should [auth flow]` | [Login/logout if applicable] |
**Auth setup required:**
- Provider: [Clerk/WorkOS/none]
- Test user: [env var names]
**Files to create:**
- `tests/[feature].spec.ts`
- `tests/auth.setup.ts` (if auth needed)
Dispatch specialists in order:
1. Unit tests first (fastest feedback):
Task [unit-test-writer] model: sonnet: "Write unit tests for [feature].
Test cases from plan:
[paste unit test cases]
Files to create: [paths]
Follow vitest patterns from testing-patterns.md"
2. Integration tests second:
Task [integration-test-writer] model: sonnet: "Write integration tests for [feature].
Test cases from plan:
[paste integration test cases]
Auth: [Clerk/WorkOS/none]
API mocking: [endpoints to mock]
Files to create: [paths]"
3. E2E tests last:
Task [e2e-test-writer] model: opus: "Write E2E tests for [feature].
Test cases from plan:
[paste e2e test cases]
Auth: [Clerk/WorkOS/none]
Fixtures needed: [list]
Files to create: [paths]"
Unit + Integration (inline):
pnpm vitest run
E2E (background agent — avoids terminal issues):
Task [e2e-runner] model: opus: "Run E2E tests and fix any failures.
Test files: [list]
Iterate until green or report blockers."
Integration tests (vitest):
useAuth and useUser hooksgetToken for API callsE2E tests (Playwright):
tests/auth.setup.ts for login flowplaywright/.auth/user.jsonstorageState in playwright.config.tsCommon issues:
isLoaded: false stategetToken mock)Integration tests (vitest):
getUser from @workos-inc/authkit-nextjsorganizationId, role, permissionsE2E tests (Playwright):
/api/auth/test-login for faster auth (test env only)Common issues:
organizationId in mock (required for org-level features)For faster E2E tests, create a test-only auth endpoint:
// app/api/auth/test-login/route.ts
// ONLY available in test/development
export async function POST(request: Request) {
if (process.env.NODE_ENV === "production") {
return new Response("Not found", { status: 404 });
}
// Create session directly without SSO flow
}
| Level | Test | Don't Test |
|---|---|---|
| Unit | Pure functions, isolated components, hooks | API calls, multi-component flows |
| Integration | Component + API, auth states, form submissions | Full user journeys |
| E2E | Critical paths, auth flows, checkout/signup | Every possible input |
| Feature Type | Unit | Integration | E2E |
|---|---|---|---|
| Utility functions | ✅ heavy | ❌ none | ❌ none |
| UI components | ✅ rendering | ✅ with state | ❌ only if critical |
| Forms | ✅ validation | ✅ submission | ✅ critical forms |
| API routes | ✅ handlers | ✅ with mocking | ❌ via E2E |
| Auth flows | ❌ none | ✅ mock states | ✅ real flow |
| Checkout/payment | ✅ calculations | ✅ flow | ✅ full journey |
Tests must fail fast. Never:
Playwright config:
export default defineConfig({
timeout: 30_000, // 30s max per test
expect: {
timeout: 5_000, // 5s for assertions
},
use: {
actionTimeout: 10_000, // 10s per action
},
});
<progress_append> After creating test strategy or running tests:
## YYYY-MM-DD HH:MM — /arc:testing
**Task:** [Create strategy / Run tests / Fix failing]
**Feature:** [What was tested]
**Coverage:**
- Unit: [N] tests
- Integration: [N] tests
- E2E: [N] tests
**Auth:** [Clerk/WorkOS/none]
**Result:** [All passing / X failing]
**Next:** [Fix failures / Done]
---
</progress_append>
<success_criteria> Test strategy is complete when:
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.