Answers from the documentation; checking which model is on duty
Hi - I answer from the OpenSmartRoute documentation: routing, the API, plans and quotas, self-hosting. Ask away, or open a support ticket if you need a person.
Grounded in the docs - follow a source before acting on it.
fastify-best-practices - Skill - OpenSmartRoute
Skillv1.0.0
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…
Imported from mcollina/skills (skills/fastify/SKILL.md) via skills.sh. Install upstream with npx skills add mcollina/skills --skill fastify. Copyright stays with the author.
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:
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
Installed into a catalogue, chosen by a router
Install fastify-best-practices and it becomes one more candidate the router can pick - when it fits.
A listing is a routing target with a manifest: what it does, which domains it covers, what it costs and who publishes it. Once installed it sits beside your own models and tools, is scored like any other candidate for each request, and shows up in the trace when it wins. Ratings come from workspaces that installed it, one per account.
When a provider is down or over quota the request moves on; the trace says it did.
Use it
Copy one of these into your project. Installing also returns the manifest and these snippets.
# after Install: the listing is in your workspace's routing pool - a plan picks it for its slotcurl-s-X POST https://api.opensmartroute.ai/api/v1/route -H 'Authorization: Bearer $OSR_API_KEY' -H 'Content-Type: application/json' -d '{"text": "...", "plan": true}'
Manifest
An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.
mcollina-skills-fastify.ocm.jsonjson
{
"ocm": "1",
"id": "mcollina-skills-fastify",
"kind": "skill",
"name": "fastify-best-practices",
"description": "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, logging with Pino) and TypeScript integration via strip types. Trigger terms: Fastify, Node.js server, REST API, API routes, backend framework, fastify.config, server.ts, app.ts.",
"publisher": "mcollina",
"version": "1.0.0",
"capabilities": {
"domains": [
"coding"
],
"tags": [
"skill-md",
"fastify",
"nodejs",
"typescript",
"backend",
"api",
"server",
"http",
"skills-sh"
],
"languages": [
"en"
]
},
"quality_prior": 0.6,
"examples": [
"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, logging with Pino) and TypeScript integration via strip types. Trigger terms: Fastify, Node.js server, REST API, API routes, backend framework, fastify.config, server.ts, app.ts."
],
"primary": false,
"metadata": {
"source": {
"provider": "skills.sh",
"repository": "https://github.com/mcollina/skills",
"path": "skills/fastify/SKILL.md",
"ref": "HEAD",
"url": "https://www.skills.sh/mcollina/skills/fastify-best-practices",
"key": "mcollina/skills/skills/fastify/SKILL.md"
}
},
"instructions": "## When to use\n\nUse this skill when you need to:\n- Develop backend applications using Fastify\n- Implement Fastify plugins and route handlers\n- Get guidance on Fastify architecture and patterns\n- Use TypeScript with Fastify (strip types)\n- Implement testing with Fastify's inject method\n- Configure validation, serialization, and error handling\n\n## Quick Start\n\nA minimal, runnable Fastify server to get started immediately:\n\n```ts\nimport Fastify from 'fastify'\n\nconst app = Fastify({ logger: true })\n\napp.get('/health', async (request, reply) => {\n return { status: 'ok' }\n})\n\nconst start = async () => {\n await app.listen({ port: 3000, host: '0.0.0.0' })\n}\nstart()\n```\n\n## Recommended Reading Order for Common Scenarios\n\n- **New to Fastify?** Start with `plugins.md` → `routes.md` → `schemas.md`\n- **Adding authentication:** `plugins.md` → `hooks.md` → `authentication.md`\n- **Improving performance:** `schemas.md` → `serialization.md` → `performance.md`\n- **Setting up testing:** `routes.md` → `testing.md`\n- **Going to production:** `logging.md` → `configuration.md` → `deployment.md`\n\n## How to use\n\nRead individual rule files for detailed explanations and code examples:\n\n- [rules/plugins.md](rules/plugins.md) - Plugin development and encapsulation\n- [rules/routes.md](rules/routes.md) - Route organization and handlers\n- [rules/schemas.md](rules/schemas.md) - JSON Schema validation\n- [rules/error-handling.md](rules/error-handling.md) - Error handling patterns\n- [rules/hooks.md](rules/hooks.md) - Hooks and request lifecycle\n- [rules/authentication.md](rules/authentication.md) - Authentication and authorization\n- [rules/testing.md](rules/testing.md) - Testing with inject()\n- [rules/performance.md](rules/performance.md) - Performance optimization\n- [rules/logging.md](rules/logging.md) - Logging with Pino\n- [rules/typescript.md](rules/typescript.md) - TypeScript integration\n- [rules/decorators.md](rules/decorators.md) - Decorators and extensions\n- [rules/content-type.md](rules/content-type.md) - Content type parsing\n- [rules/serialization.md](rules/serialization.md) - Response serialization\n- [rules/cors-security.md](rules/cors-security.md) - CORS and security headers\n- [rules/websockets.md](rules/websockets.md) - WebSocket support\n- [rules/database.md](rules/database.md) - Database integration patterns\n- [rules/configuration.md](rules/configuration.md) - Application configuration\n- [rules/deployment.md](rules/deployment.md) - Production deployment\n- [rules/http-proxy.md](rules/http-proxy.md) - HTTP proxying and reply.from()\n\n## Core Principles\n\n- **Encapsulation**: Fastify's plugin system provides automatic encapsulation\n- **Schema-first**: Define schemas for validation and serialization\n- **Performance**: Fastify is optimized for speed; use its features correctly\n- **Async/await**: All handlers and hooks support async functions\n- **Minimal dependencies**: Prefer Fastify's built-in features and official plugins",
"cost": {
"context_tokens": 737
}
}
Fetch it by URL: GET /api/v1/registry/mcollina-skills-fastify/manifest?version=1.0.0
Reviews
Star ratings from people who tried it. One review per account; edit yours any time.
No reviews yet. Install it, try it, and be the first to rate it.