Nick API Test Builder
Use this as the primary API/backend testing skill for Nick's workflow.
Purpose
Generate practical backend test suites that cover:
- route discovery
- HTTP method coverage
- authenticated vs unauthenticated access
- malformed/missing inputs
- happy path and error path behavior
- role/permission assumptions where relevant
Hard rules
- Test authenticated and unauthenticated access where auth is relevant
- Test all supported HTTP methods for each route
- Test malformed and missing inputs
- Prefer Next.js App Router route discovery first
- Keep output practical and runnable
Default workflow
- Discover API routes
- Identify supported methods per route
- Identify auth/role requirements from route code
- Generate tests for:
- happy path
- unauthenticated access
- malformed inputs
- missing inputs
- unsupported methods where relevant
- Organize tests by route or route group
Default output
- route map
- backend test files
- auth assumptions to verify
- gaps that still need manual clarification
Best-fit stack
- Next.js App Router
- Next.js Pages API routes
- Node test runner / Vitest or similar
- Supabase-aware auth patterns
References
- Read
references/route-discovery.mdfor route mapping - Read
references/auth-test-patterns.mdfor auth coverage - Read
references/input-edge-cases.mdfor malformed/missing input patterns - Read
references/test-file-shape.mdfor practical output structure
Bundled scripts
scripts/generate_route_test_plan.sh— create per-route test planning stubscripts/generate_auth_matrix.sh— create auth test matrixscripts/generate_endpoint_checklist.sh— create endpoint coverage checklist