api-design

api-design is a skill for Claude Code, Codex from chandrudp29/skillhub. It costs 38 tokens per session (1,395 once invoked), scanned A, original, MIT.

A guide for designing REST APIs, the web interfaces that let programs exchange data, with consistent URLs, errors, versions, and page-by-page results.

In plain words
What is it for?
Use it when creating or reviewing an API, choosing URL and HTTP method conventions, or writing OpenAPI/Swagger documentation.
Why use it?
It helps prevent confusing or inconsistent interfaces that are harder for other developers to use and maintain.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Good fit Use it when creating or reviewing an API, choosing URL and HTTP method conventions, or writing OpenAPI/Swagger documentation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chandrudp29/skillhub/api-design
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.

Any agent
npx skills add chandrudp29/skillhub --skill api-design
Clone the repo
git clone --depth 1 https://github.com/chandrudp29/skillhub

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/chandrudp29/skillhub/api-design/github.svg)](https://agentmods.dev/skills/chandrudp29/skillhub/api-design)
Your own site
<a href="https://agentmods.dev/skills/chandrudp29/skillhub/api-design"><img src="https://agentmods.dev/badge/skills/chandrudp29/skillhub/api-design/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for api-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/chandrudp29/skillhub/api-design"><img src="https://agentmods.dev/badge/skills/chandrudp29/skillhub/api-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,395 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00038 $0.01395
Opus 5.5 $0.00015 $0.00558
Sonnet 5.5 $0.00008 $0.00279
Haiku 4.5 $0.00004 $0.00139

Measured 1mo ago against content hash 6054cb8a784e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

skills/api-design/SKILL.md · 204 lines

How it starts

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

API Design

Opinionated REST API design patterns. Consistent, predictable, easy to use.

When to Use

  • Designing a new REST API
  • Reviewing an API for consistency issues
  • Writing OpenAPI/Swagger documentation
  • Deciding on URL structure, verbs, or error formats

URL Design

Resources are nouns, actions are HTTP verbs:

# Good
GET    /users                 — list users
POST   /users                 — create user
GET    /users/{id}            — get user
PUT    /users/{id}            — replace user (full update)
PATCH  /users/{id}            — update user (partial)
DELETE /users/{id}            — delete user

GET    /users/{id}/orders     — list this user's orders
POST   /users/{id}/orders     — create order for this user

# Bad — verbs in URLs
POST   /createUser
GET    /getUser?id=123
POST   /users/delete

Naming:

  • Plural for collections: /users, /orders, /products
  • kebab-case for multi-word: /user-profiles, not /userProfiles or /user_profiles
  • Lowercase always
  • No trailing slashes: /users not /users/

Nested resources — max 2 levels deep:

/orders/{id}/items           ← fine
/users/{id}/orders/{id}/items/tags  ← too deep, use /items/{id}/tags

HTTP Status Codes

Use exactly the right code — not just 200 and 500:

200 OK              — GET/PUT/PATCH succeeded
201 Created         — POST created a resource (include Location header)
204 No Content      — DELETE succeeded, nothing to return
400 Bad Request     — invalid request body/params (include what's wrong)
401 Unauthorized    — not authenticated (missing/invalid token)
403 Forbidden       — authenticated but not authorized
404 Not Found       — resource doesn't exist
409 Conflict        — would violate a constraint (duplicate email, etc.)
422 Unprocessable   — valid JSON but failed business validation
429 Too Many Requests — rate limited (include Retry-After header)
500 Internal Error  — your bug (never leak internals)

Consistent Error Format

Pick one format. Stick to it everywhere.

Read the full file on GitHub · 204 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 204 lines · 38 tokens per session scan A 6054cb8a784e

Subscribe to this mod's changes

api-design is a skill published in the GitHub repository chandrudp29/skillhub (14 stars, last pushed 3mo ago), licensed MIT. It adds 38 tokens to every session and 1,395 once invoked, about $0.0002 per session on Opus 5.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-30.

Related

Other skills, from other repositories

api-design

Design and implement RESTful APIs with proper routing, validation, error handling, and documentation. Use when building new API endpoints, designing API architecture, or improving existing APIs.

asgarovf/locusai · 37 tokens

api-design

Use when settling the contract of an API you expose, before implementation: resources/URLs, REST vs GraphQL, versioning, one RFC 9457 error envelope, pagination, idempotency — emitted as OpenAPI 3.1. NOT implementing the endpoints (that is fastapi/nestjs/go/nodejs), NOT auth hardening (that is secure-coding), NOT…

ericrisco/rsc-harness · 105 tokens

fastapi-expert

Expert-level FastAPI development for high-performance Python APIs with async support. Use when the user mentions Python, API, async, REST, OpenAPI, or Pydantic, or when the task involves FastAPI Features.

personamanagmentlayer/pcl · 49 tokens

openapi-expert

Expert-level OpenAPI/Swagger specification for API design, documentation, and code generation. Use when the user mentions swagger, API specs, REST, API design, or documentation, or when the task involves OpenAPI Specification, Webhooks, or Polymorphism.

personamanagmentlayer/pcl · 57 tokens

api-designer

Designs production-grade APIs — REST, GraphQL, gRPC, and AsyncAPI patterns including pagination, versioning, error handling, rate limiting, and API governance. Use when the user asks to design APIs, create endpoints, build an API layer, write OpenAPI specs, or needs help with REST/GraphQL/gRPC service design.

buiphucminhtam/forgewright · 73 tokens

api-design

REST API design patterns. URL naming, HTTP status codes, pagination, RFC 7807 error responses, versioning, and OpenAPI.

pan94u/forge · 31 tokens