Guides development of Fastify Node.js backend servers and REST APIs using TypeScript or JavaScript. Use when building, configuring, or debugging a Fastify application — including defining routes, implementing plugins, setting up JSON Schema validation, handling errors, optimising performance, managing authentication, configuring CORS and security headers, integrating databases, working with WebSockets, and deploying to production. Covers the full Fastify request lifecycle (hooks, serialization, logging with Pino) and TypeScript integration via strip types. Trigger terms: Fastify, Node.js server, REST API, API routes, backend framework, fastify.config, server.ts, app.ts.
Start a fresh conversation. Replace the highlighted placeholders.
Use fastify-best-practices to build or improve [Fastify API feature] in [project], with appropriately organized routes, schemas, error handling, security, logging, and tests.
Required inputs
[Fastify API feature]
[project]
User-approved starter prompt based on a pinned source version; check current skill requirements before running. Task evidence ↗
SKILL.md
name: fastify-best-practicesdescription: "Guides development of Fastify Node.js backend servers and REST APIs using TypeScript or JavaScript. Use when building, configuring, or debugging a Fastify application — including defining routes, implementing plugins, setting up JSON Schema validation, handling errors, optimising performance, managing authentication, configuring CORS and security headers, integrating databases, working with WebSockets, and deploying to production. Covers the full Fastify request lifecycle (hooks, serialization, logging with Pino) and TypeScript integration via strip types. Trigger terms: Fastify, Node.js server, REST API, API routes, backend framework, fastify.config, server.ts, app.ts."metadata: tags: fastify, nodejs, typescript, backend, api, server, http
When to use
Use this skill when you need to:
Develop backend applications using Fastify
Implement Fastify plugins and route handlers
Get guidance on Fastify architecture and patterns
Use TypeScript with Fastify (strip types)
Implement testing with Fastify's inject method
Configure validation, serialization, and error handling
Quick Start
A minimal, runnable Fastify server to get started immediately: