/be:openapi-registryfrom Backend Skills
The OpenAPI document generated from a route registry in a Next.js API — one registration per route from the Zod schemas the handler validates, per-group modules composed by one file, a closed tag list, success status by meaning, standard errors derived from the entry, a paginated flag, uploads as binary strings, `.meta()` for names and examples, stable operation ids, a coverage test both ways, local-only routes kept out, and a spec lint and breaking-change check in CI. Use when adding a route, changing a schema, or serving the API reference.
Ships in Backend Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The API's OpenAPI document is generated from a registry, never written by hand. Each route registers once, in the same change as the route, using the exact Zod schemas its handler validates — so the document can't describe a body the API doesn't accept. The handler is the source of truth; the registry is its projection, and a test proves the two match.
The document is the contract; how it's displayed (Scalar, Swagger UI, Redoc) is a viewer choice that changes nothing here. How the reference's prose reads is a writing task, outside this skill.
Before applying this skill, read the project's root AGENTS.md, the AGENTS.md closest to the files in question, and any doc they link for this skill's topic. Names, values and choices — budgets, tiers, tokens, voice, paths — come from those files, never from this skill.
registerRoute() helper that turns a short definition into a full operation.registerRoute() for the routes it covers. One file imports them all, so it's the only place that knows the full set.@asteasolutions/zod-to-openapi (its OpenApiGeneratorV31), which reads Zod 4's .meta(); extendZodWithOpenApi is needed only for parameter-level descriptions and for an extended schema shown as a reference to its parent. Zod's own z.toJSONSchema() covers a single schema — for a webhook payload or a tool definition — without a registry.The helper and the coverage test are in references/registry.md.
GET and DELETE, and each registers), the schemas it validates params, query and body with, whether a guard runs, and what it returns.auth, so the operation lists its security schemes; one with no guard has none. Never guess from the path.POST that creates → 201; a POST that acts (a state transition, a send) → 200; an async start → 202; a DELETE with no body → 204.params, query, body — never described in prose. A body is marked required, since OpenAPI defaults it to optional. Uploads take a multipart/form-data body; the generator has no z.file() support, so the file field is documented with an explicit .openapi({ type: "string", format: "binary" }) while the handler validates the real file.data; without it the document says nothing about the shape. A list sets paginated, so the envelope carries the pagination metadata.Retry-After and the RateLimit fields, and 500. Only errors particular to this route go in additionalErrors, keyed by status (a 409 conflict, a 403 PLAN_LIMIT_REACHED — plan-entitlements); the 503 of maintenance mode and the 404 of a switched-off flag are derived too.operationId for each operation, unique across the document — client generators name methods after it, so renaming one is a breaking change. Derive it from the method and path, or set it, but never let it change by accident.deprecated: true, alongside the Deprecation and Sunset headers the routes send (api-architecture).tag is typed as one of them. A typo fails the type check instead of inventing a group.summary is required: a short, verb-first line ("Create an event", "List the caller's albums").description is optional, for what a caller can't see from the entry — a terminal state, a side effect, an ordering. Never what the entry already says (auth, rate limits, parameters, errors), internal permission strings, the database or a schema's name..meta({ id, description, examples: [...] }) — the id makes it a named component, reused by $ref, and the examples show in every viewer. A request is described by what callers send (defaults optional, strings before coercion); a response by what they get back.export function GET, export const GET and export { handler as GET } alike — and fails when one isn't in the document — and when the document lists a path nothing serves. A new route without its entry fails CI.$ref, a duplicate operationId or a missing response fails before merge.oasdiff breaking --fail-on ERR — without the flag it never fails); a removed field, a new required input or a narrowed type fails unless it lands in a new version (api-architecture).webhooks section (registerWebhook), from the same payload schemas the sender signs.POST action registered as 201, or a create as 200.auth missing on a guarded route, or set on a public one.operationId changed by a rename.One tag at a time, reading the tag list fresh from the spec config: read the route files, read their entries, list every mismatch against the mistakes above, fix them, and run the API's type check before the next tag. Work from public routes to admin and system ones.
Routes, guards and the envelope api-architecture · the schemas schemas-and-contracts · the rate-limit headers rate-limiting · sending webhooks webhook-delivery · the coverage test testing · the audit api-audit.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub timonwa/engineering-skills --plugin be22 skills in this plugin
/access-controlAccess control for a Next.js API on Firebase — roles, relationships and attributes (RBAC, ReBAC, ABAC) behind permission verbs and one pure can(); guards as the only gate, 404 before 403; tenant scoping; invitations; escalation limits; two-person approval and access reviews; stale claims; API-key scopes; share links and passcodes; where plan and flag checks sit; UI gates that only hide; and tests. Use when adding a permission, role, guarded route, API key, share link, or a control only some people see./access-control-auditManually invoked. Access-control audit — guards on every route and Server Action (BFLA), 404 before 403 and tenant scoping (BOLA), allowlisted writes and projected reads (BOPLA), verbs never role names, roles that add up, escalation and invitations, claims and revocation, sessions and sign-in, API keys and share links, the plan and flag order, UI gates, data rules and the tests. Verifies each finding and writes a prioritised report./api-architectureHow an API route is built in a Next.js API — the fixed order of rate limit, authorise, validate, delegate, audit, respond; thin routes over services; the response envelope and typed errors; caching headers; concurrent edits; long-running work; cursor pagination and allowlisted sorts; resource paths, versions, deprecation and state-transition sub-routes; and what every new route ships with. Cron, webhooks and audit logs are references. Use when adding, changing or reviewing a route handler or the API layer's structure.Other plugins' skills for the same job