Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

New Service

ASecurity

Scaffold a new Fastify + Prisma backend service in the mattbutlerengineering monorepo. Creates the service directory, package.json, app bootstrap, Prisma schema, health route, tests, and updates Turborepo config.

2 stars
0 votes
0 copies
0 views
Added 9/22/2026
developmenttypescriptbashsqlnodeapidatabasebackend

Works with

cliapi

Security Analysis

A92/100
mediumInstalls packages at runtime which could introduce malicious dependencies

Scanned 9/22/2026

Install to Claude Code

$npx -y skills add mattbutlerengineering/mattbutlerengineering --skill new-service --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of New Service?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for New Service
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mattbutlerengineering-new-service/badge)](https://www.skillsdirectory.com/skills/mattbutlerengineering-new-service)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
name: new-service
description: Scaffold a new Fastify + Prisma backend service in the mattbutlerengineering monorepo. Creates the service directory, package.json, app bootstrap, Prisma schema, health route, tests, and updates Turborepo config.
user-invocable: true
---

# 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",
    "db:generate": "prisma generate",
    "db:push": "prisma db push",
    "db:migrate": "prisma migrate dev",
    "db:migrate:deploy": "prisma migrate deploy",
    "db:migrate:status": "prisma migrate status",
    "db:studio": "prisma studio"
  },
  "dependencies": {
    "@fastify/cors": "^11.0.0",
    "@fastify/swagger": "^9.0.0",
    "@mbe/types": "workspace:*",
    "@prisma/client": "^7.0.0",
    "@scalar/fastify-api-reference": "^1.55.0",
    "fastify": "catalog:",
    "zod": "catalog:"
  },
  "devDependencies": {
    "@mbe/config": "workspace:*",
    "@types/node": "^22.0.0",
    "@vitest/coverage-v8": "catalog:",
    "prisma": "^7.0.0",
    "tsx": "^4.19.0",
    "typescript": "^5.7.3",
    "vitest": "catalog:"
  }
}
```

If auth required, also add:

```json
"@mbe/auth": "workspace:*",
"jose": "^5.2.0"
```

**tsconfig.json**:

```json
{
  "extends": "@mbe/config/typescript/node",
  "compilerOptions": { "outDir": "dist", "rootDir": "src" },
  "include": ["src"]
}
```

**vitest.config.ts**:

```typescript
import { defineConfig } from "vitest/config";

export default defineConfig({
  test: {
    globals: true,
    environment: "node",
    include: ["src/**/*.test.ts"],
    coverage: {
      provider: "v8",
      reporter: ["text", "json", "html"],
      include: ["src/**/*.ts"],
      exclude: ["src/**/*.test.ts", "src/index.ts"],
    },
  },
});
```

**prisma/schema.prisma**:

```prisma
generator client {
  provider = "prisma-client-js"
  output   = "../src/generated/prisma"
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}
```

**src/index.ts**:

```typescript
import { buildApp } from "./app.js";

const PORT = parseInt(process.env.PORT ?? "<port>", 10);
const HOST = process.env.HOST ?? "0.0.0.0";

async function main() {
  const fastify = await buildApp();
  try {
    await fastify.listen({ port: PORT, host: HOST });
    fastify.log.info(`Server running at http://${HOST}:${PORT}`);
    fastify.log.info(`API docs at http://${HOST}:${PORT}/docs`);
  } catch (err) {
    fastify.log.error(err);
    process.exit(1);
  }
}

main();
```

**src/app.ts** — follow the exact pattern from `services/users/src/app.ts`:

- Register `@fastify/cors`, `@fastify/swagger`, `@scalar/fastify-api-reference`
- Register schemas, then routes
- Health routes at root, domain routes at `/api/v1/<name>`
- If auth required, register `@mbe/auth` plugin

**src/routes/health.ts** — standard health endpoint (copy from any existing service).

**.env**:

```
DATABASE_URL=postgresql://mbe:mbe_dev_password@localhost:5432/mbe
```

If auth required, add:

```
AUTH_AUTHORITY=https://dev-ytbgmz5ls3wh4xdx.us.auth0.com
AUTH_AUDIENCE=https://api.mattbutlerengineering.com
```

### 3. Post-scaffold updates

After creating the service directory:

1. **Install deps**: `pnpm install` from root
2. **Generate Prisma client**: `cd services/<name> && pnpm db:generate`
3. **Update root dev:local script** in root `package.json` if it needs db:push for the new service
4. **Update deploy-services.yml** — add `services/<name>/**` to the paths trigger
5. **Update CLAUDE.md port table** — add the new port assignment
6. **Create service CLAUDE.md** — document domain model, env vars, specific patterns
7. **Create a skill** at `.claude/skills/<name>-service/SKILL.md` for service-specific guidance

### 4. Verify

```bash
cd services/<name>
pnpm dev          # Should start on assigned port
pnpm test         # Should pass (health route test)
pnpm typecheck    # Should pass
pnpm lint         # Should pass
```

Attribution

mattbutlerengineeringmattbutlerengineering
View sourceMore from mattbutlerengineering →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

284722 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2192 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

9881 votes

Pentest

PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.

5491 votes
View all in development →