fastify-best-practices
Guides development of Fastify Node.js backend servers and REST APIs using TypeScript or JavaScript.
Skill by mcollina
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/mcollina-fastify-best-practices
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/fastify-best-practices
What's inside
- Skill name
fastify-best-practices- Description
- 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.
- License
- MIT
- Metadata
- tags: fastify, nodejs, typescript, backend, api, server, http
- Instructions
- 70 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- name: "fastify-best-practices" does not match folder "fastify"
Files (21)
- SKILL.md
- authentication.md · rules/
- configuration.md · rules/
- content-type.md · rules/
- cors-security.md · rules/
- database.md · rules/
- decorators.md · rules/
- deployment.md · rules/
- error-handling.md · rules/
- hooks.md · rules/
- http-proxy.md · rules/
- logging.md · rules/
- performance.md · rules/
- plugins.md · rules/
- routes.md · rules/
- schemas.md · rules/
- serialization.md · rules/
- testing.md · rules/
- typescript.md · rules/
- websockets.md · rules/
- tile.json
SKILL.md (first lines)
## 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:
```ts
import Fastify from 'fastify'
const app = Fastify({ logger: true })
app.get('/health', async (request, reply) => {
return { status: 'ok' }
})
const start = async () => {
await app.listen({ port: 3000, host: '0.0.0.0' })
}
start()
```
## Recommended Reading Order for Common Scenarios
- **New to Fastify?** Start with `plugins.md` → `routes.md` → `schemas.md`
- **Adding authentication:** `plugins.md` → `hooks.md` → `authentication.md`
- **Improving performance:** `schemas.md` → `serialization.md` → `performance.md`
- **Setting up testing:** `routes.md` → `testing.md`
- **Going to production:** `logging.md` → `configuration.md` → `deployment.md`
## How to use
Read individual rule files for detailed explanations and code examples:
- [rules/plugins.md](rules/plugins.md) - Plugin development and encapsulation
- [rules/routes.md](rules/routes.md) - Route organization and handlers
- [rules/schemas.md](rules/schemas.md) - JSON Schema validation
- [rules/error-handling.md](rules/error-handling.md) - Error handling patterns
- [rules/hooks.md](rules/hooks.md) - Hooks and request lifecycle
- [rules/authentication.md](rules/authentication.md) - Authentication and authorization
- [rules/testing.md](rules/testing.md) - Testing with inject()
- [rules/performance.md](rules/performance.md) - Performance optimization
- [rules/logging.md](rules/logging.md) - Logging with Pino
- [rules/typescript.md](rules/typescript.md) - TypeScript integration
- [rules/decorators.md](rules/decorators.md) - Decorators and extensions
- [rules/content-type.md](rules/content-type.md) - Content type parsing
- [rules/serialization.md](rules/serialization.md) - Response serialization
- [rules/cors-security.md](rules/cors-security.md) - CORS and security headers
- [rules/websockets.md](rules/websockets.md) - WebSocket support
- [rules/database.md](rules/database.md) - Database integration patterns
- [rules/configuration.md](rules/configuration.md) - Application configuration
- [rules/deployment.md](rules/deployment.md) - Production deployment
- [rules/http-proxy.md](rules/http-proxy.md) - HTTP proxying and reply.from()
## Core Principles
- **Encapsulation**: Fastify's plugin system provides automatic encapsulation
- **Schema-first**: Define schemas for validation and serialization
- **Performance**: Fastify is optimized for speed; use its features correctly
- **Async/await**: All handlers and hooks support async functions
- **Minimal dependencies**: Prefer Fastify's built-in features and official pluginsFrom mcollina/skills, MIT.
More from mcollina/skills
- 0.830score
octocat
mcollina
Use this skill whenever the prompt contains any `github.com` URL, even if the user only pastes a link and gives no GitHub-specific keywords.
SkillAFreshness: A★ 2KClaude Code +9 - 0.784score
nodejs-core
mcollina
Contributes to and debugs Node.js core, including nodejs/node commit and PR tone, contribution workflows, native crashes, V8 performance, node-gyp builds…
SkillBFreshness: B★ 2KClaude Code +9 - 0.652score
node
mcollina
Provides domain-specific best practices for Node.js development with TypeScript, covering type stripping, async patterns, error handling, streams, modules…
SkillDFreshness: D★ 2KClaude Code +9 - 0.652score
skill-optimizer
mcollina
Optimizes AI skills for activation, clarity, and cross-model reliability.
SkillDFreshness: D★ 2KClaude Code +9 - 0.652score
documentation
mcollina
Creates, structures, and reviews technical documentation following the Diátaxis framework (tutorials, how-to guides, reference, and explanation pages).
SkillDFreshness: D★ 2KClaude Code +9 - 0.652score
init
mcollina
Creates, updates, or optimizes an AGENTS.md file for a repository with minimal, high-signal instructions covering non-discoverable coding conventions, tooling…
SkillDFreshness: D★ 2KClaude Code +9 - 0.652score
oauth
mcollina
Implements OAuth 2.0/2.1 authorization flows in Fastify applications — configures authorization code with PKCE, client credentials, device flow, refresh token…
SkillDFreshness: D★ 2KClaude Code +9 - 0.652score
snipgrapher
mcollina
Configures and uses snipgrapher to generate polished code snippet images, including syntax-highlighted PNGs, SVGs, and WebP exports with custom themes…
SkillDFreshness: D★ 2KClaude Code +9 - 0.652score
typescript-magician
mcollina
Designs complex generic types, refactors `any` types to strict alternatives, creates type guards and utility types, and resolves TypeScript compiler errors.
SkillDFreshness: D★ 2KClaude Code +9 - 0.652score
linting-neostandard-eslint9
mcollina
Configures ESLint v9 flat config and neostandard for JavaScript and TypeScript projects, including migrating from legacy `.eslintrc*` files or the `standard`…
SkillDFreshness: D★ 2KClaude Code +9 - 0.455score
AGENTS.md · mcollina/skills
mcollina
AGENTS.md from mcollina/skills: 72 lines covering What this repository is, High-level architecture, Common commands, Editing rules for this repo and more.
TemplateDFreshness: D★ 2KCodex +5
Compare and alternatives
Featured in
Signals
- Stars
- 1,959
- Forks
- 147
- Open issues
- 5
- Last commit (this folder)
- Aug 17, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/mcollina/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from mcollina
- 0.830score
octocat
mcollina
Use this skill whenever the prompt contains any `github.com` URL, even if the user only pastes a link and gives no GitHub-specific keywords.
SkillAFreshness: A★ 2KClaude Code +9 - 0.784score
nodejs-core
mcollina
Contributes to and debugs Node.js core, including nodejs/node commit and PR tone, contribution workflows, native crashes, V8 performance, node-gyp builds…
SkillBFreshness: B★ 2KClaude Code +9 - 0.652score
node
mcollina
Provides domain-specific best practices for Node.js development with TypeScript, covering type stripping, async patterns, error handling, streams, modules…
SkillDFreshness: D★ 2KClaude Code +9 - 0.652score
skill-optimizer
mcollina
Optimizes AI skills for activation, clarity, and cross-model reliability.
SkillDFreshness: D★ 2KClaude Code +9 - 0.652score
documentation
mcollina
Creates, structures, and reviews technical documentation following the Diátaxis framework (tutorials, how-to guides, reference, and explanation pages).
SkillDFreshness: D★ 2KClaude Code +9 - 0.652score
init
mcollina
Creates, updates, or optimizes an AGENTS.md file for a repository with minimal, high-signal instructions covering non-discoverable coding conventions, tooling…
SkillDFreshness: D★ 2KClaude Code +9
Cite this page
fastify-best-practices skill. Agent Mart. https://agentmart.dev/skills/mcollina-fastify-best-practices (last updated 2026-10-24)