
Fastify
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-codeInstalls 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- Api Design Patterns579
- Skill Creator569
- Git Workflow568
- Express Production519
- Golang Grpc518
- Axum500
- Hono Core500
- Zustand496
- Asyncio494
- Mcp Protocol Builder491
- Typescript Core487
- Bug Fix482
- Supabase Backend Platform482
- Mypy478
- Threat Modeling474
- Wordpress Block Editor Fse474
- Celery470
- Web Performance Optimization469
- Local Llm Ops464
- Golang Testing Strategies458
- Wordpress Advanced Architecture455
- Golang Http Frameworks453
- Sveltekit452
- Digitalocean Management451