Fastify High-Performance API Patterns
Created by CodeCraft LLCBuild and review Node.js APIs with Fastify
Product and technology names are trademarks of their respective owners, used only to identify what this skill covers. CodeCraft LLC is not affiliated with or endorsed by them.
by Jace (@jamick)v1.4.2 · updated 2026-12-01Report copyright infringement
Description
Build and review Node.js APIs with Fastify - app setup with Pino logging and graceful shutdown, route schemas for body, params, query and response with TypeBox and the type provider (validation via ajv, fast serialization, typed requests), the plugin system and encapsulation (fastify-plugin vs scoped plugins, decorators and their TypeScript declarations), lifecycle hooks (onRequest, preValidation, preHandler, onSend, onClose) and returning replies from async hooks, setErrorHandler for validation and application errors, per-request logging, and testing with app.inject(). Use whenever the project depends on fastify, the user builds or migrates an API to Fastify, adds plugins, hooks, schemas or auth, sees "Reply was already sent", decorators missing in routes, fields disappearing from responses, or asks Fastify vs Express.
Included with all-access
$9.00 one-time, permanent access
or
Buy 2 or more together for up to 40% off · View cart
You get a licence, not ownership. Access lasts while this skill is available on AiSkillz; if it's removed within 90 days of purchase, we'll send you a copy to keep. Terms
Official and free skills are included with the all-access subscription
Changelog
Subscribers also see which files changed in each version.
v1.4.2Dec 1, 2026Latest
Added
- README: a **Sources** line listing the official pages the skill is written from, each link checked, so the source-overlap check can run against them.
v1.4.1Nov 29, 2026
Changed
- Added a contents list to reference files over 100 lines (
setup-schemas-plugins.md,hooks-errors-logging-testing.md), so a partial read still shows every section.
v1.4.0Nov 28, 2026
Changed
- Checked against Fastify GitHub releases and security advisories, the Server reference, the v5 migration guide, and the TypeBox and type-provider READMEs (November 2026).
- TypeBox: the type provider now takes the
typeboxpackage (1.x, ESM only) as a peer; install and imports updated,@sinclair/typebox0.x noted as LTS. - Deep-dive section made on-demand with open/skip triggers.
Added
- Patch-level Blocker: 2026 Fastify advisories (auth bypass via encapsulated not-found handlers, validation bypasses, body replacement, DoS); take 5.12.8+.
- Server limits:
requestTimeout(default no limit),bodyLimit,trustProxyas an address list (hop counts are spoofable); helmet, CORS and rate-limit plugins; shutdown hard-stop timer. - Pitfalls and checklist items for the above.
v1.3.0Nov 20, 2026
Added
- Review method: every code review starts by mapping the code flows in scope and gives each flow its own sub-agent at high effort, which reviews that flow end to end against this checklist; the main agent merges, re-checks Blockers and de-duplicates. Covers single-flow reviews, nested sub-agents, failed sub-agents and environments without sub-agents.
v1.2.0Nov 6, 2026
Changed
- Review report rule: reviews that cover changes (a diff, PR or uncommitted work) open with a short "What the changes do" section - factual bullets grouped by purpose, inferred intent marked, deploy or migration impact stated.
v1.1.0Nov 4, 2026
Changed
- Review report rule at the top of the skill, loaded before any review: one entry per finding as
Level · type · file:line · finding · proposed fix, outside facts sourced or marked unverified, and no narrative.
v1.0.0Oct 16, 2026
Added
- First release.