> fastify-best-practices
Guides development of Fastify Node.js backend servers and REST APIs using TypeScript or JavaScript. Use when building, configuring, or debugging a Fastify application — including defining routes, implementing plugins, setting up JSON Schema validation, handling errors, optimising performance, managing authentication, configuring CORS and security headers, integrating databases, working with WebSockets, and deploying to production. Covers the full Fastify request lifecycle (hooks, serialization,
curl "https://skillshub.wtf/Harmeet10000/skills/fastify?format=md"When to use
Use this skill when you need to:
- Develop backend applications using Fastify
- Implement Fastify plugins and route handlers
- Get guidance on Fastify architecture and patterns
- Use TypeScript with Fastify (strip types)
- Implement testing with Fastify's inject method
- Configure validation, serialization, and error handling
Quick Start
A minimal, runnable Fastify server to get started immediately:
import Fastify from 'fastify'
const app = Fastify({ logger: true })
app.get('/health', async (request, reply) => {
return { status: 'ok' }
})
const start = async () => {
await app.listen({ port: 3000, host: '0.0.0.0' })
}
start()
Recommended Reading Order for Common Scenarios
- New to Fastify? Start with
plugins.md→routes.md→schemas.md - Adding authentication:
plugins.md→hooks.md→authentication.md - Improving performance:
schemas.md→serialization.md→performance.md - Setting up testing:
routes.md→testing.md - Going to production:
logging.md→configuration.md→deployment.md
How to use
Read individual rule files for detailed explanations and code examples:
- rules/plugins.md - Plugin development and encapsulation
- rules/routes.md - Route organization and handlers
- rules/schemas.md - JSON Schema validation
- rules/error-handling.md - Error handling patterns
- rules/hooks.md - Hooks and request lifecycle
- rules/authentication.md - Authentication and authorization
- rules/testing.md - Testing with inject()
- rules/performance.md - Performance optimization
- rules/logging.md - Logging with Pino
- rules/typescript.md - TypeScript integration
- rules/decorators.md - Decorators and extensions
- rules/content-type.md - Content type parsing
- rules/serialization.md - Response serialization
- rules/cors-security.md - CORS and security headers
- rules/websockets.md - WebSocket support
- rules/database.md - Database integration patterns
- rules/configuration.md - Application configuration
- rules/deployment.md - Production deployment
- rules/http-proxy.md - HTTP proxying and reply.from()
Core Principles
- Encapsulation: Fastify's plugin system provides automatic encapsulation
- Schema-first: Define schemas for validation and serialization
- Performance: Fastify is optimized for speed; use its features correctly
- Async/await: All handlers and hooks support async functions
- Minimal dependencies: Prefer Fastify's built-in features and official plugins
> related_skills --same-repo
> vibe-ppt
Convert this into a web based slide deck using reveal.js. Use the following brand colour and logo. Primary colour: #EE4822 Theme: Light Logo: https://media.licdn.com/dms/image/v2/D560BAQFeaNrDEATcKQ/company-logo_200_200/company-logo_200_200/0/1709465010800/100xengineers_logo?e=2147483647&v=beta&t=qKncqAfB_j9ckDOxOx1eN9EEPocLTbNqliLnAU3sP6c Slide Content: Vibe Coding with Gemini Canvas Slide 1: Vibe Coding with Gemini Canvas Slide 2: What is Vibe Coding? Vibe Coding: Use natural language pro
> upwork-scrape-apply
# Upwork Job Scrape & Apply Pipeline Scrape Upwork jobs matching AI/automation keywords, generate personalized cover letters and proposals, and output to a Google Sheet with one-click apply links. ## Inputs - **Keywords**: List of search terms (default: automation, ai agent, n8n, gpt, workflow, api integration, scraping, ai consultant) - **Limit**: Max jobs to fetch (default: 50) - **Days**: Only jobs from last N days (default: 1 = last 24 hours) - **Filters**: - `--verified-payment`: Only
> ui-ux-pro-max
UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 9 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: g
> 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`.