API Design

API Design is a skill for Claude Code, Codex from Xiaowen-Jiang/agent-enterprise. It costs 19 tokens per session (359 once invoked), scanned A, original, MIT.

A process for specifying REST APIs, which are web interfaces where clients work with named resources through standard HTTP requests. It defines endpoints, data formats, authentication, errors, filtering, pagination, and versioning.

In plain words
What is it for?
Designing endpoints such as `GET /api/users`, documenting request and response fields, defining status-code errors, adding authentication and pagination, and deciding how the API will evolve.
Why use it?
It gives an API a consistent structure before implementation, so clients know what to send and what responses or errors to expect. It also reduces ambiguity around naming and relationships between resources.

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/xiaowen-jiang/agent-enterprise/api_design
Any agent
npx skills add Xiaowen-Jiang/agent-enterprise --skill api_design
Clone the repo
git clone --depth 1 https://github.com/Xiaowen-Jiang/agent-enterprise

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/xiaowen-jiang/agent-enterprise/api_design.svg)](https://agentmods.dev/skills/xiaowen-jiang/agent-enterprise/api_design)
Your own site
<a href="https://agentmods.dev/skills/xiaowen-jiang/agent-enterprise/api_design"><img src="https://agentmods.dev/badge/skills/xiaowen-jiang/agent-enterprise/api_design.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 359 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.1 $0.00019 $0.00359
Opus 5 $0.00010 $0.00179
Sonnet 5 $0.00004 $0.00072
Haiku 4.5 $0.00002 $0.00036

Measured 5d ago against content hash 0123bcb1ce38, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 5d 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.

agent_enterprise/skills_data/api_design/SKILL.md · 46 lines

What it actually says

Process

  1. Identify resources — Map the domain entities to REST resources (nouns, not verbs)
  2. Define endpoints — GET, POST, PUT/PATCH, DELETE for each resource
  3. Design request/response schemas — JSON payloads with field types, required/optional
  4. Error handling — Standard error response format with HTTP status codes
  5. Pagination & filtering — Cursor or offset-based pagination, query parameters for filtering
  6. Authentication — Specify auth method (API key, Bearer token, OAuth)
  7. Versioning — URL prefix (/api/v1) or header-based versioning strategy

Output Format

For each endpoint, provide:

### [METHOD] /api/resource
Description: What this endpoint does
Auth: Required / Optional
Request Body:
  { field: type (required/optional) }
Response 200:
  { field: type }
Error Responses:
  400: Validation error
  404: Resource not found

Guidelines

  • Use plural nouns for collections (/users, not /user)
  • Use nested routes for relationships (/users/{id}/orders)
  • Keep payloads flat — avoid deeply nested objects
  • Return created/updated resource in response body
  • Use consistent field naming (camelCase or snake_case, not both)
  • Include pagination metadata in list responses (total, page, per_page)
  • Document rate limits if applicable
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. 5d ago First seen · 46 lines · 19 tokens per session scan A 0123bcb1ce38

Subscribe to this mod's changes

API Design is a skill published in the GitHub repository Xiaowen-Jiang/agent-enterprise (52 stars, last pushed 5mo ago), licensed MIT. It adds 19 tokens to every session and 359 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-30.

Related

Other skills, from other repositories

add-community-extension

Add a community extension to the Spec Kit catalog from a GitHub issue submission. USE FOR: processing extension submission issues, validating catalog entries, updating catalog.community.json and docs/community/extensions.md, creating PRs. DO NOT USE FOR: creating new extensions from scratch, or first-party extension…

github/spec-kit · 63 tokens

openspec-explore

Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.

Fission-AI/OpenSpec · 39 tokens

release-openspec

Use this skill when releasing OpenSpec: audit merged work and changeset coverage, decide whether a catch-up changeset PR is needed, prepare or resume the Changesets Version Packages PR, cut a beta or stable release, verify publishing, and polish GitHub release notes. Also use when asked whether an open release PR is…

Fission-AI/OpenSpec · 88 tokens

openspec-apply-change

Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.

Fission-AI/OpenSpec · 31 tokens

openspec-verify-change

Verify implementation matches change artifacts. Use when the user wants to validate that implementation is complete, correct, and coherent before archiving.

Fission-AI/OpenSpec · 32 tokens

openspec-update-change

Update an OpenSpec change by revising its existing planning artifacts and keeping them coherent with one another. Use when the user wants to revise a change's plan, fold new decisions into it, or reconcile its artifacts after an edit. Never edits code.

Fission-AI/OpenSpec · 55 tokens