| name | validate-new-api-routes |
| description | When adding new API or server routes: document manual validation, add an automated check (smoke or test) that hits the route, wire it into the suite, and run that verification before marking the task complete. Use when adding new Nuxt/API routes, server endpoints, or similar. |
Validate New API Routes Skill
When you add new API or server routes, add both manual validation (docs + curl) and an automated check, wire the check into the existing suite, and run that verification and report the result before marking the task complete.
When to Use
- Use when adding new API routes (e.g. Nuxt server API,
/api/... endpoints)
- Use when adding new server-side routes that should be manually testable and covered by smoke or tests
- Use whenever the user asks to "validate" or "verify" new routes and you add docs or automation
Steps
1. Document manual validation
- Add or update a doc (e.g. in
docs/) with a Manual validation (or similar) section.
- Include: base URL (e.g.
http://localhost:3000 or SITE_URL), and for each new route:
- Exact URL and method (e.g.
GET /api/auth/get-session).
- Example:
curl -s http://localhost:3000/api/auth/get-session.
- Expected status (e.g. 200) and expected response shape (e.g.
null or {} when not logged in).
- Mention how to run the app (e.g.
make dev or make up) so someone can run the curls.
2. Add an automated check
- Add a smoke or test script that hits the new route(s) and asserts status (and optionally body).
- Examples:
tests/smoke/20-auth-api.sh that calls and expects 200.