new-servicelisted
Install: claude install-skill mattbutlerengineering/mattbutlerengineering
# Scaffold New Service
Creates a new backend service following the exact patterns used by `services/users`, `services/agent`, and `services/reservations`.
## Arguments
The user should provide:
- **Service name** (kebab-case, e.g., `payments`) — becomes `services/<name>/`
- **Port number** — next in sequence (current: 3000 marketing, 3001 users, 3002 hospitality, 3003 agent, 3004 reservations, 3005+ available)
- **Auth required?** — whether routes need JWT verification via `@mbe/auth`
## Scaffold Checklist
### 1. Create directory structure
```
services/<name>/
├── src/
│ ├── app.ts # Fastify app builder
│ ├── index.ts # Entry point
│ ├── routes/
│ │ └── health.ts # GET /health endpoint
│ └── schemas/
│ └── index.ts # Schema registration
├── prisma/
│ └── schema.prisma # Prisma schema
├── package.json
├── tsconfig.json
├── vitest.config.ts
├── .env # Local dev env vars
└── CLAUDE.md # Service-specific context
```
### 2. File templates
**package.json** — use `@mbe/<name>-service` naming:
```json
{
"name": "@mbe/<name>-service",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "tsx watch --env-file=.env src/index.ts",
"build": "tsc",
"start": "node dist/index.js",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
"lint": "eslint src/",
"typecheck": "tsc --noEmit",