This gives you production-ready Fastify patterns in TypeScript: schema-first validation with Zod or TypeBox type providers, plugin encapsulation for routes and middleware, error handling, security hardening with Helmet and CORS, and testing with inject. The quick start walks you through creating an instance, adding a type provider, registering plugins, and setting up error handlers. It's opinionated about avoiding Express-style middleware chaos by leaning into Fastify's schema validation and plugin architecture. The decision trees helpfully compare Zod versus TypeBox (use Zod if you're already standardized on it, TypeBox for OpenAPI generation) and explain when you'd pick Fastify over Express. Good for teams building high-performance APIs who want type safety and validation to stay in sync without duplicating schemas.

skills.sh installs
582
GitHub stars
79
last updated
Aug 21, 2026

Install

$ npx -y skills add bobmatnyc/claude-mpm-skills --skill fastify --agent claude-code

Installs into .claude/skills of the current project.

Files

Fastify (TypeScript) - Production Backend Framework

Overview

Fastify is a high-performance Node.js web framework built around JSON schema validation, encapsulated plugins, and great developer ergonomics. In TypeScript, pair Fastify with a type provider (Zod or TypeBox) to keep runtime validation and static types aligned.

Quick Start

Minimal server

✅ Correct: basic server with typed response

import Fastify from "fastify";

const app = Fastify({ logger: true });

app.get("/health", async () => ({ status: "ok" as const }));

await app.listen({ host: "0.0.0.0", port: 3000 });

❌ Wrong: start server without awaiting listen

app.listen({ port: 3000 });
console.log("started"); // races startup and hides bind failures

Schema Validation + Type Providers

Fastify validates requests/responses via JSON schema. Use a type provider to avoid duplicating types.

Zod provider (recommended for full-stack TypeScript)

✅ Correct: Zod schema drives validation + types

import Fastify from "fastify";
import { z } from "zod";
import { ZodTypeProvider } from "fastify-type-provider-zod";

Sponsors

Details

Repository
github.com/bobmatnyc/claude-mpm-skills
Categories
Testing & QA, Security, DevOps & CI/CD, Debugging
First seen
Jun 3, 2026

More from bobmatnyc/claude-mpm-skills

All 158
1eyadkelleh avatarsecurity-webshellseyadkelleh/awesome-skills-securityWeb shell samples for detection and analysis: PHP, ASP, ASPX, JSP, Python, Perl shells. Use for security research and detection system testing.580skills.sh installs
2new-silvermoon avatarandroid-emulator-skillnew-silvermoon/awesome-android-agent-skillsProduction-ready scripts for Android app testing, building, and automation. Provides semantic UI navigation, build automation, log monitoring, and emulator life578skills.sh installs
3jshchnz avatarschedulerjshchnz/claude-code-schedulerSchedules Claude Code tasks to run automatically at specific times using native OS schedulers (launchd on macOS, crontab on Linux, Task Scheduler on Windows). H574skills.sh installs
4longbridge avatarlongbridge-valuationlongbridge/skillsValuation analysis for a single stock via Longbridge — current PE / PB / PS / EV-EBITDA snapshot, historical percentile (1–3 years), industry median + relative 571skills.sh installs
5alirezarezvani avatarstatistical-analystalirezarezvani/claude-skillsRun hypothesis tests, analyze A/B experiment results, calculate sample sizes, and interpret statistical significance with effect sizes. Use when you need to val566skills.sh installs
6rshankras avatarproduct-developmentrshankras/claude-code-apple-skillsEnd-to-end product development for iOS/macOS apps. Covers market research, competitive analysis, PRD generation, architecture specs, UX design, implementation g564skills.sh installs