api
Fastify route development, Zod type providers, OpenAPI documentation, structured logging, and error responses.
Skill by Mihir-Rabari
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/mihir-rabari-api-2928fd
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/api
What's inside
- Skill name
api- Description
- Fastify route development, Zod type providers, OpenAPI documentation, structured logging, and error responses.
- License
- MIT
- Instructions
- 64 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# API Development Skill
## 1. When to Use
Use this skill when implementing Fastify REST routes, adding Zod input validation schemas, documenting endpoints in OpenAPI, or configuring API error handling.
## 2. Route Registration Convention
All routes must use `FastifyPluginAsyncZod` from `fastify-type-provider-zod`:
```typescript
import type { FastifyPluginAsyncZod } from 'fastify-type-provider-zod';
import { z } from 'zod';
import { requirePermission } from '@packages/iam';
import { HttpErrorResponseSchema } from '@packages/validation';
export const featureRoutes: FastifyPluginAsyncZod = async (fastify) => {
fastify.get(
'/feature/:id',
{
preHandler: [requirePermission('feature:read')],
schema: {
tags: ['Feature'],
params: z.object({ id: z.string().uuid() }),
response: {
200: z.object({ id: z.string(), name: z.string() }),
400: HttpErrorResponseSchema,
401: HttpErrorResponseSchema,
403: HttpErrorResponseSchema,
404: HttpErrorResponseSchema,
},
},
},
async (request, reply) => {
request.log.info({ featureId: request.params.id }, 'Feature retrieved');
return reply.send({ id: request.params.id, name: 'Sample Feature' });
}
);
};
```
## 3. Standard Error Responses & Request Correlation
- Every API response attaches an `x-request-id` header.
- All error responses conform to `HttpErrorResponseSchema` including the matching `requestId`.
- Never expose internal stack traces or connection strings in client error responses.
## 4. OpenAPI Documentation
- Interactive documentation: `/api/docs` (Swagger UI).
- Raw OpenAPI 3.0 specification: `/api/openapi.json`.
- Authentication in OpenAPI is documented as `CookieAuth` (`app_session` cookie).
## 5. Mandatory Testing Expectations
Every new API route requires:
1. **Schema Validation Test**: Verifying invalid parameters return 400 with structured validation details.
2. **Authentication Guard Test**: Verifying unauthenticated requests return 401.
3. **Authorization Guard Test**: Verifying unauthorized roles/users return 403.
4. **Success Test**: Verifying valid requests return expected status codes and matching response schema.
5. **OpenAPI Sync**: Verifying the route appears in `/api/openapi.json`.
## Routes That Touch Tenant Data
- Take the tenant from the session: `tenantIdOf(request.user)`. Never from the body, query or params.
- A record in another tenant is a 404 (`TenantBoundaryError`), not a 403.
- Email goes through `createMailer(fastify)`; decide per message whether failure may fail the request (see the email skill).
- `buildApp(options, { db, redis, email })` injects dependencies for route tests.From Mihir-Rabari/create-odoo-app, MIT.
More from Mihir-Rabari/create-odoo-app
- 0.561score
design
Mihir-Rabari
Visual design law for the generated app — screen structure, colour tokens, typography, icons, spacing, and the states every screen owes the user.
SkillAFreshness: AClaude Code +9 - 0.558score
architecture
Mihir-Rabari
Monorepo package boundaries, layering rules, and extension patterns.
SkillAFreshness: AClaude Code +9 - 0.558score
authentication
Mihir-Rabari
Password hashing (scrypt), server-side session tokens, HTTP-only cookies, and auth events.
SkillAFreshness: AClaude Code +9 - 0.558score
authorization
Mihir-Rabari
Identity and Access Management, policy evaluation engine, declarative route guards, and permissions.
SkillAFreshness: AClaude Code +9 - 0.558score
database
Mihir-Rabari
PostgreSQL schema conventions, Drizzle ORM, migrations, deterministic seeding, and database integrity.
SkillAFreshness: AClaude Code +9 - 0.558score
frontend
Mihir-Rabari
Next.js App Router, shadcn/ui components, Tailwind CSS, TanStack Query, AuthContext, and permission-aware UI.
SkillAFreshness: AClaude Code +9 - 0.554score
email
Mihir-Rabari
Transactional email provider integration, templates, and delivery rules.
SkillAFreshness: AClaude Code +9 - 0.528score
testing
Mihir-Rabari
Testing doctrine, pyramid (unit, integration, API, security, smoke), AAA pattern, and coverage enforcement.
SkillAFreshness: AClaude Code +9 - 0.518score
observability
Mihir-Rabari
Structured logging, request correlation, Prometheus metrics, health probes, and sensitive data redaction.
SkillBFreshness: BClaude Code +9 - 0.518score
security
Mihir-Rabari
Zero-trust input rules, server-side authorization, credential protection, and adversarial security testing.
SkillBFreshness: BClaude Code +9 - 0.518score
storage
Mihir-Rabari
S3/MinIO StorageService abstraction, bucket management, and object storage conventions.
SkillBFreshness: BClaude Code +9 - 0.518score
validation
Mihir-Rabari
Runtime Zod validation schemas, business bounds, date ordering, and pagination limits.
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 1
- Open issues
- 3
- Last commit (this folder)
- Oct 2, 2026 (26 days ago)
- Last release
- Sep 4, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Mihir-Rabari/create-odoo-app
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from Mihir-Rabari
- 0.561score
design
Mihir-Rabari
Visual design law for the generated app — screen structure, colour tokens, typography, icons, spacing, and the states every screen owes the user.
SkillAFreshness: AClaude Code +9 - 0.561score
agent
Mihir-Rabari
AI chat agent that acts as the signed-in user, tool registry, staged write actions with confirmation, permission-filtered tools, and prompt-injection rules.
SkillAFreshness: AClaude Code +9 - 0.558score
architecture
Mihir-Rabari
Monorepo package boundaries, layering rules, and extension patterns.
SkillAFreshness: AClaude Code +9 - 0.558score
authentication
Mihir-Rabari
Password hashing (scrypt), server-side session tokens, HTTP-only cookies, and auth events.
SkillAFreshness: AClaude Code +9 - 0.558score
database
Mihir-Rabari
PostgreSQL schema conventions, Drizzle ORM, migrations, deterministic seeding, and database integrity.
SkillAFreshness: AClaude Code +9 - 0.558score
frontend
Mihir-Rabari
Next.js App Router, shadcn/ui components, Tailwind CSS, TanStack Query, AuthContext, and permission-aware UI.
SkillAFreshness: AClaude Code +9
Cite this page
api skill. Agent Mart. https://agentmart.dev/skills/mihir-rabari-api-2928fd (last updated 2026-10-24)