fastify
Guides AI agents to write correct, idiomatic Fastify code using plugins, routes, schemas, and lifecycle hooks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Guides AI agents to write correct, idiomatic Fastify code using plugins, routes, schemas, and lifecycle hooks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Guides AI agents to produce accurate, well-structured technical documentation in Markdown with Mermaid diagrams.
Guides AI agents to write idiomatic, correct Node.js JavaScript code.
Guides AI agents to use Pino logging correctly — levels, structured logs, child loggers, and Fastify integration.
Guides AI agents to write secure Fastify/Node.js code — input validation, authentication, injection prevention, and safe error handling.
基于 SOC 职业分类
| name | fastify |
| description | Guides AI agents to write correct, idiomatic Fastify code using plugins, routes, schemas, and lifecycle hooks. |
| metadata | {"tags":["fastify","nodejs","http","api"]} |
Use this skill when writing or reviewing any Fastify server code: route definitions, plugins, request validation, error handling, or server lifecycle.
onRequest, preHandler, onSend, etc.)fastify-plugin, encapsulation, registration order.$ref.setErrorHandler, httpErrors, and safe error propagation.// Minimal idiomatic server
import Fastify from 'fastify';
const app = Fastify({ logger: true });
app.register(import('./routes/users.js'));
await app.listen({ port: 3000, host: '0.0.0.0' });
// Route with schema
app.post('/users', {
schema: {
body: { $ref: 'CreateUserBody#' },
response: { 201: { $ref: 'User#' } },
},
handler: async (request, reply) => {
const user = await createUser(request.body);
return reply.code(201).send(user);
},
});