api-design

A set of common patterns for designing REST APIs, which are web interfaces that let software exchange data over HTTP.

In plain words
What is it for?
It is for planning APIs, choosing routes and HTTP methods, defining status codes and error responses, and documenting authentication and pagination.
Why use it?
It helps keep endpoint names, HTTP responses, errors, authentication, and paginated results consistent and easier for clients to use.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/subhansh-dev/agent-maxxing/api-design
Any agent
npx skills add subhansh-dev/agent-maxxing --skill api-design
Clone the repo
git clone --depth 1 https://github.com/subhansh-dev/agent-maxxing

Made for: Claude Code, Codex.

Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 485 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00020 $0.00485
Opus 5 $0.00010 $0.00243
Sonnet 5 $0.00004 $0.00097
Haiku 4.5 $0.00002 $0.00049

Measured 2d ago against content hash e87a684bf1a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

api-design scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

engineering/api-design/SKILL.md · 84 lines

What it actually says

API Design Patterns

Naming

  • Use nouns, not verbs: /users not /getUsers
  • Use plural: /users not /user
  • Use kebab-case for multi-word: /user-profiles
  • Nest for relationships: /users/123/posts

HTTP Methods

  • GET — read (idempotent)
  • POST — create
  • PUT — replace (idempotent)
  • PATCH — partial update
  • DELETE — remove (idempotent)

Status Codes

  • 200 — OK
  • 201 — Created
  • 204 — No Content (successful DELETE)
  • 400 — Bad Request (validation error)
  • 401 — Unauthorized (no token)
  • 403 — Forbidden (no permission)
  • 404 — Not Found
  • 409 — Conflict (duplicate)
  • 422 — Unprocessable (valid JSON, invalid data)
  • 429 — Too Many Requests
  • 500 — Internal Server Error

Error Response

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Email is required",
    "details": [
      { "field": "email", "message": "Required" }
    ]
  }
}

Pagination

GET /users?page=2&limit=20

{
  "data": [...],
  "pagination": {
    "page": 2,
    "limit": 20,
    "total": 150,
    "totalPages": 8
  }
}

Authentication

  • Use Bearer tokens: Authorization: Bearer <token>
  • Return 401 for missing/invalid tokens
  • Return 403 for insufficient permissions

Versioning

  • URL path: /v1/users (simplest, most common)
  • Header: Accept: application/vnd.api.v1+json

Rate Limiting

Return headers:

  • X-RateLimit-Limit: max requests per window
  • X-RateLimit-Remaining: requests left
  • X-RateLimit-Reset: when the window resets
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 84 lines · 20 tokens per session scan A e87a684bf1a4

Subscribe to this mod's changes

api-design is a skill published in the GitHub repository subhansh-dev/agent-maxxing (2 stars, last pushed 1mo ago), licensed MIT. It adds 20 tokens to every session and 485 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.