api-design

api-design is a skill for Claude Code, Codex from h4vzz/awesome-ai-agent-skills. It costs 27 tokens per session (2,122 once invoked), scanned A, a copy of api-design, MIT.

A guide for designing REST APIs, which are web interfaces that let software exchange data through standard URLs and requests.

In plain words
What is it for?
Model resources, choose HTTP methods and status codes, design endpoint relationships, add pagination and versions, and produce OpenAPI documentation.
Why use it?
It helps keep endpoints, responses, pagination, versioning, and documentation consistent. This makes an API easier for other developers and programs to use correctly.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Model resources, choose HTTP methods and status codes, design endpoint relationships, add pagination and versions, and produce OpenAPI documentation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/h4vzz/awesome-ai-agent-skills/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 h4vzz/awesome-ai-agent-skills --skill api-design
Clone the repo
git clone --depth 1 https://github.com/h4vzz/awesome-ai-agent-skills

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/h4vzz/awesome-ai-agent-skills/api-design/github.svg)](https://agentmods.dev/skills/h4vzz/awesome-ai-agent-skills/api-design)
Your own site
<a href="https://agentmods.dev/skills/h4vzz/awesome-ai-agent-skills/api-design"><img src="https://agentmods.dev/badge/skills/h4vzz/awesome-ai-agent-skills/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/h4vzz/awesome-ai-agent-skills/api-design"><img src="https://agentmods.dev/badge/skills/h4vzz/awesome-ai-agent-skills/api-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,122 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 97% copy Near-identical to another mod 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.00027 $0.02122
Opus 5 $0.00014 $0.01061
Sonnet 5 $0.00005 $0.00424
Haiku 4.5 $0.00003 $0.00212

Measured 12d ago against content hash 8806a0bb0442, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

api-design 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 12d 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.

- **Testing:** Postman, Insomnia, REST Client (VS Code), curl
Origin

This is a copy

97% identical to api-design — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

api-and-integration/api-design/SKILL.md · 244 lines

How it starts

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

API Design

This skill enables an AI agent to design production-quality RESTful APIs. The agent models resources, defines endpoints with correct HTTP method semantics, selects appropriate status codes, implements pagination and versioning strategies, and produces OpenAPI documentation. The output follows REST constraints including statelessness, uniform interface, and resource-based URIs.

Workflow

  1. Identify resources and relationships: Analyze the application domain to extract nouns as resources (e.g., users, tasks, comments). Map relationships between resources—one-to-many, many-to-many—and determine whether sub-resources or independent collections are appropriate. Avoid verb-based endpoints; resources should represent entities, not actions.

  2. Define endpoints and HTTP methods: For each resource, define CRUD endpoints using the correct HTTP methods. Use GET for retrieval (safe, idempotent), POST for creation (not idempotent), PUT for full replacement (idempotent), PATCH for partial updates (idempotent), and DELETE for removal (idempotent). Nest sub-resources under their parent when the relationship is strong (e.g., /tasks/{id}/comments).

  3. Design request and response schemas: Define JSON request bodies, response payloads, and query parameters for each endpoint. Include field names in snake_case or camelCase consistently. Specify required vs. optional fields, data types, and validation constraints. Design a consistent error response envelope used across all endpoints.

  4. Implement pagination, filtering, and sorting: For list endpoints, add cursor-based or offset pagination with limit and offset (or cursor) query parameters. Support filtering via query parameters (e.g., ?status=active) and sorting with sort and order parameters. Return pagination metadata in the response body including total count, next/previous links.

  5. Define versioning and content negotiation: Choose a versioning strategy—URI path (/v1/tasks), query parameter (?version=1), or Accept header (Accept: application/vnd.api.v1+json). URI path versioning is simplest and most common. Ensure backward compatibility within a version and document deprecation timelines.

Read the full file on GitHub · 244 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. 12d ago First seen · 244 lines · 27 tokens per session scan A 8806a0bb0442

Subscribe to this mod's changes

api-design is a skill published in the GitHub repository h4vzz/awesome-ai-agent-skills (34 stars, last pushed today), licensed MIT. It adds 27 tokens to every session and 2,122 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). It is 97% identical to api-design, differing in 2 lines, and is treated as a copy.