new-service-route
CommunityScaffold Fastify routes with consistent patterns
Authormattbutlerengineering
Version1.0.0
Installs0
System Documentation
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
schemafor 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/ApiErrorenvelope style and usescreateProblemDetailsfor 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.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: new-service-route Download link: https://github.com/mattbutlerengineering/mattbutlerengineering/archive/main.zip#new-service-route Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.