Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add ushibo/brigade --skill fastify-best-practicesgit clone --depth 1 https://github.com/ushibo/brigadeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/ushibo/brigade/fastify-best-practices)<a href="https://agentmods.dev/skills/ushibo/brigade/fastify-best-practices"><img src="https://agentmods.dev/badge/skills/ushibo/brigade/fastify-best-practices.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00137 | $0.00867 |
| Opus 5 | $0.00068 | $0.00434 |
| Sonnet 5 | $0.00027 | $0.00173 |
| Haiku 4.5 | $0.00014 | $0.00087 |
Grade A, and why
fastify-best-practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
100% identical to fastify-best-practices — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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:
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 - Plugin development and encapsulation
- rules/routes.md - Route organization and handlers
- rules/schemas.md - JSON Schema validation
- rules/error-handling.md - Error handling patterns
- rules/hooks.md - Hooks and request lifecycle
- rules/authentication.md - Authentication and authorization
- rules/testing.md - Testing with inject()
- rules/performance.md - Performance optimization
- rules/logging.md - Logging with Pino
- rules/typescript.md - TypeScript integration
- rules/decorators.md - Decorators and extensions
- rules/content-type.md - Content type parsing
- rules/serialization.md - Response serialization
- rules/cors-security.md - CORS and security headers
- rules/websockets.md - WebSocket support
- rules/database.md - Database integration patterns
- rules/configuration.md - Application configuration
- rules/deployment.md - Production deployment
- rules/http-proxy.md - HTTP proxying and reply.from()
What ships with it
20 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- rules/authentication.md 13 KB
- rules/configuration.md 5.0 KB
- rules/content-type.md 8.1 KB
- rules/cors-security.md 8.8 KB
- rules/database.md 7.1 KB
- rules/decorators.md 9.5 KB
- rules/deployment.md 8.8 KB
- rules/error-handling.md 9.7 KB
- rules/hooks.md 9.8 KB
- rules/http-proxy.md 5.3 KB
- rules/logging.md 7.8 KB
- rules/performance.md 9.0 KB
- rules/plugins.md 7.6 KB
- rules/routes.md 9.7 KB
- rules/schemas.md 12 KB
- rules/serialization.md 9.5 KB
- rules/testing.md 11 KB
- rules/typescript.md 9.1 KB
- rules/websockets.md 8.8 KB
- tile.json 869 B
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 76 lines · 137 tokens per session scan A d1d90340de01
fastify-best-practices is a skill published in the GitHub repository ushibo/brigade (1 stars, last pushed 2mo ago), licensed MIT. It adds 137 tokens to every session and 867 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to fastify-best-practices, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
dev-team-node
Coordinates Node.js/TypeScript development (Next.js, NestJS, Vite, Express) with a team of specialized agents and inline quality gates. Use for multi-step Node.js tasks that need decomposition and multi-agent coordination.
nest-best-practices
NestJS framework best practices and production patterns. Use whenever working with NestJS — creating modules, controllers, services, DTOs, guards, interceptors, pipes, middleware, or building REST/GraphQL/microservice APIs. Also use when setting up authentication, authorization, validation, queues, health checks…
node-backend
Node.js backend development patterns for Express, NestJS, Fastify, and Hono. Use when implementing APIs, authentication, middleware, services, and server-side logic with Node.js and TypeScript. Provides project structure, code patterns, and best practices.
better-auth
Skill for integrating Better Auth - comprehensive TypeScript authentication framework for Cloudflare D1, Next.js, Nuxt, and 15+ frameworks. Use when adding auth, encountering D1 adapter errors, or implementing OAuth/2FA/RBAC features.
nodejs-expert
Use when writing or debugging Node.js code — async/await pitfalls (forEach not awaiting, unhandled promise rejections), Express/NestJS/Fastify patterns and error-handler setup, package.json/npm/middleware issues, event loop and stream backpressure, ESM dirname gaps, or choosing between Express/NestJS/Fastify…
typescript-best-practices
TypeScript/Node.js best practices. Use when writing or reviewing TypeScript code. Covers type safety, async patterns, and error handling.