Agent skill

API Design

by WrongStack in WrongStack/WrongStack

A skill your agent uses when designing, implementing, or reviewing an HTTP API — endpoints, request and response shapes, errors, pagination, versioning, and authorization.

MITAuto-check passedBackend & APIs

Install API Design

skills CLI
$ npx skills add WrongStack/WrongStack --skill api-design -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install WrongStack/WrongStack api-design --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/WrongStack/WrongStack.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/core/skills/api-design .claude/skills/api-design && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
api-design
GitHub stars
368
Token cost
~1.3k tokens
SKILL.md length
590 words
Files
2
Skills in repo
38
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when designing, implementing, or reviewing an HTTP API — endpoints, request and response shapes, errors, pagination, versioning, and authorization.

  • Works in 8 steps: Read the existing API first: a… → Authorize every request against the… → Validate input at the edge with a… → …
  • Reviewing an HTTP API — endpoints
  • SKILL.md covers Overview, Rules, Status codes and Shapes, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

API Design is an agent skill from WrongStack/WrongStack. Use this skill when designing, implementing, or reviewing an HTTP API — endpoints, request and response shapes, errors, pagination, versioning, and authorization. Triggers: user says "API", "endpoint", "REST", "route", "status code", "pagination", "request body", "response shape", "OpenAPI", "versioning", "idempotency", "rate limit".

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `SKILL.save.md`).

It sits in Backend & APIs, covering REST APIs, API design and OpenAPI specifications. It works with OpenAPI. The repository describes itself as: An AI coding agent that reads your code, edits files, runs commands, and reasons through bugs — across a terminal REPL, a full-screen TUI, and a browser UI, while you keep your… The licence is MIT.

When your agent uses it

  • Reviewing an HTTP API — endpoints
  • Request and response shapes

Example prompts

  • “endpoint”
  • “status code”
  • “pagination”
  • “/api-design”

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Read the existing API first: a neighbouring endpoint, the error helper, the
  2. Authorize every request against the specific object, not just "is logged
  3. Validate input at the edge with a schema; reject unknown or malformed fields
  4. Use status codes for what they mean, and never return 200 with an error body.
  5. One error shape across the API. Without an existing convention, use RFC 9457
  6. Additive changes only within a version. Removing or renaming a field,
  7. Make retries safe: GET, PUT, and DELETE are idempotent; accept an
  8. Credentials go in headers, never in URLs or query strings.

What it can do on your machine

Read from SKILL.md and the folder at commit ec76a20. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are http).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

API Design loads about 1.3k tokens when it runs. Until then it costs about 87 tokens; SKILL.md has 590 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~87
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from WrongStack/WrongStack at commit ec76a20, republished under its MIT licence (© WrongStack). 590 words, ~1,304 tokens.

Download SKILL.mdSave it as .claude/skills/api-design/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
api-design
description
Use this skill when designing, implementing, or reviewing an HTTP API — endpoints, request and response shapes, errors, pagination, versioning, and authorization. Triggers: user says "API", "endpoint", "REST", "route", "status code", "pagination", "request body", "response shape", "OpenAPI", "versioning", "idempotency", "rate limit".
version
2.0.0
required-capabilities
filesystem.read
optional-capabilities
filesystem.write, verification.run

API Design

Overview

An API is a contract that outlives its first client. The most important decisions are the ones that are expensive to change later: resource shapes, error format, pagination, and what counts as a breaking change. When the project already has API conventions — an existing router, error helper, or OpenAPI spec — follow them; consistency beats any rule below.

Rules

  1. Read the existing API first: a neighbouring endpoint, the error helper, the validation library, and any OpenAPI or schema file. Extend the pattern.
  2. Authorize every request against the specific object, not just "is logged in". Loading /orders/:id must check the caller may see that order (broken object-level authorization is the most common API vulnerability).
  3. Validate input at the edge with a schema; reject unknown or malformed fields with a 4xx that names the field.
  4. Use status codes for what they mean, and never return 200 with an error body.
  5. One error shape across the API. Without an existing convention, use RFC 9457 problem details (type, title, status, detail, plus field errors).
  6. Additive changes only within a version. Removing or renaming a field, tightening validation, or changing a type is breaking.
  7. Make retries safe: GET, PUT, and DELETE are idempotent; accept an Idempotency-Key for POSTs that create or charge.
  8. Credentials go in headers, never in URLs or query strings.

Status codes

CodeUse for
200Success with a body
201Created — include the resource or its Location
202Accepted for asynchronous processing
204Success with no body
400Malformed request (unparseable, wrong types)
401Missing or invalid credentials
403Authenticated, not allowed
404Not found — also when hiding existence from an unauthorized caller
409Conflicts with current state (duplicate, version mismatch)
422Well-formed but fails business validation
429Rate limited — include Retry-After
500 / 503Server fault / temporarily unavailable

Shapes

http
POST /v1/orders
Idempotency-Key: 5c1f…
Content-Type: application/json

{ "items": [{ "sku": "A-100", "qty": 2 }] }

201 Created
Location: /v1/orders/ord_81f2
{ "id": "ord_81f2", "status": "pending", "items": [...], "createdAt": "2026-09-15T10:00:00Z" }
http
422 Unprocessable Content
Content-Type: application/problem+json

{
  "type": "https://example.com/problems/validation",
  "title": "Invalid order",
  "status": 422,
  "errors": [{ "field": "items[0].qty", "message": "must be at least 1" }]
}
  • Resource names are plural nouns; actions that aren't CRUD become sub-resources or explicit verbs (POST /orders/:id/cancel).
  • Timestamps in ISO 8601 UTC; money as integer minor units plus a currency code.
  • PATCH for partial updates, PUT for full replacement.
Show full SKILL.md (245 more words)Show less

Pagination

StyleUse whenShape
CursorLarge or frequently changing collections?limit=50&cursor=… → { data, nextCursor } (null on the last page)
OffsetSmall, stable collections; UIs that jump to page N?limit=50&offset=100 → { data, total }

Always cap limit on the server and sort by a stable, unique key.

Review checklist for a new or changed endpoint

  • Who can call it, and is ownership of the target object checked?
  • What happens on a duplicate or retried request?
  • What does a client see for every failure mode, and is it the shared error shape?
  • Is it backwards compatible for existing clients?
  • Is the list bounded (pagination, limit cap) and is abuse bounded (rate limit)?
  • Does the OpenAPI spec or schema change with it?

Anti-patterns

  • 200 with { "error": … } — breaks every client's error handling.
  • Leaking internals in errors (stack traces, SQL, file paths).
  • Unbounded list endpoints — one large tenant takes the service down.
  • Silent breaking changes — a renamed field is a production incident for someone.
  • Returning a whole database row — exposes fields that were never part of the contract.

Before returning

  • Follows the project's existing router, validation, and error conventions
  • Object-level authorization checked on every resource access
  • Input validated at the edge; one error shape; correct status codes
  • Retries safe; collections paginated with a capped limit
  • No breaking change to an existing version; spec updated alongside

Skills in scope

  • security-scanner — for authorization, injection, and exposure review
  • typescript-strict — for typed request and response contracts
  • testing — for contract and integration tests on the endpoint

© WrongStack, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in packages/core/skills/api-design of WrongStack/WrongStack.

  • SKILL.md
  • SKILL.save.md

Open the folder on GitHubat commit ec76a20

Compare with similar skills

API Design next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

API Design compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
API Design this skillWrongStack/WrongStack368—~1.3kAutomated safety check: PassMIT
API Designeraiskillstore/marketplace4301 repos~3.6kAutomated safety check: PassNone
API Architectcuriositech/some_claude_skills2431 repos~1.4kAutomated safety check: PassMIT
API Designmajiayu000/claude-skill-registry6661 repos~542Automated safety check: PassMIT
API DesignerJeffallan/claude-skills12k2 repos~2kAutomated safety check: PassMIT
Old Coder API DesignAmazingAng/old-coder7491 repos~3.4kAutomated safety check: PassMIT

Similar skills

  • API Designer

    aiskillstore/marketplace

    Design and document RESTful and GraphQL APIs with OpenAPI/Swagger specifications, authentication patterns, versioning strategies, and best practices.

    430 GitHub starsUsed in 1 repo~3.6k tokens
    Backend & APIsAuto-check passed
  • API Architect

    curiositech/some_claude_skills

    Expert API designer for REST, GraphQL, gRPC architectures. An agent skill from curiositech/some_claude_skills.

    243 GitHub starsUsed in 1 repo~1.4k tokens
    Backend & APIsAuto-check passed
  • API Design

    majiayu000/claude-skill-registry

    Expert at designing clean, consistent, and developer-friendly APIs.

    666 GitHub starsUsed in 1 repo~542 tokens
    Backend & APIsAuto-check passed
  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 2 repos~2k tokens
    Backend & APIsAuto-check passed
  • Old Coder API Design

    AmazingAng/old-coder

    Reviews or designs an HTTP/JSON API's endpoints, auth, pagination, versioning and deprecations, guarding against inventing a bespoke interface or silently breaking consumers.

    749 GitHub starsUsed in 1 repo~3.4k tokens
    Backend & APIsAuto-check passed
  • Create, validate and maintain OpenAPI 3.1 specs for REST APIs, whether designed first or generated from existing code, and use them for docs and client SDKs.

    40k GitHub starsUsed in 9 repos~511 tokens
    Backend & APIsAuto-check passed

More from WrongStack/WrongStack

All 38 skills in this repo
  • Design Craft

    WrongStack/WrongStack

    Design or substantially improve user-facing interfaces with a product-specific visual direction, content hierarchy, and rendered critique.

    368 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Design Critique

    WrongStack/WrongStack

    A skill your agent uses to audit an interface that already exists and say precisely why it looks generated, templated, or unfinished — a scored rubric across composition, typography, color, states…

    368 GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Mailbox Bridge

    WrongStack/WrongStack

    A skill your agent uses when external coding agents (Claude Code, Aider, custom scripts) need to participate in the project's shared WrongStack mailbox, or when a user asks to "expose the mailbox"…

    368 GitHub stars~3.9k tokensUpdated today
    Auto-check passed
  • Multi Agent

    WrongStack/WrongStack

    A skill your agent uses whenever work can be split across multiple AI agents running in parallel, or when orchestrating leader/worker patterns in WrongStack.

    368 GitHub stars~3.6k tokensUpdated today
    Auto-check passed
  • Web Platform Baseline

    WrongStack/WrongStack

    Use this skill before asserting that a CSS, HTML or accessibility capability is available, unavailable, or the right tool — it carries dated, refreshable platform facts and refuses to let stale…

    368 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Wrongstack Mailbox

    WrongStack/WrongStack

    A skill your agent uses when the user wants to communicate with WrongStack's shared project mailbox from outside WrongStack — read messages sent by WrongStack agents, send replies, broadcast to all…

    368 GitHub stars~3.5k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about API Design

What does API Design do?

A skill your agent uses when designing, implementing, or reviewing an HTTP API — endpoints, request and response shapes, errors, pagination, versioning, and authorization. API Design is an agent skill from WrongStack/WrongStack. Use this skill when designing, implementing, or reviewing an HTTP API — endpoints, request and response shapes, errors, pagination, versioning, and authorization.

When should I use API Design?

API Design fits situations like: reviewing an HTTP API — endpoints; request and response shapes.

How do I install API Design in Claude Code?

Run `npx skills add WrongStack/WrongStack --skill api-design -a claude-code`. Or copy the skill folder (packages/core/skills/api-design in WrongStack/WrongStack) into .claude/skills/api-design in your project. Claude Code loads it when a task matches its description.

How do I install API Design in Codex?

Run `npx skills add WrongStack/WrongStack --skill api-design -a codex`. Or copy the skill folder (packages/core/skills/api-design in WrongStack/WrongStack) into .agents/skills/api-design in your project. Codex loads it when a task matches its description.

Can I use API Design in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add WrongStack/WrongStack --skill api-design -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-design, .gemini/skills/api-design, .github/skills/api-design and .opencode/skills/api-design in your project.

What does API Design need to run?

SKILL.md names no scripts, command-line tools or credentials: API Design is instructions for the agent only.

Does API Design access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is API Design safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does API Design use?

API Design is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does API Design use?

About 1.3k tokens (SKILL.md is roughly 5.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to API Design?

Skills that share tags, products or a category with API Design: API Designer (aiskillstore/marketplace, 430 stars), API Architect (curiositech/some_claude_skills, 243 stars), API Design (majiayu000/claude-skill-registry, 666 stars) and API Designer (Jeffallan/claude-skills, 12k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains API Design?

WrongStack (a GitHub organization) maintains it in WrongStack/WrongStack, which has 368 GitHub stars. The repository holds 38 skills in this directory. The repository was last updated on October 6, 2026.

Source: WrongStack/WrongStack on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.