api-design

api-design is a skill for Claude Code, Codex from event4u-app/agent-config. It costs 40 tokens per session (1,070 once invoked), scanned A, original, MIT.

A guide for designing APIs, which are interfaces that let software systems exchange data and actions. It covers endpoints, versioning, errors, pagination, rate limits, and related choices.

In plain words
What is it for?
Planning REST endpoints, response errors, idempotency, asynchronous operations, bulk actions, webhooks, versioning, and deprecation.
Why use it?
It helps teams make an API predictable for callers and safer to change over time.

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/event4u-app/agent-config/api-design
Any agent
npx skills add event4u-app/agent-config --skill api-design
Clone the repo
git clone --depth 1 https://github.com/event4u-app/agent-config

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/event4u-app/agent-config/api-design.svg)](https://agentmods.dev/skills/event4u-app/agent-config/api-design)
Your own site
<a href="https://agentmods.dev/skills/event4u-app/agent-config/api-design"><img src="https://agentmods.dev/badge/skills/event4u-app/agent-config/api-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,070 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.00040 $0.01070
Opus 5 $0.00020 $0.00535
Sonnet 5 $0.00008 $0.00214
Haiku 4.5 $0.00004 $0.00107

Measured 4d ago against content hash c625fc79747c, 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 4d 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.

src/skills/api-design/SKILL.md · 123 lines

How it starts

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

api-design

Grounded corpus (Tier-1 consultation): pagination, versioning, error shape (RFC 9457), idempotency, async ops, rate limiting, bulk, naming, expansion, webhooks — query ./scripts-run <skills-root>/corpus-grounding/scripts/ground search --manifest <skills-root>/api-design/data/manifest.json "<concern>" and propose the grounded pattern (+ hardening + anti-patterns + RFC link) before designing from memory. Corpus: data/api-patterns.csv.

When to use

Use this skill when designing new API endpoints, restructuring existing APIs, or deciding about versioning and deprecation.

Do NOT use when:

  • Implementing an already-designed endpoint (use api-endpoint skill)
  • Writing tests for APIs (use api-testing skill)

Procedure: Design an API

  1. Gather context — read agents/settings/contexts/api-versioning.md, agents/reference/docs/api-resources.md, agents/reference/docs/query-filter.md, agents/reference/docs/controller.md, and guideline php/api-design.md.
  2. Identify the resource — determine the domain entity, its attributes, and relationships. Check existing models and resources for field naming patterns.
  3. Define endpoints — list each endpoint with HTTP method, URL path, request body, query parameters, and response structure. Follow existing route file patterns.
  4. Decide versioning — determine whether this extends the current version or requires a new version (see decision table below).
  5. Design error responses — define 4xx/5xx responses matching the project's existing error format.
  6. Validate against existing patterns — compare your design with 2-3 similar existing endpoints. Flag any inconsistencies.
  7. Run adversarial review — use adversarial-review skill to check for breaking changes, consistency issues, and missing error cases.

Versioning decisions

URL-based versioning

Routes versioned via URL prefix: /api/v1/..., /api/v2/...

routes/api/v1/projects.php  → /api/v1/projects   (Laravel)
app/api/v1/projects/route.ts → /api/v1/projects   (Next.js)
routes/api/v2/projects.php  → /api/v2/projects

Read the full file on GitHub · 123 lines

Files

What ships with it

2 files 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. 4d ago First seen · 123 lines · 40 tokens per session scan A c625fc79747c

Subscribe to this mod's changes

api-design is a skill published in the GitHub repository event4u-app/agent-config (10 stars, last pushed today), licensed MIT. It adds 40 tokens to every session and 1,070 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

save-progress

Save current project task progress to local task state file for cross-session continuity. Use when the user asks to save progress, uses an equivalent localized trigger phrase, the session is interrupted, or the user wants to resume work later. Writes to .claude/project-task-state.json so next session can load it via…

KimYx0207/Meta_Kim · 65 tokens

meta-theory

MetaKim executable governance dispatcher. It classifies the run, loads only needed references, preserves foundational capabilities and runtime-native abilities, routes owner + weapon + dependency + runtime + OS + verification, and closes only with evidence, intent acceptance, and writeback decision.

KimYx0207/Meta_Kim · 57 tokens

same-set-reusable-flow-for-project-file-inventor

Reusable MetaKim file inventory classification flow. It helps separate durable sources, generated evidence, runtime mirrors, temporary state, and risky unknowns before cleanup or commit.

KimYx0207/Meta_Kim · 45 tokens

starreel-drama-production

Operating skill for any AI agent driving the StarReel short-drama production pipeline (script → rewrite → extract → portraits + sheets → storyboards → frames → video → voiceover → final cut) over MCP or REST. Covers the ordered workflow, the entry-point decision table (which channel each kind of customer material…

waydaxp/starreel-mcp · 102 tokens

seedance-20

Generate and direct cinematic AI videos with Seedance 2.0 (ByteDance/Dreamina/Jimeng). Covers text-to-video, image-to-video, video-to-video, and reference-to-video workflows with @Tag asset references, multi-character scenes, audio design, and post-processing. Use when making AI video, writing Seedance prompts…

Kingdaddy007/my-os · 96 tokens

browse-and-evaluate

Use when exploring the ai-agent-skills catalog to find, compare, and evaluate skills before installing. Always use --fields to limit output size and --dry-run before committing to an install.

MoizIbnYousaf/Ai-Agent-Skills · 43 tokens