/ratchet-backend:http-api-designfrom ratchet-backend
Use when writing or reviewing an endpoint, route handler, service layer, or an edge or CDN worker in front of an API, choosing identifiers in URLs, storing tokens or one-time codes, or setting cache headers. Shape an HTTP API around resources, thin route handlers, user-facing identifiers, and one owner each for secret storage and cache headers.
Ships in ratchet-backend. 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.
Read every applicable AGENTS.md first. Repository-local policy overrides these defaults.
Model the API as resources addressed by path, with the method as the verb. Do not send the verb
in the body (POST /api { "action": "archive" }). Resource paths can be routed, authorized,
rate-limited, cached, and logged per operation; an action body hides all of that behind one
route.
For an operation that is not plain create, read, update, or delete, name the thing it creates:
POST /orders/{id}/refunds instead of an action called refundOrder.
A response about a resource carries, for the requesting viewer, a field for each action a client
may offer: can_leave, can_post, can_moderate. When an action is blocked, it also says why,
and until when for a wait: post_blocked_reason: "account_too_new", can_post_after. Compute
each field with the same check the action's handler enforces. A client that works permissions
out from roles or counts drifts from the server and offers actions the server refuses.
ratchet-code:interface-feedback says how a client renders them.
Give every resource a public id: short, generated once, never changed, and separate from the internal primary key. A resource people name or link to also gets a slug. Use the slug in URLs and labels where there is one, since that is what a slug is for, and the public id elsewhere and as the reference that survives a rename. Do not expose the internal primary key. It leaks volume and ordering, invites enumeration, and ties every client to the storage layout.
null, or an id.Streams (server-sent events) and API keys: read streams and API keys.
A claim verified at the edge, such as a JWT checked in a CDN worker, decides only cache bypass or routing. It never grants access or a higher rate-limit tier. The edge may hold a stale or partial view of the user, so the origin authorizes every request on its own.
Set cache headers through one central policy keyed by route or response type. Do not hand-write
Cache-Control in each handler. Per-route headers drift, and the one that is wrong is a private
response cached by a shared proxy.
What SKILL.md sets; muted values are Claude Code's defaults
18 skills in this plugin
/bounded-iterationUse when writing or reviewing a sweep, scheduled job, reconciler, cleanup, dispatcher, backfill, or export - any loop that reads rows. Covers bounding the rows each run reads, sweeps that re-select their own writes, and effects that repeat on every run./error-handlingUse when writing or reviewing code that throws, catches, or matches an error, turns a failure into a response, or reports errors to a tracker such as Sentry, including a review of a diff that does. Covers one defined list of error codes, matching on type or code instead of message, details as attributes on the error, and reporting only errors someone can act on./Other plugins' skills for the same job
npx claudepluginhub jongleberry/ratchet-stack --plugin ratchet-backend