[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7326Q15CP23CG28SSJCW5DV":3,"skill-same:01M7326Q15CP23CG28SSJCW5DV":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":14,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M7326Q15CP23CG28SSJCW5DV","fastify",null,"Production Fastify (TypeScript) patterns: schema validation, plugins, typed routes, error handling, security hardening, logging, testing with inject, and graceful shutdown","julio211916\u002FTlantiCAD-Studio-V0.1-alpha","julio211916","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128201165?v=4","01M730ENY015MHFY82VKR6AGGR","José Carlos amador garcia","01M730ENYT83EWH6EXRHF9FTXV",0,"MIT","https:\u002F\u002Fgithub.com\u002Fjulio211916\u002FTlantiCAD-Studio-V0.1-alpha\u002Fblob\u002Fmain\u002Fskills\u002Fju\u002Fskills\u002Ffastify\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: fastify\ndescription: \"Production Fastify (TypeScript) patterns: schema validation, plugins, typed routes, error handling, security hardening, logging, testing with inject, and graceful shutdown\"\nversion: 1.0.0\ncategory: toolchain\nauthor: Claude MPM Team\nlicense: MIT\nprogressive_disclosure:\n  entry_point:\n    summary: \"Build fast, type-safe Node APIs with Fastify using schema-first validation, plugin encapsulation, and production middleware patterns\"\n    when_to_use: \"When building TypeScript backends needing high performance, schema-based validation, clean plugin composition, and strong testability\"\n    quick_start: \"1. Create Fastify instance 2. Add Type Provider (Zod\u002FTypeBox) 3. Register plugins (CORS\u002FHelmet) 4. Add error handler + logging 5. Test with inject()\"\n  token_estimate:\n    entry: 130\n    full: 5200\ncontext_limit: 900\ntags:\n  - typescript\n  - fastify\n  - nodejs\n  - api\n  - validation\n  - json-schema\n  - security\n  - testing\nrequires_tools: []\n---\n\n# Fastify (TypeScript) - Production Backend Framework\n\n## Overview\n\nFastify is a high-performance Node.js web framework built around JSON schema validation, encapsulated plugins, and great developer ergonomics. In TypeScript, pair Fastify with a type provider (Zod or TypeBox) to keep runtime validation and static types aligned.\n\n## Quick Start\n\n### Minimal server\n\n✅ **Correct: basic server with typed response**\n```ts\nimport Fastify from \"fastify\";\n\nconst app = Fastify({ logger: true });\n\napp.get(\"\u002Fhealth\", async () => ({ status: \"ok\" as const }));\n\nawait app.listen({ host: \"0.0.0.0\", port: 3000 });\n```\n\n❌ **Wrong: start server without awaiting listen**\n```ts\napp.listen({ port: 3000 });\nconsole.log(\"started\"); \u002F\u002F races startup and hides bind failures\n```\n\n## Schema Validation + Type Providers\n\nFastify validates requests\u002Fresponses via JSON schema. Use a type provider to avoid duplicating types.\n\n### Zod provider (recommended for full-stack TypeScript)\n\n✅ **Correct: Zod schema drives validation + types**\n```ts\nimport Fastify from \"fastify\";\nimport { z } from \"zod\";\nimport { ZodTypeProvider } from \"fastify-type-provider-zod\";\n\nconst app = Fastify({ logger: true }).withTypeProvider\u003CZodTypeProvider>();\n\nconst Query = z.object({ q: z.string().min(1) });\n\napp.get(\n  \"\u002Fsearch\",\n  { schema: { querystring: Query } },\n  async (req) => {\n    return { q: req.query.q };\n  },\n);\n\nawait app.listen({ port: 3000 });\n```\n\n### TypeBox provider (recommended for OpenAPI + performance)\n\n✅ **Correct: TypeBox schema**\n```ts\nimport Fastify from \"fastify\";\nimport { Type } from \"@sinclair\u002Ftypebox\";\nimport { TypeBoxTypeProvider } from \"@fastify\u002Ftype-provider-typebox\";\n\nconst app = Fastify({ logger: true }).withTypeProvider\u003CTypeBoxTypeProvider>();\n\nconst Params = Type.Object({ id: Type.String({ minLength: 1 }) });\nconst Reply = Type.Object({ id: Type.String() });\n\napp.get(\n  \"\u002Fusers\u002F:id\",\n  { schema: { params: Params, response: { 200: Reply } } },\n  async (req) => ({ id: req.params.id }),\n);\n\nawait app.listen({ port: 3000 });\n```\n\n## Plugin Architecture (Encapsulation)\n\nUse plugins to keep concerns isolated and testable (auth, db, routes).\n\n✅ **Correct: route plugin**\n```ts\nimport type { FastifyPluginAsync } from \"fastify\";\n\nexport const usersRoutes: FastifyPluginAsync = async (app) => {\n  app.get(\"\u002F\", async () => [{ id: \"1\" }]);\n  app.get(\"\u002F:id\", async (req) => ({ id: (req.params as any).id }));\n};\n```\n\n✅ **Correct: register with a prefix**\n```ts\napp.register(usersRoutes, { prefix: \"\u002Fapi\u002Fv1\u002Fusers\" });\n```\n\n## Error Handling\n\nCentralize unexpected failures and return stable error shapes.\n\n✅ **Correct: setErrorHandler**\n```ts\napp.setErrorHandler((err, req, reply) => {\n  req.log.error({ err }, \"request failed\");\n  reply.status(500).send({ error: \"internal\" as const });\n});\n```\n\n## Security Hardening (Baseline)\n\nAdd standard security plugins and enforce payload limits.\n\n✅ **Correct: Helmet + CORS + rate limiting**\n```ts\nimport helmet from \"@fastify\u002Fhelmet\";\nimport cors from \"@fastify\u002Fcors\";\nimport rateLimit from \"@fastify\u002Frate-limit\";\n\nawait app.register(helmet);\nawait app.register(cors, { origin: false });\nawait app.register(rateLimit, { max: 100, timeWindow: \"1 minute\" });\n```\n\n## Graceful Shutdown\n\nClose HTTP server and downstream clients (DB, queues) on SIGINT\u002FSIGTERM.\n\n✅ **Correct: close on signals**\n```ts\nconst close = async (signal: string) => {\n  app.log.info({ signal }, \"shutting down\");\n  await app.close();\n  process.exit(0);\n};\n\nprocess.on(\"SIGINT\", () => void close(\"SIGINT\"));\nprocess.on(\"SIGTERM\", () => void close(\"SIGTERM\"));\n```\n\n## Testing (Fastify inject)\n\nTest routes in-memory without binding ports.\n\n✅ **Correct: inject request**\n```ts\nimport Fastify from \"fastify\";\nimport { describe, it, expect } from \"vitest\";\n\ndescribe(\"health\", () => {\n  it(\"returns ok\", async () => {\n    const app = Fastify();\n    app.get(\"\u002Fhealth\", async () => ({ status: \"ok\" as const }));\n\n    const res = await app.inject({ method: \"GET\", url: \"\u002Fhealth\" });\n    expect(res.statusCode).toBe(200);\n    expect(res.json()).toEqual({ status: \"ok\" });\n  });\n});\n```\n\n## Decision Trees\n\n### Fastify vs Express\n\n- Prefer **Fastify** for schema-based validation, predictable plugins, and high throughput.\n- Prefer **Express** for minimal middleware and maximal ecosystem familiarity.\n\n### Zod vs TypeBox\n\n- Prefer **Zod** for app codebases that already standardize on Zod (forms, tRPC, shared types).\n- Prefer **TypeBox** for OpenAPI generation and performance-critical validation.\n\n## Anti-Patterns\n\n- Skip request validation; validate at boundaries with schemas.\n- Register everything in `main.ts`; isolate routes and dependencies into plugins.\n- Return raw error objects; return stable error shapes and log the details.\n\n## Resources\n\n- Fastify: https:\u002F\u002Fwww.fastify.io\u002F\n- fastify-type-provider-zod: https:\u002F\u002Fgithub.com\u002Fturkerdev\u002Ffastify-type-provider-zod\n- @fastify\u002Ftype-provider-typebox: https:\u002F\u002Fgithub.com\u002Ffastify\u002Ffastify-type-provider-typebox\n\n","# Fastify (TypeScript) - Production Backend Framework\n\n## Overview\n\nFastify is a high-performance Node.js web framework built around JSON schema validation, encapsulated plugins, and great developer ergonomics. In TypeScript, pair Fastify with a type provider (Zod or TypeBox) to keep runtime validation and static types aligned.\n\n## Quick Start\n\n### Minimal server\n\n✅ **Correct: basic server with typed response**\n```ts\nimport Fastify from \"fastify\";\n\nconst app = Fastify({ logger: true });\n\napp.get(\"\u002Fhealth\", async () => ({ status: \"ok\" as const }));\n\nawait app.listen({ host: \"0.0.0.0\", port: 3000 });\n```\n\n❌ **Wrong: start server without awaiting listen**\n```ts\napp.listen({ port: 3000 });\nconsole.log(\"started\"); \u002F\u002F races startup and hides bind failures\n```\n\n## Schema Validation + Type Providers\n\nFastify validates requests\u002Fresponses via JSON schema. Use a type provider to avoid duplicating types.\n\n### Zod provider (recommended for full-stack TypeScript)\n\n✅ **Correct: Zod schema drives validation + types**\n```ts\nimport Fastify from \"fastify\";\nimport { z } from \"zod\";\nimport { ZodTypeProvider } from \"fastify-type-provider-zod\";\n\nconst app = Fastify({ logger: true }).withTypeProvider\u003CZodTypeProvider>();\n\nconst Query = z.object({ q: z.string().min(1) });\n\napp.get(\n  \"\u002Fsearch\",\n  { schema: { querystring: Query } },\n  async (req) => {\n    return { q: req.query.q };\n  },\n);\n\nawait app.listen({ port: 3000 });\n```\n\n### TypeBox provider (recommended for OpenAPI + performance)\n\n✅ **Correct: TypeBox schema**\n```ts\nimport Fastify from \"fastify\";\nimport { Type } from \"@sinclair\u002Ftypebox\";\nimport { TypeBoxTypeProvider } from \"@fastify\u002Ftype-provider-typebox\";\n\nconst app = Fastify({ logger: true }).withTypeProvider\u003CTypeBoxTypeProvider>();\n\nconst Params = Type.Object({ id: Type.String({ minLength: 1 }) });\nconst Reply = Type.Object({ id: Type.String() });\n\napp.get(\n  \"\u002Fusers\u002F:id\",\n  { schema: { params: Params, response: { 200: Reply } } },\n  async (req) => ({ id: req.params.id }),\n);\n\nawait app.listen({ port: 3000 });\n```\n\n## Plugin Architecture (Encapsulation)\n\nUse plugins to keep concerns isolated and testable (auth, db, routes).\n\n✅ **Correct: route plugin**\n```ts\nimport type { FastifyPluginAsync } from \"fastify\";\n\nexport const usersRoutes: FastifyPluginAsync = async (app) => {\n  app.get(\"\u002F\", async () => [{ id: \"1\" }]);\n  app.get(\"\u002F:id\", async (req) => ({ id: (req.params as any).id }));\n};\n```\n\n✅ **Correct: register with a prefix**\n```ts\napp.register(usersRoutes, { prefix: \"\u002Fapi\u002Fv1\u002Fusers\" });\n```\n\n## Error Handling\n\nCentralize unexpected failures and return stable error shapes.\n\n✅ **Correct: setErrorHandler**\n```ts\napp.setErrorHandler((err, req, reply) => {\n  req.log.error({ err }, \"request failed\");\n  reply.status(500).send({ error: \"internal\" as const });\n});\n```\n\n## Security Hardening (Baseline)\n\nAdd standard security plugins and enforce payload limits.\n\n✅ **Correct: Helmet + CORS + rate limiting**\n```ts\nimport helmet from \"@fastify\u002Fhelmet\";\nimport cors from \"@fastify\u002Fcors\";\nimport rateLimit from \"@fastify\u002Frate-limit\";\n\nawait app.register(helmet);\nawait app.register(cors, { origin: false });\nawait app.register(rateLimit, { max: 100, timeWindow: \"1 minute\" });\n```\n\n## Graceful Shutdown\n\nClose HTTP server and downstream clients (DB, queues) on SIGINT\u002FSIGTERM.\n\n✅ **Correct: close on signals**\n```ts\nconst close = async (signal: string) => {\n  app.log.info({ signal }, \"shutting down\");\n  await app.close();\n  process.exit(0);\n};\n\nprocess.on(\"SIGINT\", () => void close(\"SIGINT\"));\nprocess.on(\"SIGTERM\", () => void close(\"SIGTERM\"));\n```\n\n## Testing (Fastify inject)\n\nTest routes in-memory without binding ports.\n\n✅ **Correct: inject request**\n```ts\nimport Fastify from \"fastify\";\nimport { describe, it, expect } from \"vitest\";\n\ndescribe(\"health\", () => {\n  it(\"returns ok\", async () => {\n    const app = Fastify();\n    app.get(\"\u002Fhealth\", async () => ({ status: \"ok\" as const }));\n\n    const res = await app.inject({ method: \"GET\", url: \"\u002Fhealth\" });\n    expect(res.statusCode).toBe(200);\n    expect(res.json()).toEqual({ status: \"ok\" });\n  });\n});\n```\n\n## Decision Trees\n\n### Fastify vs Express\n\n- Prefer **Fastify** for schema-based validation, predictable plugins, and high throughput.\n- Prefer **Express** for minimal middleware and maximal ecosystem familiarity.\n\n### Zod vs TypeBox\n\n- Prefer **Zod** for app codebases that already standardize on Zod (forms, tRPC, shared types).\n- Prefer **TypeBox** for OpenAPI generation and performance-critical validation.\n\n## Anti-Patterns\n\n- Skip request validation; validate at boundaries with schemas.\n- Register everything in `main.ts`; isolate routes and dependencies into plugins.\n- Return raw error objects; return stable error shapes and log the details.\n\n## Resources\n\n- Fastify: https:\u002F\u002Fwww.fastify.io\u002F\n- fastify-type-provider-zod: https:\u002F\u002Fgithub.com\u002Fturkerdev\u002Ffastify-type-provider-zod\n- @fastify\u002Ftype-provider-typebox: https:\u002F\u002Fgithub.com\u002Ffastify\u002Ffastify-type-provider-typebox\n\n",{"name":5,"tags":24,"author":32,"license":15,"version":33,"category":34,"description":7,"context_limit":35,"requires_tools":36,"progressive_disclosure":37},[25,5,26,27,28,29,30,31],"typescript","nodejs","api","validation","json-schema","security","testing","Claude MPM Team","1.0.0","toolchain",900,[],{"entry_point":38,"token_estimate":42},{"summary":39,"quick_start":40,"when_to_use":41},"Build fast, type-safe Node APIs with Fastify using schema-first validation, plugin encapsulation, and production middleware patterns","1. Create Fastify instance 2. Add Type Provider (Zod\u002FTypeBox) 3. Register plugins (CORS\u002FHelmet) 4. Add error handler + logging 5. Test with inject()","When building TypeScript backends needing high performance, schema-based validation, clean plugin composition, and strong testability",{"full":43,"entry":44},5200,130,"main","590aa4fe05d1ec71a02ee9cc76c9a20508b5bcea","skills\u002Fju\u002Fskills\u002Ffastify","https:\u002F\u002Fgithub.com\u002Fjulio211916\u002FTlantiCAD-Studio-V0.1-alpha","https:\u002F\u002Fgithub.com\u002Fjulio211916","Estudiante de ing sistemas y psicologia","2026-05-22 04:43:54",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add julio211916\u002FTlantiCAD-Studio-V0.1-alpha --skill fastify",{"tool":58,"command":59},"bunx","bunx skills add julio211916\u002FTlantiCAD-Studio-V0.1-alpha --skill fastify",{"tool":61,"command":62},"pnpm","pnpm dlx skills add julio211916\u002FTlantiCAD-Studio-V0.1-alpha --skill fastify","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjulio211916\u002FTlantiCAD-Studio-V0.1-alpha\u002Fblob\u002Fmain\u002Fskills\u002Fju\u002Fskills\u002Ffastify\u002FSKILL.md",true,[],[67,74,81,88,95,102],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M735PMP7K29TEC1BC5A3VJ3Z","simpy","Process-based discrete-event simulation framework in Python. Use this skill when building simulations of systems with processes, queues, resources, and time-based events such as manufacturing systems, service operations, network traffic, logistics, or any system where entities interact with shared resources over time.","https:\u002F\u002Fgithub.com\u002Fjulio211916\u002FTlantiCAD-Studio-V0.1-alpha\u002Fblob\u002Fmain\u002Fskills\u002Fju\u002Fskills\u002Fsimpy\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M735NX56AZHYMV3BQ8GYZ7J0","shopify-expert","Builds and debugs Shopify themes (.liquid files, theme.json, sections), develops custom Shopify apps (shopify.app.toml, OAuth, webhooks), and implements Storefront API integrations for headless storefronts. Use when building or customizing Shopify themes, creating Hydrogen or custom React storefronts, developing Shopify apps, implementing checkout UI extensions or Shopify Functions, optimizing performance, or integrating third-party services. Invoke for Liquid templating, Storefront API, app development, checkout customization, Shopify Plus features, App Bridge, Polaris, or Shopify CLI workflows.","https:\u002F\u002Fgithub.com\u002Fjulio211916\u002FTlantiCAD-Studio-V0.1-alpha\u002Fblob\u002Fmain\u002Fskills\u002Fju\u002Fskills\u002Fshopify-expert\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M735N9WTN69TVA2T5VS9W1CA","shap","Model interpretability and explainability using SHAP (SHapley Additive exPlanations). Use this skill when explaining machine learning model predictions, computing feature importance, generating SHAP plots (waterfall, beeswarm, bar, scatter, force, heatmap), debugging models, analyzing model bias or fairness, comparing models, or implementing explainable AI. Works with tree-based models (XGBoost, LightGBM, Random Forest), deep learning (TensorFlow, PyTorch), linear models, and any black-box model.","https:\u002F\u002Fgithub.com\u002Fjulio211916\u002FTlantiCAD-Studio-V0.1-alpha\u002Fblob\u002Fmain\u002Fskills\u002Fju\u002Fskills\u002Fshap\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M735N3VQ8R56TXFF16BMF19H","shadcn-ui","Deep expertise on shadcn\u002Fui component library including installation, customization, theming, and accessibility patterns. Use when building UI with shadcn\u002Fui components, integrating Radix UI primitives, configuring Tailwind CSS v4 themes, or implementing dark mode. Covers Next.js App Router, Pages Router, and Vite setups.","https:\u002F\u002Fgithub.com\u002Fjulio211916\u002FTlantiCAD-Studio-V0.1-alpha\u002Fblob\u002Fmain\u002Fskills\u002Fju\u002Fskills\u002Fshadcn-ui\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M735KH64KS6Z58H6BJWX89BV","seoul-subway-arrival","Look up Seoul real-time subway arrival information with the official Seoul Open Data API. Use when the user asks when a train arrives, which trains are approaching a station, or how crowded Seoul subway timing looks right now.","https:\u002F\u002Fgithub.com\u002Fjulio211916\u002FTlantiCAD-Studio-V0.1-alpha\u002Fblob\u002Fmain\u002Fskills\u002Fju\u002Fskills\u002Fseoul-subway-arrival\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":19},"01M735K7KAFBZNACQ66PMDQMQD","seo-optimization","Comprehensive 7-phase SEO optimization workflow covering technical SEO auditing, keyword research strategy, on-page optimization, content SEO and E-E-A-T, structured data implementation, link building, and AI search optimization. Use when auditing search engine visibility, diagnosing ranking issues, implementing schema markup, conducting keyword research, optimizing content for E-E-A-T signals, or adapting for AI-driven search (AI Overviews, SGE).","https:\u002F\u002Fgithub.com\u002Fjulio211916\u002FTlantiCAD-Studio-V0.1-alpha\u002Fblob\u002Fmain\u002Fskills\u002Fju\u002Fskills\u002Fseo-optimization\u002FSKILL.md",[],[]]