Skip to content

Production Fastify patterns for TypeScript APIs covering schema validation, plugins, security, and testing.

CCM score
53 of 100
skills.sh installs
590
GitHub stars
79
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers schema-first request and response validation with Zod or TypeBox type providers so runtime checks and static types stay aligned
  • Includes plugin encapsulation for routes, error handling with stable error shapes, and graceful shutdown on SIGINT and SIGTERM
  • Provides a security baseline with @fastify/helmet, @fastify/cors, and @fastify/rate-limit plus payload limits
  • Designed for TypeScript backends that need high throughput and in-memory route tests using Fastify's inject method

Install

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

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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";

Details

Repository
github.com/bobmatnyc/claude-mpm-skills
Category
Backend & APIs
First seen
Jun 3, 2026

Questions

What does the Fastify skill help with?

The Fastify skill guides production TypeScript backends built on Fastify, covering schema validation, plugins, typed routes, error handling, security hardening, logging, testing with inject, and graceful shutdown. It pairs Fastify with a type provider such as Zod or TypeBox so runtime validation and static types stay aligned.

How do I install the Fastify skill?

Run this command in your project: npx -y skills add bobmatnyc/claude-mpm-skills --skill fastify -y. Once installed, the agent can build and review Fastify routes with schema-first validation and plugin encapsulation.

Where does the Fastify skill rank in Backend & APIs?

The Fastify skill sits in the Backend & APIs category on Claude Marketplaces, alongside skills such as neon, firebase-basics and workers-best-practices. Its distinct focus is Fastify with TypeScript, including the Zod and TypeBox providers and the inject-based testing approach.

Who should use the Fastify skill?

It suits developers building TypeScript backends that need high performance, schema-based validation, clean plugin composition and strong testability. The skill also covers when to choose Fastify over Express and when to pick Zod over TypeBox.

More from bobmatnyc/claude-mpm-skills

All 154

Similar to Fastify

More Backend & APIs