api-design

API design guidance for REST, GraphQL, gRPC, and Python library interfaces. It covers how clients and services exchange data through defined requests, responses, errors, authentication, and versioning.

In plain words
What is it for?
Use it to design endpoints, schemas, OpenAPI or Swagger specifications, GraphQL schemas, gRPC services, Python package interfaces, authentication, pagination, filtering, sorting, rate limits, and CORS.
Why use it?
It helps avoid unclear endpoints, incompatible data formats, weak error handling, and breaking changes. It also helps choose an API style that fits the system.

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

Made for: Claude Code, Codex.

Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,773 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.00114 $0.02773
Opus 5 $0.00057 $0.01386
Sonnet 5 $0.00023 $0.00555
Haiku 4.5 $0.00011 $0.00277

Measured 2d ago against content hash 8781b113d130, 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 2d ago.

The scan reads SKILL.md. This mod also ships 13 executable files (assets/example-config.py, assets/example-exceptions.py, scripts/api_helper.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

api-design/skills/api-design/SKILL.md · 338 lines

How it starts

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

API Design

Comprehensive API design skill combining REST, GraphQL, gRPC, and Python library architecture expertise with patterns, templates, and tools for production-grade APIs.

When to Activate

  • Creating new API endpoints (REST, GraphQL, gRPC)
  • Designing resource hierarchies and schemas
  • Writing OpenAPI/Swagger specifications
  • Implementing authentication and authorization
  • Setting up pagination, filtering, and sorting
  • Configuring rate limiting and CORS
  • Designing Python library APIs
  • Reviewing API designs in pull requests

Decision Tree: API Style Selection

What are you building?
+-- CRUD resources with clear entity model? --> REST
|   Best for: resource-oriented operations, caching, wide tooling support
+-- Complex queries with varying client needs? --> GraphQL
|   Best for: over-fetching prevention, nested data, multiple client types
+-- High-throughput service-to-service? --> gRPC
|   Best for: low latency, strong typing, streaming, polyglot microservices
+-- Reusable Python package? --> Python Library API
    Best for: SDKs, internal tooling, developer experience

Quick Reference

RESTful Resource Design

URL Patterns:

  • /api/v1/users (plural nouns, lowercase with hyphens)
  • /api/v1/organizations/{org_id}/teams (hierarchical, max 2 levels)
  • Never use verbs: /getUsers or underscores: /user_profiles

HTTP Methods:

  • GET - Retrieve (safe, idempotent, cacheable)
  • POST - Create (returns 201 with Location header)
  • PUT - Replace entire resource (idempotent)
  • PATCH - Partial update (only changed fields)
  • DELETE - Remove (idempotent, returns 204)

HTTP Status Codes

Category Code When
Success 200 GET, PUT, PATCH success
Success 201 POST success (include Location header)
Success 204 DELETE success
Client Error 400 Malformed request
Client Error 401 Missing/invalid authentication
Client Error 403 Insufficient permissions
Client Error 404 Resource doesn't exist
Client Error 409 Duplicate resource
Client Error 422 Validation errors
Client Error 429 Rate limit exceeded
Server Error 500 Unhandled exception
Server Error 503 Database/service down

Read the full file on GitHub · 338 lines

Files

What ships with it

48 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. 2d ago First seen · 338 lines · 114 tokens per session scan A 8781b113d130

Subscribe to this mod's changes

api-design is a skill published in the GitHub repository viktorbezdek/skillstack (11 stars, last pushed 2mo ago), licensed MIT. It adds 114 tokens to every session and 2,773 once invoked, about $0.0006 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

gossipcat

Use when installing or setting up gossipcat multi-agent orchestration (parallel review, consensus, adaptive dispatch) in Claude Code or Cursor. Installs the gossipcat MCP server and hands off to gossipstatus() for all live rules.

gossipcat-ai/gossipcat-ai · 50 tokens

Elephant Agent

Complete guide to what Elephant Agent is, how to use it from the CLI, how herd, wake, Personal Model, proactive curiosity, skills, and tools fit together, and how to explain Elephant Agent clearly to users, contributors, or evaluators.

agentic-in/elephant-agent · 54 tokens

libretranslate-markdown-i18n

Machine-translate Markdown / Obsidian / Quartz content into other languages using a self-hosted LibreTranslate instance, preserving frontmatter, headings, emojis, bold/italic, wikilinks (![[...]]/[[...]]) and internal links. Use whenever a user wants to auto-translate a Markdown vault, Obsidian notes, or a…

pedroiff0/awesome-skills · 127 tokens

awesome-skills-master

Master catalog orchestrator and autonomous installer for AI agents. Use when exploring, cloning, discovering, or installing skills, plugins, or MCP servers from awesome-skills without using interactive CLI tools. Guides environment detection, rule adaptation (.mdc/CLAUDE.md), MCP configuration, and strict author…

pedroiff0/awesome-skills · 66 tokens

readme-template

Standard README template for repos — professional structure with badges, overview, table of contents, features/modules, stack, installation, configuration, tests, security, structure, docs, roadmap, contribute, license, author + RepoActivity sections (Star History, repo stats) + profile GIF footer. Use when creating…

pedroiff0/awesome-skills · 72 tokens

docker-single-port-multi-instance

Consolidate multiple Docker Compose app instances (production / test / demo) behind ONE host port using an nginx reverse proxy that routes by URL path prefix (e.g. /demo). Use when a user wants 'one port, several apps/banks' or a demo reachable simultaneously from the main landing page with its own database.

pedroiff0/awesome-skills · 73 tokens