What problem does it solve?
Scaffolding new backend endpoints takes time and consistency work—schemas, auth, error envelopes, and optional SSE patterns must match existing Fastify conventions.
Core Features & Use Cases
- Fastify route scaffolding for monorepo services: Generates a new route handler in one of the Fastify services (
reservations, users, agent) following the established “house pattern”.
- Built-in request validation and OpenAPI metadata: Ensures the route uses Fastify
schema for params, body, query, summary, operationId, tags, and response shapes rather than doing manual validation.
- ADR-002 response/error envelopes: Wraps successes and failures in the
ApiResponse / ApiError envelope style and uses createProblemDetails for RFC 7807 error responses.
- Correct transactional and SSE behavior: Wraps multi-table writes in Prisma transactions and emits SSE events only after the DB commit succeeds (reservations service only).
- Route test registration: Adds corresponding route-level tests using the existing
app.inject() approach and mocks the service layer.
Quick Start
Provide the service name, HTTP method and path, what the route should do, the request and response shapes, and whether the endpoint requires SSE emission, and then ask the skill to scaffold the full route plus tests.