api-design

api-design is a skill for Claude Code from juanmhidalgo/claude-plugins. It costs 37 tokens per session (757 once invoked), scanned A, original, MIT.

A guide for designing API endpoints—the defined ways that software systems exchange requests and responses—and the boundaries between modules or teams.

In plain words
What is it for?
Use it to define request and response types, error rules, boundary validation, and changes that can be added without breaking existing users.
Why use it?
It helps prevent incompatible interfaces, inconsistent errors, and validation gaps before implementation begins.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the handoff plugin — 2 skills, 3 commands shipped together

Good fit Use it to define request and response types, error rules, boundary validation, and changes that can be added without breaking existing users.

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

Made for: Claude Code.

Or install handoff, the plugin that ships this one along with the rest of its 2 skills, 3 commands.

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/juanmhidalgo/claude-plugins/api-design/github.svg)](https://agentmods.dev/skills/juanmhidalgo/claude-plugins/api-design)
Your own site
<a href="https://agentmods.dev/skills/juanmhidalgo/claude-plugins/api-design"><img src="https://agentmods.dev/badge/skills/juanmhidalgo/claude-plugins/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/juanmhidalgo/claude-plugins/api-design"><img src="https://agentmods.dev/badge/skills/juanmhidalgo/claude-plugins/api-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 757 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.00037 $0.00757
Opus 5.5 $0.00015 $0.00303
Sonnet 5.5 $0.00007 $0.00151
Haiku 4.5 $0.00004 $0.00076

Measured 2mo ago against content hash e281ca3585b4, 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 2mo 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.

handoff/skills/api-design/SKILL.md · 99 lines

How it starts

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

API and Interface Design

Contract-First Design

Define the interface before implementing it. The contract is the spec — implementation follows.

  1. Define types (input and output schemas) before writing route handlers
  2. Document error semantics — pick one error format and use it everywhere
  3. Add validation at boundaries — trust internal code after that
  4. Design for extension — prefer adding optional fields over modifying existing ones

Hyrum's Law

With sufficient users, all observable behaviors become depended on — regardless of your contract.

Every public behavior (including error message text, timing, ordering) becomes a de facto commitment. Design implications:

  • Be intentional about what you expose
  • Don't leak implementation details
  • Plan for deprecation at design time

Error Semantics

Pick one strategy. Use it everywhere. Never mix patterns.

Status Meaning
400 Client sent invalid data
401 Not authenticated
403 Authenticated but not authorized
404 Resource not found
409 Conflict (duplicate, version mismatch)
422 Validation failed (semantically invalid)
500 Server error (never expose internals)

Every error response follows the same shape:

{ "error": { "code": "MACHINE_READABLE", "message": "Human-readable", "details": {} } }

Naming Conventions

Pattern Convention Example
REST endpoints Plural nouns, no verbs GET /api/tasks
Query params camelCase ?sortBy=createdAt
Response fields camelCase { createdAt, taskId }
Boolean fields is/has/can prefix isComplete
Enum values UPPER_SNAKE "IN_PROGRESS"

Design Checklist

  • Every endpoint has typed input and output schemas
  • Error responses follow a single consistent format
  • Validation happens at system boundaries only
  • List endpoints support pagination
  • New fields are additive and optional (backward compatible)
  • Naming follows consistent conventions

Read the full file on GitHub · 99 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. 2mo ago Changed · -1 lines e281ca3585b4
  2. 2mo ago First seen · 100 lines · 37 tokens per session scan A 407c8c8fdccf

Subscribe to this mod's changes

api-design is a skill published in the GitHub repository juanmhidalgo/claude-plugins (8 stars, last pushed 18d ago), licensed MIT. It adds 37 tokens to every session and 757 once invoked, about $0.0001 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-09-03.

Related

api-design compared with skills from other repositories

api-design next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
api-designjuanmhidalgo/claude-pluginsSkill818d agoMITA37Claude Code
api-design-patternsNickCrew/Claude-CortexSkill7610d agoMITA48Claude Code, Codex
api-designMadAppGang/claude-codeSkill2908mo agoMITA35Claude Code
graphql-api-developmentJPeetz/agent-skillsSkill21yesterdaynoneA115Claude Code, Codex
graphql-architectfindscripter/everything-skillsSkill12todaynoneA146Claude Code
rest-api-design-patternsmanutej/luxor-claude-marketplaceSkill645mo agononeA35Claude Code
FastAPI Modern Web Developmentbobmatnyc/mcp-skillsetSkill198mo agoMITA41Claude Code, Codex