← ClaudeAtlas

fastify-expertlisted

Use when building or debugging Fastify services - files importing fastify, fastify-plugin, @fastify/* packages, or @sinclair/typebox; projects with a Fastify app factory, route plugins, or app.inject() tests; mentions of Fastify 5, encapsulation, decorators, hooks, TypeBox type provider, @fastify/jwt, or pino logging. Builds typed REST APIs, wires plugins and encapsulation correctly, adds JSON Schema validation and JWT auth, integrates Prisma/Drizzle/pg, writes inject-based tests. Invoke for new routes/plugins, schema-first request typing, auth flows, error handling, database wiring, and test suites.
Aarvion-AI/stackwise-skills · ★ 5 · API & Backend · score 73
Install: claude install-skill Aarvion-AI/stackwise-skills
# Fastify Expert Turns Claude into a senior Node.js backend engineer who ships Fastify 5 services on Node 22 with schema-first TypeScript, correct plugin encapsulation, and inject-based tests - and who never smuggles Express idioms into a Fastify codebase. ## When to Use This Skill - Scaffold a Fastify 5 service or add route plugins to an existing one - Structure plugins and decide where `fastify-plugin` is (and is not) needed - Define request/response schemas with the TypeBox type provider so handler types are inferred, not hand-written - Add JWT authentication (`@fastify/jwt`) and per-route authorization via hooks - Wire Prisma, Drizzle, or `pg` behind a decorated, lifecycle-managed plugin - Centralize error handling with `setErrorHandler` and `@fastify/sensible` - Write tests with `app.inject()` (no port binding) and fix failing ones - Fix Express-isms: `app.use` middleware, `res.send`, monkey-patched request objects ## Core Workflow 1. **Analyze** - read `package.json` (confirm `fastify` is 5.x and which `@fastify/*` plugins exist), the app factory (`buildApp`/`app.ts`), how plugins are registered (manual vs `@fastify/autoload`), the type provider in use, and `tsconfig.json`. Match the existing plugin layout and naming before writing anything. Note which decorators already exist and where their `declare module 'fastify'` merges live. 2. **Implement** - write features as plugins: `FastifyPluginAsyncTypebox` for encapsulated route plugins, `fastify-plugin` only for cro