Fastify Best Practices
Enforces mcollina's Fastify best practices – ensuring performance, security, and maintainability in your Node.js API.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add fastify-best-practices npx -- -y @trustedskills/fastify-best-practices
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"fastify-best-practices": {
"command": "npx",
"args": [
"-y",
"@trustedskills/fastify-best-practices"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill provides best practices and guidelines for using Fastify, a high-performance web framework for Node.js. It helps developers build scalable, secure, and efficient backend services by leveraging Fastify's features such as plugins, decorators, and routing.
When to use it
- When setting up a new Fastify project and looking for structured guidance.
- When optimizing an existing Fastify application for performance or security.
- When integrating third-party plugins into a Fastify app and needing best practices for compatibility.
- When preparing documentation or training materials on Fastify development.
Key capabilities
- Guidance on organizing project structure and file layout.
- Recommendations for using decorators and plugins effectively.
- Security tips, including input validation and rate limiting.
- Performance optimization strategies like caching and middleware usage.
Example prompts
- "How should I organize my Fastify project files?"
- "What are the best practices for securing a Fastify API endpoint?"
- "Can you explain how to use decorators in Fastify with examples?"
Tips & gotchas
- Ensure your Node.js environment is up-to-date, as Fastify relies on modern JavaScript features.
- Always validate inputs and sanitize outputs to prevent common security vulnerabilities like injection attacks.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.