Agent skill

API Design

by yonatangross in yonatangross/orchestkit

API contract design for REST and GraphQL, covering resource shape, URL and header versioning with deprecation windows, RFC 9457 Problem Details error handling, and OpenAPI specs.

MITAuto-check passedBackend & APIs

Install API Design

skills CLI
$ npx skills add yonatangross/orchestkit --skill api-design -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install yonatangross/orchestkit api-design --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/yonatangross/orchestkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/skills/api-design .claude/skills/api-design && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
api-design
GitHub stars
289
Token cost
~2.9k tokens
SKILL.md length
1,030 words
Files
34 (incl. scripts, references, assets)
Skills in repo
108
Repo updated
First seen
Licence
MIT

At a glance

API contract design for REST and GraphQL, covering resource shape, URL and header versioning with deprecation windows, RFC 9457 Problem Details error handling, and OpenAPI specs.

  • Works in 9 steps: Verbs in URLs (POST /createUser instead… → Inconsistent error formats across… → Breaking contracts without version bump → …
  • Specifying the wire contract an endpoint exposes
  • SKILL.md covers Quick Reference, API Framework, Versioning and Error Handling, plus 11 more sections
  • Choosing a versioning scheme

What it does

API Design is an agent skill from yonatangross/orchestkit. API contract design for REST and GraphQL, covering resource shape, URL and header versioning with deprecation windows, RFC 9457 Problem Details error handling, and OpenAPI specs. Use when specifying the wire contract an endpoint exposes, choosing a versioning scheme, or standardizing error response bodies across services. Framework-agnostic protocol layer, not runtime implementation.

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 37 other files, including scripts, reference files and assets (for example `assets/asyncapi-template.yaml`, `assets/openapi-template.yaml` and `examples/fastapi-problem-details.md`). Compatibility notes: Claude Code 2.1.277+.

It sits in Backend & APIs, covering API design, GraphQL and OpenAPI specifications. It works with GraphQL, gRPC and OpenAPI. The repository describes itself as: The Complete AI Development Toolkit for Claude Code. 106 skills, 36 agents, 171 hooks. Install ork for stable (v9.x), or ork-alpha for the v10 line, which ships daily. The licence is MIT.

When your agent uses it

  • Specifying the wire contract an endpoint exposes
  • Choosing a versioning scheme
  • Standardizing error response bodies across services

Example prompts

  • “/api-design”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): Claude Code 2.1.277+.
  • Pre-approved tools (allowed-tools): Read, Glob, Grep, WebFetch, WebSearch

Workflow steps

9 steps, taken from the first numbered list in SKILL.md.

  1. Verbs in URLs (POST /createUser instead of POST /users)
  2. Inconsistent error formats across endpoints
  3. Breaking contracts without version bump
  4. Plain text error responses instead of Problem Details
  5. Sunsetting versions without deprecation headers
  6. Exposing internal details (stack traces, DB errors) in errors
  7. Missing Content-Type: application/problem+json on error responses
  8. Supporting too many concurrent API versions (max 2-3)
  9. Caching without considering version isolation

What it can do on your machine

Read from SKILL.md and the folder at commit 0ef71d2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Glob
    • Grep
    • WebFetch
    • WebSearch

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • rfc-editor.org
    • fastapi.tiangolo.com
    • developer.mozilla.org
    • spec.openapis.org
    • grpc.io
    • protobuf.dev
    • payloadcms.com
    • zod.dev
    • tanstack.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Claude Code 2.1.277+.

    From compatibility in the SKILL.md frontmatter.

Context cost

API Design loads about 2.9k tokens when it runs, and up to ~11k if it reads all its reference files. Until then it costs about 99 tokens; SKILL.md has 1,030 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~99
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~11k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from yonatangross/orchestkit at commit 0ef71d2, republished under its MIT licence (© yonatangross). 1,030 words, ~2,874 tokens.

Download SKILL.mdSave it as .claude/skills/api-design/SKILL.md (or your agent's skills folder). This skill also uses 33 other files; get the full folder from GitHub.
name
api-design
description
API contract design for REST and GraphQL, covering resource shape, URL and header versioning with deprecation windows, RFC 9457 Problem Details error handling, and OpenAPI specs. Use when specifying the wire contract an endpoint exposes, choosing a versioning scheme, or standardizing error response bodies across services. Framework-agnostic protocol layer, not runtime implementation.
allowed-tools
Read, Glob, Grep, WebFetch, WebSearch
compatibility
Claude Code 2.1.277+.
license
MIT
user-invocable
false
disable-model-invocation
false
metadata.owner-agent
backend-system-architect
metadata.category
document-asset-creation
metadata.version
2.0.0
metadata.author
OrchestKit
metadata.complexity
medium
metadata.tags
api-design, rest, graphql, versioning, error-handling, rfc9457, openapi, problem-details
path_patterns
**/routes/**, **/api/**, **/endpoints/**, openapi.*, swagger.*

API Design

Comprehensive API design patterns covering REST/GraphQL framework design, versioning strategies, and RFC 9457 error handling. Each category has individual rule files in rules/ loaded on-demand.

Quick Reference

CategoryRulesImpactWhen to Use
API Framework3HIGHREST conventions, resource modeling, OpenAPI specifications
Versioning2HIGHURL path versioning, header versioning; deprecation windows are house policy in references/ork-delta.md
Error Handling1HIGHAgent-facing RFC 9457 extensions; base spec and FastAPI wiring are upstream
GraphQL2HIGHStrawberry code-first, DataLoader, permissions, subscriptions
gRPC2HIGHProtobuf services, streaming, interceptors, retry
Streaming2HIGHSSE endpoints, WebSocket bidirectional, async generators
Integrations2HIGHMessaging platforms (WhatsApp, Telegram), Payload CMS patterns

Total: 14 rules across 7 categories. House decisions rescued from thinned files live in references/ork-delta.md; vendor and spec material is linked, not restated (see Upstream coverage).

API Framework

REST and GraphQL API design conventions for consistent, developer-friendly APIs.

RuleFileKey Pattern
REST Conventionsrules/framework-rest-conventions.mdPlural nouns, HTTP methods, status codes, pagination
Resource Modelingrules/framework-resource-modeling.mdHierarchical URLs, filtering, sorting, field selection
OpenAPIrules/framework-openapi.mdOpenAPI 3.1 specs, documentation, schema definitions

Versioning

Strategies for API evolution without breaking clients.

RuleFileKey Pattern
URL Pathrules/versioning-url-path.md/api/v1/ prefix routing, version-specific schemas
Headerrules/versioning-header.mdX-API-Version header, content negotiation

Deprecation and sunset: the house window (3 months notice, 6 months sunset, current + 1 supported) is in references/ork-delta.md; header mechanics are upstream (RFC 8594, RFC 9745).

Error Handling

RFC 9457 Problem Details for machine-readable, standardized error responses.

RuleFileKey Pattern
Agent-Facing Errorsrules/errors-agent-facing.mdAgent extensions: retryable, error_category, content negotiation, token efficiency

The RFC 9457 base format, FastAPI exception-handler wiring, and Pydantic 422 mapping are upstream (see Upstream coverage). The house pieces survive here: problem type URI convention and typed exception vocabulary in references/ork-delta.md, full working implementation in examples/fastapi-problem-details.md.

GraphQL

Strawberry GraphQL code-first schema with type-safe resolvers and FastAPI integration.

RuleFileKey Pattern
Schema Designrules/graphql-strawberry.mdType-safe schema, DataLoader, union errors, Private fields
Patterns & Authrules/graphql-schema.mdPermission classes, FastAPI integration, subscriptions

gRPC

High-performance gRPC for internal microservice communication.

RuleFileKey Pattern
Service Definitionrules/grpc-service.mdProtobuf, async server, client timeout, code generation
Streaming & Interceptorsrules/grpc-streaming.mdServer/bidirectional streaming, auth, retry backoff

Streaming

Real-time data streaming with SSE, WebSockets, and proper cleanup.

RuleFileKey Pattern
SSErules/streaming-sse.mdSSE endpoints, LLM streaming, reconnection, keepalive
WebSocketrules/streaming-websocket.mdBidirectional, heartbeat, aclosing(), backpressure

Integrations

Messaging platform integrations and headless CMS patterns.

RuleFileKey Pattern
Messaging Platformsrules/messaging-integrations.mdWhatsApp WAHA, Telegram Bot API, webhook security
Payload CMSrules/payload-cms.mdPayload 3.0 collections, access control, CMS selection

Quick Start Example

python
# REST endpoint with versioning and RFC 9457 errors
from fastapi import APIRouter, Depends, Request
from fastapi.responses import JSONResponse

router = APIRouter()

@router.get("/api/v1/users/{user_id}")
async def get_user(user_id: str, service: UserService = Depends()):
    user = await service.get_user(user_id)
    if not user:
        raise NotFoundProblem(
            resource="User",
            resource_id=user_id,
        )
    return UserResponseV1(id=user.id, name=user.full_name)

Key Decisions

DecisionRecommendation
Versioning strategyURL path (/api/v1/) for public APIs
Resource namingPlural nouns, kebab-case
PaginationCursor-based for large datasets
Error formatRFC 9457 Problem Details with application/problem+json
Error type URIYour API domain + /problems/ prefix
Support windowCurrent + 1 previous version
Deprecation notice3 months minimum before sunset
Sunset period6 months after deprecation
GraphQL schemaCode-first with Strawberry types
N+1 preventionDataLoader for all nested resolvers
GraphQL authPermission classes (context-based)
gRPC protoOne service per file, shared common.proto
gRPC streamingServer stream for lists, bidirectional for real-time
SSE keepaliveEvery 30 seconds
WebSocket heartbeatping-pong every 30 seconds
Async generator cleanupaclosing() for all external resources

Common Mistakes

  1. Verbs in URLs (POST /createUser instead of POST /users)
  2. Inconsistent error formats across endpoints
  3. Breaking contracts without version bump
  4. Plain text error responses instead of Problem Details
  5. Sunsetting versions without deprecation headers
  6. Exposing internal details (stack traces, DB errors) in errors
  7. Missing Content-Type: application/problem+json on error responses
  8. Supporting too many concurrent API versions (max 2-3)
  9. Caching without considering version isolation
Show full SKILL.md (429 more words)Show less

Upstream coverage (do not restate)

Topics removed in the 2026-07-31 wrap-plus-delta thinning. Consult the first-party source; only the ork delta (house policy, scars, working config) belongs in this skill.

TopicFirst-party source
RFC 9457 Problem Details spec (members, media type, about:blank, client parsing)https://www.rfc-editor.org/rfc/rfc9457.html
FastAPI exception handlers, Pydantic validation errors (422), error catalog boilerplatehttps://fastapi.tiangolo.com/tutorial/handling-errors/
API versioning strategy tutorials and FastAPI versioned-router walkthroughshttps://fastapi.tiangolo.com/tutorial/bigger-applications/
Deprecation and Sunset header mechanicshttps://www.rfc-editor.org/rfc/rfc8594.html and https://www.rfc-editor.org/rfc/rfc9745.html
Generic REST reference (methods, status codes, pagination shapes, auth headers)https://www.rfc-editor.org/rfc/rfc9110.html and https://developer.mozilla.org/en-US/docs/Web/HTTP
OpenAPI 3.1 spec authoring (template survives in assets/openapi-template.yaml)https://spec.openapis.org/oas/v3.1.0
gRPC proto style, service definition, status codeshttps://grpc.io/docs/ and https://protobuf.dev/programming-guides/style/
Payload CMS collection design, field types, access controlhttps://payloadcms.com/docs
Frontend API consumption (Zod boundary validation, ky, TanStack Query)https://zod.dev and https://tanstack.com/query/latest/docs
API design / error handling / versioning review checklistsDerivable from the specs above; no checklist restatement kept

Evaluations

See test-cases.json for 13 test cases across all categories.

  • fastapi-advanced - FastAPI-specific implementation patterns
  • rate-limiting - Advanced rate limiting implementations and algorithms
  • observability-monitoring - Version usage metrics and error tracking
  • input-validation - Validation patterns beyond API error handling
  • streaming-api-patterns - SSE and WebSocket patterns for real-time APIs

Capability Details

rest-design

Keywords: rest, restful, http, endpoint, route, path, resource, CRUD Solves:

  • How do I design RESTful APIs?
  • REST endpoint patterns and conventions
  • HTTP methods and status codes
graphql-design

Keywords: graphql, schema, query, mutation, connection, relay Solves:

  • How do I design GraphQL APIs?
  • Schema design best practices
  • Connection pattern for pagination
endpoint-design

Keywords: endpoint, route, path, resource, CRUD, openapi Solves:

  • How do I structure API endpoints?
  • What's the best URL pattern for this resource?
  • RESTful endpoint naming conventions
url-versioning

Keywords: url version, path version, /v1/, /v2/ Solves:

  • How to version REST APIs?
  • URL-based API versioning
header-versioning

Keywords: header version, X-API-Version, content negotiation Solves:

  • Clean URL versioning
  • Header-based API version
deprecation

Keywords: deprecation, sunset, version lifecycle, backward compatible Solves:

  • How to deprecate API versions?
  • Version sunset policy
  • Breaking vs non-breaking changes
problem-details

Keywords: problem details, RFC 9457, RFC 7807, structured error, application/problem+json Solves:

  • How to standardize API error responses?
  • What format for API errors?
agent-facing-errors

Keywords: agent error, AI agent, retryable, retry_after, error_category, content negotiation, accept header, token efficient, machine readable Solves:

  • How to design error responses for AI agent consumers?
  • How to reduce token cost of error responses?
  • How to enable deterministic agent error handling?
  • Content negotiation for agents vs browsers vs LLMs
validation-errors

Keywords: validation, field error, 422, unprocessable, pydantic Solves:

  • How to handle validation errors in APIs?
  • Field-level error responses
error-registry

Keywords: error registry, problem types, error catalog, error codes Solves:

  • How to document all API errors?
  • Error type management

© yonatangross, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 33 other files (scripts, references, assets) in src/skills/api-design of yonatangross/orchestkit.

  • SKILL.md
  • assets/asyncapi-template.yaml
  • assets/openapi-template.yaml
  • examples/fastapi-problem-details.md
  • examples/orchestkit-api-design.md
  • metadata.json
  • references/graphql-api.md
  • references/ork-delta.md
  • references/payload-vs-sanity.md
  • references/rest-patterns.md
  • references/telegram-bot-api.md
  • references/webhook-security.md
  • references/whatsapp-waha.md
  • rules/_sections.md
  • rules/_template.md
  • rules/errors-agent-facing.md
  • rules/framework-openapi.md
  • … and 17 more

Open the folder on GitHubat commit 0ef71d2

Compare with similar skills

API Design next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

API Design compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
API Design this skillyonatangross/orchestkit289—~2.9kAutomated safety check: PassMIT
API Contract Detectionprime-radiant-inc/greenfield292—~4.2kAutomated safety check: PassApache-2.0
API Architectcuriositech/some_claude_skills2431 repos~1.4kAutomated safety check: PassMIT
API Designmajiayu000/spellbook286—~2.1kAutomated safety check: PassMIT
API ForgeEliasOulkadi/shokunin114—~2.9kAutomated safety check: PassMIT
API Designmajiayu000/claude-skill-registry6661 repos~4.2kAutomated safety check: PassMIT

Similar skills

  • API Contract Detection

    prime-radiant-inc/greenfield

    Finds OpenAPI, GraphQL, Protobuf and JSON Schema files in a codebase and extracts behavioral claims from them as part of a reverse-engineering workflow.

    292 GitHub stars~4.2k tokensUpdated 2 mo ago
    Backend & APIsAuto-check passed
  • API Architect

    curiositech/some_claude_skills

    Expert API designer for REST, GraphQL, gRPC architectures. An agent skill from curiositech/some_claude_skills.

    243 GitHub starsUsed in 1 repo~1.4k tokens
    Backend & APIsAuto-check passed
  • API Design

    majiayu000/spellbook

    REST/GraphQL/gRPC API design best practices. An agent skill from majiayu000/spellbook.

    286 GitHub stars~2.1k tokensUpdated today
    Backend & APIsAuto-check passed
  • API Forge

    EliasOulkadi/shokunin

    Design REST/GraphQL APIs with OpenAPI 3.1, error handling, pagination, rate limiting, webhooks, and idempotency.

    114 GitHub stars~2.9k tokensUpdated 3 days ago
    Backend & APIsAuto-check passed
  • API Design

    majiayu000/claude-skill-registry

    A skill your agent uses when designing APIs, choosing between REST/GraphQL/gRPC, writing OpenAPI specs, implementing pagination, versioning endpoints, or structuring request/response schemas.

    666 GitHub starsUsed in 1 repo~4.2k tokens
    Backend & APIsAuto-check passed
  • System Design Communication

    HoangNguyen0403/agent-skills-standard

    Select how services talk: REST, gRPC, GraphQL, WebSocket, SSE, or webhook per hop, sync versus async per flow, service discovery mode, and DNS/edge routing.

    571 GitHub stars~894 tokensUpdated yesterday
    Backend & APIsAuto-check passed

More from yonatangross/orchestkit

All 108 skills in this repo
  • Architecture Decision Record

    yonatangross/orchestkit

    ADR templates in the Nygard format with context, decision, consequences, and alternatives.

    289 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Audit Full

    yonatangross/orchestkit

    Single-pass codebase analysis leveraging a 1M-token context window for comprehensive security scanning, architecture review, and dependency auditing.

    289 GitHub stars~3.5k tokensUpdated today
    Auto-check: notes
  • Code Review Playbook

    yonatangross/orchestkit

    Structured review processes, conventional comments, language-specific checklists, and feedback templates.

    289 GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Create PR

    yonatangross/orchestkit

    Creates GitHub pull requests with pre-flight validation, conventional title formatting, and structured summary generation.

    289 GitHub stars~4.5k tokensUpdated today
    Auto-check: notes
  • Explore

    yonatangross/orchestkit

    Multi-angle codebase exploration spawning 3-5 parallel agents for code structure, data flow, architecture patterns, and health assessment.

    289 GitHub stars~3.9k tokensUpdated today
    Auto-check: notes
  • Python Backend

    yonatangross/orchestkit

    Production Python async patterns including asyncio TaskGroup, FastAPI dependency injection and middleware, SQLAlchemy 2.0 async sessions, and database connection pool tuning.

    289 GitHub stars~2.8k tokensUpdated today
    Auto-check: notes

Categories

Questions about API Design

What does API Design do?

API contract design for REST and GraphQL, covering resource shape, URL and header versioning with deprecation windows, RFC 9457 Problem Details error handling, and OpenAPI specs. API Design is an agent skill from yonatangross/orchestkit. API contract design for REST and GraphQL, covering resource shape, URL and header versioning with deprecation windows, RFC 9457 Problem Details error handling, and OpenAPI specs.

When should I use API Design?

API Design fits situations like: specifying the wire contract an endpoint exposes; choosing a versioning scheme; standardizing error response bodies across services.

How do I install API Design in Claude Code?

Run `npx skills add yonatangross/orchestkit --skill api-design -a claude-code`. Or copy the skill folder (src/skills/api-design in yonatangross/orchestkit) into .claude/skills/api-design in your project. Claude Code loads it when a task matches its description.

How do I install API Design in Codex?

Run `npx skills add yonatangross/orchestkit --skill api-design -a codex`. Or copy the skill folder (src/skills/api-design in yonatangross/orchestkit) into .agents/skills/api-design in your project. Codex loads it when a task matches its description.

Can I use API Design in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add yonatangross/orchestkit --skill api-design -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-design, .gemini/skills/api-design, .github/skills/api-design and .opencode/skills/api-design in your project.

What does API Design need to run?

SKILL.md names no scripts, command-line tools or credentials: API Design is instructions for the agent only. Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Glob, Grep, WebFetch, WebSearch. Compatibility (from SKILL.md): Claude Code 2.1.277+..

Does API Design access the network?

SKILL.md names 9 domains. As links in the text: rfc-editor.org, fastapi.tiangolo.com, developer.mozilla.org, spec.openapis.org, grpc.io, protobuf.dev, payloadcms.com, zod.dev and tanstack.com. This is read from the text; nothing was executed.

Is API Design safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does API Design use?

API Design is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does API Design use?

About 2.9k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 8.5k tokens, read only when the agent opens those files.

What are the alternatives to API Design?

Skills that share tags, products or a category with API Design: API Contract Detection (prime-radiant-inc/greenfield, 292 stars), API Architect (curiositech/some_claude_skills, 243 stars), API Design (majiayu000/spellbook, 286 stars) and API Forge (EliasOulkadi/shokunin, 114 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains API Design?

yonatangross (a GitHub user) maintains it in yonatangross/orchestkit, which has 289 GitHub stars. The repository holds 108 skills in this directory. The repository was last updated on October 7, 2026.

Source: yonatangross/orchestkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.