ai-infrastructure-hugg…
Hugging Face Inference SDK patterns for TypeScript/Node.js — InferenceClient setup, chat completion, text generation, streaming,…
Backend specification frameworks — endpoint contracts, error catalogs, auth per endpoint, schema with constraints and indexes, migration strategy, middleware order. Load when a spec adds or changes an API endpoint, a database table, or a request pipeline.
Claude Code
$ npx -y skills add agents-inc/skills --skill meta-planning-api-planning --agent claude-code
Codex
$ npx skills add agents-inc/skills --skill meta-planning-api-planning -a codex -y
Cursor
$ npx skills add agents-inc/skills --skill meta-planning-api-planning -a cursor -y
Gemini CLI
$ npx skills add agents-inc/skills --skill meta-planning-api-planning -a gemini-cli -y
GitHub Copilot
$ npx skills add agents-inc/skills --skill meta-planning-api-planning -a github-copilot -y
OpenCode
$ npx skills add agents-inc/skills --skill meta-planning-api-planning -a opencode -y
Windsurf
$ npx skills add agents-inc/skills --skill meta-planning-api-planning -a windsurf -y
name: meta-planning-api-planning description: Backend specification frameworks — endpoint contracts, error catalogs, auth per endpoint, schema with constraints and indexes, migration strategy, middleware order. Load when a spec adds or changes an API endpoint, a database table, or a request pipeline.
> **Quick Guide:** Specify each endpoint as a contract a consumer can code against without asking: method, path, auth, rate limit, request, success response, and a status for every failure. Specify each table as typed, constrained columns, indexes with the query each serves, and a migration strategy, and state the middleware order. Three facts change the answer more often than expected: a partial update is `PATCH`, not `PUT`; a unique index that includes a nullable `deletedAt` does not stop duplicate live rows in most SQL databases; and renaming a column without an outage takes three phases, not one migration.
**Detailed Resources:**
---
Ask each question on its own; a spec that adds an endpoint and a table carries both sections. A section with nothing to say is left out rather than filled.
---
<critical_requirements>
**Read the closest existing route, schema file and middleware chain, and cite each by file and line range.** Their naming, pagination, response envelope and auth wiring are the vocabulary the spec reuses; a shape invented beside them diverges, and every consumer inherits the inconsistency.
**Give every endpoint its whole contract — method and path, auth, rate limit, request, success response and error catalog.** A part the spec leaves out is decided by the implementer, and decided again, differently, by each consumer.
**Name the consumers of every contract the spec changes, and what breaks for each.** Frontends, other services and external clients code against these shapes and status codes, and a change that names none ships without knowing who it breaks.
**Write schema as typed columns with their constraints, indexes with the query each serves, and a migration strategy.** A nullable, unique or foreign-key decision the spec omits is made by whoever writes the migration, and reversing it later is a second migration against production data.
</critical_requirements>
---
**Auto-detection:** `<api_contract>`, `<database_schema>`, `<middleware_requirements>`, API spec, endpoint contract, request and response shape, error catalog, status code per condition, auth per endpoint, rate limit, schema spec, soft delete, unique index, migration strategy, backfill, expand and contract, middleware order
**Applies to:**
**Handled elsewhere:**
---
<philosophy>
An API contract is a promise to consumers you cannot see. An ambiguous one does not stay ambiguous: the implementer resolves it one way and each consumer another, and the mismatch surfaces later as a bug in someone else's code.
So a backend spec is as much about what it leaves out:
</philosophy>
---
<patterns>
Every endpoint the spec adds or changes carries all six parts.
- [ ] Method and exact path, with path parameters named (`GET /api/v1/users/:userId`) - [ ] Auth: middleware and permission, or explicitly public (Pattern 2) - [ ] Rate limit, or explicitly none - [ ] Request: each parameter's location (path/query/body), type, required flag, constraints - [ ] Success response: status code and body shape with field types - [ ] Error catalog: a row per condition (Pattern 3)
BAD: "Create an endpoint for user management"
GOOD: "GET /api/v1/users — cursor pagination as in routes/jobs.ts:45-67, at most 50
per page. Response shape matches JobListResponse."A list endpoint's constraints include its maximum page size; without one, a client can ask for the whole table in a single request.
Where the codebase generates a machine-readable API description from its routes — an OpenAPI document, say — the changed endpoint appears in it, and the spec's success criteria include that the description still
The official skills marketplace for Agents Inc. 230+ skills covering everything from React and Prisma to Redis, ElevenLabs, and infrastructure tooling. Pick the skills that match your stack and install them via Claude Code. Need more control?
Hugging Face Inference SDK patterns for TypeScript/Node.js — InferenceClient setup, chat completion, text generation, streaming,…
LiteLLM proxy server setup, TypeScript client patterns via OpenAI SDK, model routing, fallbacks, load balancing, spend tracking,…
Serverless GPU compute platform for AI model deployment — web endpoints, GPU functions, model serving, and TypeScript client…
Local LLM inference with the Ollama JavaScript client -- chat, streaming, tool calling, vision, embeddings, structured output,…
Replicate SDK patterns for TypeScript/Node.js -- client setup, predictions, streaming, webhooks, file handling, model versioning,…
Together AI SDK patterns for TypeScript — client setup, chat completions, streaming, structured output, function calling,…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.