Source: mcollina/skills · Maintainer: community: Matteo Collina · License: MIT · Checked: 24 October 2026
What is the Fastify skill?
The Fastify skill is fastify-best-practices, an Agent Skill that teaches Claude Code, Codex and other agents how to build Fastify servers and REST APIs the way Fastify is designed to be used: encapsulated plugins, schema-first validation and serialization, async hooks, and testing with inject(). It is for Node.js backend developers who want agent-written Fastify code that follows the framework's conventions instead of Express habits.
It comes from mcollina/skills, described as "My own collection of skills for modern Node.js development." Matteo Collina is listed as a lead maintainer in Fastify's README, so the skill reflects a core maintainer's view, though it is not published by the Fastify organization.
As of 24 October 2026, its skills.sh page listed 81.0K installs (snapshot, 24 October 2026).
What does it do?
The skill's description says it "Guides development of Fastify Node.js backend servers and REST APIs using TypeScript or JavaScript," and lists the cases it covers: routes, plugins, JSON Schema validation, error handling, performance, authentication, CORS and security headers, databases, WebSockets and deployment. It ends with trigger terms such as "Fastify, Node.js server, REST API" and file names like server.ts and app.ts.
The SKILL.md itself is short. It gives a minimal runnable server, a reading order for common scenarios, an index of rule files, and five core principles:
- Encapsulation: "Fastify's plugin system provides automatic encapsulation."
- Schema-first: "Define schemas for validation and serialization."
- Performance: use Fastify's features correctly.
- Async/await: "All handlers and hooks support async functions."
- Minimal dependencies: "Prefer Fastify's built-in features and official plugins."
The reading order it suggests:
| Scenario | Rule files, in order |
|---|---|
| New to Fastify | plugins, routes, schemas |
| Adding authentication | plugins, hooks, authentication |
| Improving performance | schemas, serialization, performance |
| Setting up testing | routes, testing |
| Going to production | logging, configuration, deployment |
What's in the 19 rule files (each in rules/):
plugins.md: encapsulation, when to break it withfastify-plugin, registration order, autoloading. Fastify's encapsulation docs explain the same model.schemas.md: JSON Schema with TypeBox, shared schemas with$id, coercion, OpenAPI integration.typescript.md: Node.js type stripping, type providers, typing decorators, plugins and hooks.testing.md:inject()withnode:test, plugins in isolation, database tests with transactions.authentication.md:@fastify/jwt, refresh tokens, role and permission checks, API keys, sessions, password hashing, rate limiting.performance.md:@fastify/under-pressurefor load shedding, always defining response schemas, avoiding event loop blocking, request coalescing.database.md: official adapters such as@fastify/postgres,@fastify/mysql,@fastify/mongodband@fastify/redis, plus a repository pattern.deployment.md: graceful shutdown withclose-with-grace, health checks, Docker and Kubernetes examples, trust proxy settings.- Plus routes, hooks, error handling, logging with Pino, decorators, content-type parsing, serialization, CORS and security headers, WebSockets, configuration and HTTP proxying with
reply.from().
How do you install the Fastify skill?
The repo README lists the skills but gives no install command, so use the one from skills.sh:
npx skills add https://github.com/mcollina/skills --skill fastify-best-practices
Add -g to install for all projects, or -a claude-code to target Claude Code. Note the name mismatch: the folder in the repo is skills/fastify, while the skill name in the frontmatter, and the name the CLI matches, is fastify-best-practices.
Claude Code reads skills from .claude/skills/ in a project or ~/.claude/skills/ for your user, as its skills docs explain. Codex and Cursor read the same SKILL.md format; see Codex skills and Cursor skills.
The same repo has a companion node skill for general Node.js practice and an oauth skill with Fastify integration patterns, which you can add with more --skill flags.
How do you use it?
Mention Fastify, or a file such as server.ts or app.ts, and the skill can load on its own. You can also call it by name, as /fastify-best-practices in Claude Code.
Example prompts (suggestions, not quotes from the repo):
Scaffold a Fastify API for a todo app in TypeScript, with TypeBox schemas for every route.Move our auth decorator into a plugin and make it available to all routes under /api.Write node:test tests for the /users routes using inject(), including validation errors.Our Fastify service slows down under load. Review it against the performance rules.Get this Fastify app production ready: graceful shutdown, health checks and a Dockerfile.
Tips and limits
- All three audits pass. On skills.sh, Gen Agent Trust Hub, Socket and Snyk all showed Pass on 24 October 2026.
- Type stripping depends on your Node.js version. The skill says type stripping works from Node.js 22.6 with
--experimental-strip-types, and with plainnode app.tsin Node.js 23 and later. Node's TypeScript docs add that type stripping is enabled by default from v22.18.0 and v23.6.0, and that only erasable TypeScript syntax runs this way; for full TypeScript syntax the docs point to a third-party tool such as tsx. - Opinionated on tooling. Tests use
node:test, schemas use TypeBox, logging uses Pino. If your project uses Vitest or Zod, say so in your prompt or CLAUDE.md. - Rule files load on demand. The SKILL.md is an index; the agent reads only the rule files a task needs, so expect it to open several files on a broad request.
- No scripts. The skill is plain Markdown and runs nothing on its own.
- Broad triggers. The description includes generic trigger terms such as "REST API" and "backend framework", so the skill could load for generic Node.js API work too. If you use another framework in the same environment, install it per project rather than with
-g.
Under the MIT License you can copy and change it as long as you keep the copyright notice.
Save it in your Kipt library
In Kipt, open Skills and paste the skill's GitHub folder link into the import box. Kipt reads the SKILL.md and the rules/ files. Paste the repo link instead and Kipt shows a list of Collina's skills, so you can take node or oauth as well. Your skills live in your own private GitHub repo and install into Claude Code or Codex with one command:
npx skills add https://github.com/<you>/<repo>.git --all -g
Kipt is not affiliated with Matteo Collina or the Fastify project.
Similar skills
- API design principles skill: REST and GraphQL design rules to settle before you write routes.
- API design skill: Addy Osmani's contract-first API skill, with one error format and boundary validation.
- Postgres best practices skill: schema, index and query guidance for the database behind your API.
- Dockerfile skill: multi-stage Dockerfiles for shipping the service.