home / skills / partme-ai / full-stack-skills / fastify
This skill provides comprehensive guidance for Fastify to build high-performance Node.js APIs, including routing, plugins, schemas, hooks, and optimization.
npx playbooks add skill partme-ai/full-stack-skills --skill fastifyReview the files below or copy the command above to add this skill to your agents.
---
name: fastify
description: Provides comprehensive guidance for Fastify framework including routing, plugins, schemas, hooks, and performance optimization. Use when the user asks about Fastify, needs to create high-performance Node.js applications, implement Fastify plugins, or optimize API performance.
license: Complete terms in LICENSE.txt
---
## When to use this skill
Use this skill whenever the user wants to:
- [待完善:根据具体工具添加使用场景]
## How to use this skill
[待完善:根据具体工具添加使用指南]
## Best Practices
[待完善:根据具体工具添加最佳实践]
## Keywords
[待完善:根据具体工具添加关键词]
This skill provides comprehensive, practical guidance for building high-performance Node.js services with the Fastify framework. It covers routing, plugin authoring, schema-driven validation, lifecycle hooks, and proven performance optimization techniques. The material is focused on actionable patterns that help you design maintainable, fast APIs and plugins.
The skill inspects your use case and recommends Fastify patterns suited to it: route design, JSON schema validation, and plugin composition. It explains how to implement and register plugins, use hooks for request lifecycle control, and apply serialization and schema strategies to reduce overhead. It also offers profiling and benchmarking tips to identify and remove bottlenecks.
Do I need to write JSON schemas for every route?
You should define schemas for routes where performance or data correctness matters; reuse shared schemas to minimize duplication.
How do Fastify plugins differ from middleware?
Plugins encapsulate behavior, can register routes, decorators, and hooks, and are designed for composition and isolation, while middleware is typically a function chain without the plugin lifecycle.