fastify-docs
SKILL.md
Fastify Docs
Use the local references as the primary source of truth for Fastify behavior.
Quick Start
- Start from
## Embedded Reference Guide (v5.7.x)below. - Search first, do not open files blindly:
rg -n "server|route|plugin|hook|schema|validation|serialization" references/
- Read only the files needed for the active question.
- Prefer
reference-*.mdfiles for API semantics and exact behavior. - Use
guides-*.mdfiles for patterns, architecture, and operational advice. - For plugin/package discovery, use ecosystem.md.
Answering Rules
- Ground claims in retrieved Fastify reference files.
- Cite exact local file paths in responses when explaining non-trivial behavior.
- State uncertainty explicitly when the mirrored docs do not cover an edge case.
- Avoid inventing Fastify options, hooks, lifecycle order, or plugin behavior.
Scope Discipline
- Keep context small: load only relevant documents from
references/. - Treat
v5.7.xreferences as the canonical version for this snapshot. - If a needed topic is missing from
v5.7.x, state the gap and request a refresh from a newer snapshot. - Use
## Embedded Reference Guide (v5.7.x)as the single navigation entrypoint in this file.
Embedded Reference Guide (v5.7.x)
Index
Core Documents
For the full table of contents (TOC), see below. The following list is a subset of the full TOC that detail core Fastify APIs and concepts in order of most likely importance to the reader:
- Server: Documents the core Fastify API. Includes documentation for the factory function and the object returned by the factory function.
- Lifecycle: Explains the Fastify request lifecycle and illustrates where Hooks are available for integrating with it.
- Routes: Details how to register routes with Fastify and how Fastify builds and evaluates the routing trie.
- Request: Details Fastify's request object that is passed into each request handler.
- Reply: Details Fastify's response object available to each request handler.
- Validation and Serialization: Details Fastify's support for validating incoming data and how Fastify serializes data for responses.
- Plugins: Explains Fastify's plugin architecture and API.
- Encapsulation: Explains a core concept upon which all Fastify plugins are built.
- Decorators: Explains the server, request, and response decorator APIs.
- Hooks: Details the API by which Fastify plugins can inject themselves into Fastify's handling of the request lifecycle.
Reference Documentation Table Of Contents
This table of contents is in alphabetical order.
- Content Type Parser: Documents Fastify's default content type parser and how to add support for new content types.
- Decorators: Explains the server, request, and response decorator APIs.
- Encapsulation: Explains a core concept upon which all Fastify plugins are built.
- Errors: Details how Fastify handles errors and lists the standard set of errors Fastify generates.
- Hooks: Details the API by which Fastify plugins can inject themselves into Fastify's handling of the request lifecycle.
- HTTP2: Details Fastify's HTTP2 support.
- Lifecycle: Explains the Fastify request lifecycle and illustrates where Hooks are available for integrating with it.
- Logging: Details Fastify's included logging and how to customize it.
- Long Term Support: Explains Fastify's long term support (LTS) guarantee and the exceptions possible to the semver contract.
- Middleware: Details Fastify's support for Express.js style middleware.
- Plugins: Explains Fastify's plugin architecture and API.
- Reply: Details Fastify's response object available to each request handler.
- Request: Details Fastify's request object that is passed into each request handler.
- Routes: Details how to register routes with Fastify and how Fastify builds and evaluates the routing trie.
- Server: Documents the core Fastify API. Includes documentation for the factory function and the object returned by the factory function.
- TypeScript: Documents Fastify's TypeScript support and provides recommendations for writing applications in TypeScript that utilize Fastify.
- Validation and Serialization: Details Fastify's support for validating incoming data and how Fastify serializes data for responses.
- Warnings: Details the warnings Fastify emits and how to solve them.
Index
Guides Table Of Contents
This table of contents is in alphabetical order.
- Benchmarking: This guide introduces how to benchmark applications based on Fastify.
- Contributing: Details how to participate in the development of Fastify, and shows how to setup an environment compatible with the project's code style.
- Delay Accepting Requests: A practical guide on how to delay serving requests to specific routes until some condition is met in your application. This guide focuses on solving the problem using
Hooks,Decorators, andPlugins. - Detecting When Clients Abort: A practical guide on detecting if and when a client aborts a request.
- Ecosystem: Lists all core plugins and many known community plugins.
- Fluent Schema: Shows how JSON Schema can be written with a fluent API and used in Fastify.
- Getting Started: Introduction tutorial for Fastify. This is where beginners should start.
- Migration Guide (v4): Details how to migrate to Fastify v4 from earlier versions.
- Migration Guide (v3): Details how to migrate to Fastify v3 from earlier versions.
- Plugins Guide: An informal introduction to writing Fastify plugins.
- Prototype Poisoning: A description of how the prototype poisoning attack works and is mitigated.
- Recommendations: Recommendations for how to deploy Fastify into production environments.
- Serverless: Details on how to deploy Fastify applications in various Function as a Service (FaaS) environments.
- Style Guide: Explains the writing style we use for the Fastify documentation for those who want to contribute documentation.
- Testing: Explains how to write unit tests for Fastify applications.
- Write Plugin: A set of guidelines for what the Fastify team considers good practices for writing a Fastify plugin.
Creation note: This file was created by concatenating reference.md and guides.md from the same Fastify v5.7.x snapshot to provide one entrypoint.
Weekly Installs
4
Repository
wzs/skillsFirst Seen
Feb 14, 2026
Security Audits
Installed on
opencode4
gemini-cli4
github-copilot4
codex4
kimi-cli4
amp4