design-api

A command for planning a web API, the interface that lets software exchange data, using REST or GraphQL conventions.

In plain words
What is it for?
Use it to define endpoints or GraphQL operations, including data shapes, relationships, filtering, sorting, and pagination.
Why use it?
It turns a project's data model and requirements into a consistent set of API resources and operations.

Command

Part of the api-architect plugin — 2 commands, 1 agent shipped together

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 commands/rohitg00/awesome-claude-code-toolkit/design-api
Clone the repo
git clone --depth 1 https://github.com/rohitg00/awesome-claude-code-toolkit

Or install api-architect, the plugin that ships this one along with the rest of its 2 commands, 1 agent.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 744 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00000 $0.00744
Opus 5 $0.00000 $0.00372
Sonnet 5 $0.00000 $0.00149
Haiku 4.5 $0.00000 $0.00074

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

Security

Grade A, and why

design-api scanned grade A with 1 finding 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 3d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Example curl command for each endpoint
plugins/api-architect/commands/design-api.md · 68 lines

How it starts

The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/api-architect:design-api

Design a RESTful or GraphQL API based on the project's domain model and requirements.

Process

  1. Analyze the existing codebase to understand the domain:

    • Read database models, schemas, or type definitions to identify entities
    • Check existing routes or resolvers to understand current API surface
    • Look for DTOs, serializers, or validation schemas
    • Identify relationships between entities (one-to-many, many-to-many)
  2. Design the resource hierarchy following REST conventions:

    • Map each core entity to a resource with a plural noun URL (/users, /orders, /products)
    • Nest sub-resources only one level deep (/users/{id}/orders, not /users/{id}/orders/{id}/items)
    • Use query parameters for filtering, sorting, and pagination on collection endpoints
    • Define standard operations for each resource:
      • GET /resources - List with pagination (cursor-based preferred over offset)
      • GET /resources/{id} - Retrieve single resource
      • POST /resources - Create new resource
      • PUT /resources/{id} - Full update (replace)
      • PATCH /resources/{id} - Partial update
      • DELETE /resources/{id} - Remove resource
  3. Define request and response shapes:

    • Use consistent envelope format: { "data": ..., "meta": { "total", "cursor" } }
    • Include only necessary fields in list responses (summary representation)
    • Return full representation on single-resource endpoints
    • Define error response format: { "error": { "code": "...", "message": "...", "details": [...] } }
    • Use ISO 8601 for dates, UUIDs for identifiers, lowercase snake_case for field names
  4. Design authentication and authorization:

    • Recommend Bearer token (JWT or opaque) via Authorization header
    • Define permission model: which roles can access which endpoints
    • Identify public vs authenticated vs admin-only endpoints
    • Include rate limiting headers in response design (X-RateLimit-Limit, X-RateLimit-Remaining)

Read the full file on GitHub · 68 lines

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. 3d ago First seen · 68 lines · 0 tokens per session scan A a2e01e9f6ad2

Subscribe to this mod's changes

design-api is a command published in the GitHub repository rohitg00/awesome-claude-code-toolkit (2,578 stars, last pushed 3mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 744 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.