Community编程与开发github.com

mcollina/fastify-best-practices

指导使用 TypeScript 或 JavaScript 开发 Fastify Node.js 后端服务器和 REST API。适用于构建、配置或调试 Fastify 应用,包括定义路由、实现插件、设置 JSON Schema 验证、处理错误、优化性能、管理认证、配置 CORS 和安全头部、集成数据库、使用 WebSocket 以及部署到生产环境。

fastify-best-practices 是什么?

该技能(mcollina/fastify-best-practices)旨在为开发者提供基于 Fastify 框架构建 Node.js 后端服务器和 REST API 的全面最佳实践指南。它覆盖了从路由定义、插件实现、JSON Schema 验证设置到错误处理、性能优化、身份认证、CORS 和安全头部配置的完整开发流程。此外,技能还深入涵盖了 Fastify 的完整请求生命周期(钩子、序列化、使用 Pino 进行日志记录)以及通过 strip types 集成 TypeScript 的方法。该技能支持 Claude Code、Cursor、Codex 等主流 AI 代理平台,开发者可通过提及 'Fastify'、'Node.js server'、'REST API' 等触发词来激活相关指导,从而高效地学习、应用和调试 Fastify 应用。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mcollina/skills/tree/main/skills/fastify-best-practices

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

fastify-best-practices 是做什么的?

指导使用 TypeScript 或 JavaScript 开发 Fastify Node.js 后端服务器和 REST API。适用于构建、配置或调试 Fastify 应用——包括定义路由、实现插件、设置 JSON Schema 验证、处理错误、优化性能、管理认证、配置 CORS 和安全头部、集成数据库、使用 WebSocket 以及部署到生产环境。涵盖 Fastify 的完整请求生命周期(钩子、序列化、使用 Pino 进行日志记录)以及通过 strip types 集成 TypeScript。触发词:Fastify、Node.js server、REST API、API routes、backend framework、fastify.config、server.ts、app.ts。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

mcollina/documentation

Creates, structures, and reviews technical documentation following the Diátaxis framework (tutorials, how-to guides, reference, and explanation pages). Use when a user needs to write or reorganize docs, structure a tutorial vs. a how-to guide, build reference docs or API documentation, create explanation pages, choose between Diátaxis documentation types, or improve existing documentation structure. Trigger terms include: documentation structure, Diátaxis, tutorials vs how-to guides, organize docs, user guide, reference docs, technical writing.

mcollina/node

Provides domain-specific best practices for Node.js development with TypeScript, covering type stripping, async patterns, error handling, streams, modules, testing, performance, caching, logging, and more. Use when setting up Node.js projects with native TypeScript support, configuring type stripping (--experimental-strip-types), writing Node 22+ TypeScript without a build step, or when the user mentions 'native TypeScript in Node', 'strip types', 'Node 22 TypeScript', '.ts files without compilation', 'ts-node alternative', or needs guidance on error handling, graceful shutdown, flaky tests, profiling, or environment configuration in Node.js. Helps configure tsconfig.json for type stripping, set up package.json scripts, handle module resolution and import extensions, and apply robust patterns across the full Node.js stack.

mcollina/nodejs-core

Debugs native module crashes, optimizes V8 performance, configures node-gyp builds, writes N-API/node-addon-api bindings, and diagnoses libuv event loop issues in Node.js. Use when working with C++ addons, native modules, binding.gyp, node-gyp errors, segfaults, memory leaks in native code, V8 optimization/deoptimization, libuv thread pool tuning, N-API or NAN bindings, build system failures, or any Node.js internals below the JavaScript layer.

mcollina/typescript-magician

Designs complex generic types, refactors `any` types to strict alternatives, creates type guards and utility types, and resolves TypeScript compiler errors. Use when the user asks about TypeScript (TS) types, generics, type inference, type guards, removing `any` types, strict typing, type errors, `infer`, `extends`, conditional types, mapped types, template literal types, branded/opaque types, or utility types like `Partial`, `Record`, `ReturnType`, and `Awaited`.

相关技能