/consult:apifrom consult
House rules for HTTP APIs: spec first, compatibility for shipped consumers, status codes by where the failure starts, error format, idempotency, pagination, and webhooks. Use when adding or changing an endpoint, handler, status code, response or error body, or pagination.
Ships in consult. 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.
Write the OpenAPI spec first, keep shipped consumers working, and pick the status by where the failure starts.
Sketch the consumer-visible behavior in the OpenAPI spec (or the repo's API spec) before writing the handler, then build from it. List every response: success, errors, empty results, pagination, and auth failures. A fix that restores existing behavior follows the current contract.
Keep shipped contracts working for consumers you can't update in the same
release, such as installed apps and open browser tabs. A rename, removal,
required addition, status change, or change in meaning needs a successor
(new field, endpoint, or version) or a deprecation window announced with
Deprecation (RFC 9745) and Sunset (RFC 8594) headers. Optional
additions old consumers can ignore change in place. Use one versioning
scheme per service, and don't bump it for compatible additions.
Pick the status by where the failure starts. Map dependency failures into this API's own error shape; don't pass an upstream status or body through.
| Failure | Status |
|---|---|
| Malformed syntax, envelope, or media type | 400 |
| Well-formed input that breaks a domain rule | 422 |
| Not authenticated | 401 |
| Authenticated but not allowed | 403, or 404 to hide that it exists |
No resource with that id (an empty collection is 200) | 404 |
| Conflicts with current state, such as a unique key | 409 |
| Rate or quota exceeded | 429 |
| A dependency is down or overloaded | 503 |
| A dependency timed out | 504 |
| A dependency answered with something unusable | 502 |
| Unexpected fault in this service | 500 |
Keep an existing service's representation and error contract. A new REST resource API with no established format defaults to JSON:API, unless a domain standard or client need favors another documented choice. Errors use the chosen format's native shape, else RFC 9457 Problem Details. Don't claim conformance to a standard the API doesn't meet.
Middleware is for transport-wide concerns: logging, tracing, rate limits. Endpoint validation, ownership checks, authorization, and domain invariants stay at the route or domain boundary.
An endpoint that accepts retried mutations, returns a paginated list, or sends webhooks meets the floor in the matching reference below. Read it before writing the handler.
references/idempotency.md: read before writing a mutation clients retry.references/pagination.md: read before writing a paginated list.references/webhooks.md: read before sending or receiving webhooks.references/rest-error-status-codes.md: read when a status is not in the
Rule 3 table, or one response must report several failures.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub dawson-design/consult --plugin consult11 skills in this plugin
/code-reviewFresh-context review of a diff, branch, or PR for bugs, regressions, security gaps, missing proof, and agent mistakes, reported as findings by severity. Invoke with /consult:code-review in a new session before committing./databaseProduction-data safety rules for migrations, schema changes, indexes, constraints, backfills, transactions, and locking. Use when writing or changing a migration, schema, index, query, or transaction./documentationWrites or updates docs for existing code: READMEs, runbooks, API docs, and comments, linking the source of truth instead of restating it. Invoke with /documentation when docs are the deliverable./domain-modelingFloors for domain data: unrepresentable illegal states, and the house rules for money and for dates and times. Use when adding or changing a record, status, or state machine, or any code that stores, compares, formats, serializes, or computes on money, dates, or times./gitHouse rules for git and GitHub: committing a reviewed slice, history edits, force-push, conflicts, worktrees, and PR or issue text. Use when committing, rebasing, resolving conflicts, recovering work, force-pushing, or writing to GitHub./issue-trackingDrafts, splits, and tracks initiatives, epics, and issues sized to the team sprint and closed on evidence. Invoke with /issue-tracking when drafting or updating tracker items.