api-design

Guidance for designing web APIs, which are interfaces that let software exchange data and actions. It covers REST, GraphQL, versioning, authentication, errors, documentation, performance, and security.

In plain words
What is it for?
Use it to plan REST or GraphQL interfaces, choose authentication and versioning approaches, design error responses, and document an API.
Why use it?
It helps avoid inconsistent endpoints, breaking changes, unclear errors, unsafe access, and incomplete documentation.

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

Made for: Claude Code, Codex.

Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,584 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% 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 $0.00064 $0.03584
Opus 5 $0.00032 $0.01792
Sonnet 5 $0.00013 $0.00717
Haiku 4.5 $0.00006 $0.00358

Measured yesterday against content hash 262bdea521ec, 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 yesterday.

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.

Origin

This is a copy

100% identical to api-design — 0 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.

skills/en/api-design/SKILL.md · 483 lines

How it starts

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

API Design Skill - System Prompt

You are an expert API architect with 15+ years of experience in designing robust, scalable, and developer-friendly APIs. You specialize in RESTful API design, GraphQL, API versioning, authentication/authorization, and API security best practices.

Your Expertise

Core API Disciplines

  • RESTful API Design: Resource modeling, URI design, HTTP method selection, HATEOAS
  • GraphQL Design: Schema design, resolver patterns, query optimization, federation
  • API Versioning: URI versioning, header versioning, backward compatibility strategies
  • Idempotency: Idempotency key patterns, distributed locking, state machine design
  • Authentication/Authorization: OAuth 2.0, JWT, API keys, RBAC/ABAC, fine-grained permissions
  • Error Handling: Unified error responses, error code design, internationalization
  • API Documentation: OpenAPI/Swagger, examples, changelog, developer portal
  • Performance: Caching strategies, pagination, compression, rate limiting
  • API Security: Input validation, injection prevention, CORS, HTTPS, secrets management

Technical Depth

  • HTTP protocol (1.1, 2, 3) and status codes
  • API gateway patterns and tools
  • Service mesh and API management platforms
  • Contract testing and API versioning strategies
  • Developer experience optimization
  • API monitoring and observability

Core Principles You Follow

1. RESTful Design Principles

Resource-Oriented Architecture
✅ Good Resource Design:
GET    /api/v1/users              # Collection
POST   /api/v1/users              # Create
GET    /api/v1/users/{id}         # Single resource
PUT    /api/v1/users/{id}         # Full update
PATCH  /api/v1/users/{id}         # Partial update
DELETE /api/v1/users/{id}         # Delete
GET    /api/v1/users/{id}/posts   # Sub-resource

❌ Bad Design:
GET    /api/getUsers              # Verb in URI
POST   /api/createUser            # Not resource-oriented
GET    /api/user?action=delete    # Action in query param

Read the full file on GitHub · 483 lines

Files

What ships with it

4 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. yesterday First seen · 483 lines · 64 tokens per session scan A 262bdea521ec

Subscribe to this mod's changes

api-design is a skill published in the GitHub repository ProjAnvil/MindForge (3 stars, last pushed 5mo ago), licensed MIT. It adds 64 tokens to every session and 3,584 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to api-design, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

opik-diagnose

Surface the Opik traces worth a developer's attention, ranked by signal — errors, failed tool calls, latency, regressions, and low online-eval scores — plus Diagnostics issues. Reads live/production traces via the SDK (searchtraces and agentinsights) and works with no MCP; uses the MCP issue entity when connected.…

comet-ml/opik-mcp · 147 tokens

client-scripts

Write ServiceNow client scripts (onLoad/onChange/onSubmit/onCellEdit) using gform, guser, GlideAjax, field visibility/mandatory toggles, and validation with debounced server calls.

serac-labs/serac · 45 tokens

agoragentic-transaction-assurance

Prepare, evaluate, and reconcile autonomous agent transactions without self-granting payment or owner authority. Use when an agent must bind principal authority, seller terms, payment evidence, execution, delivered outcome, and reconciliation; handle paid retries safely; or prepare an authority request for owner…

rhein1/agoragentic-integrations · 65 tokens

linkding

Manage bookmarks with Linkding. Use when the user asks to "save a bookmark", "add link", "search bookmarks", "list my bookmarks", "find saved links", "tag a bookmark", "archive bookmark", "check if URL is saved", "list tags", "create bundle", or mentions Linkding bookmark management.

jmagar/claude-homelab · 69 tokens

debugging-mutations

Verify what changed on a ServiceNow instance after a tool call — sysaudit inspection, syslog/transaction logs, session context, Flow Designer execution logs, outbound HTTP traces.

serac-labs/serac · 41 tokens

maya-shot-export

Pipeline stage — shot-level export: frame ranges, cameras, FBX / Alembic packaging for editorial. Use when packaging shot data for downstream departments. Not for full pipeline publish (maya-pipeline) or scene assembly (maya-scene-assembly).

dcc-mcp/dcc-mcp-maya · 60 tokens