api-design-skill

A guide for designing and documenting web APIs, which are interfaces that let software systems exchange data. It covers REST, GraphQL, and API specifications such as OpenAPI or Swagger.

In plain words
What is it for?
Use it to design REST or GraphQL APIs, write OpenAPI documentation, plan versioning and pagination, standardize error responses, add rate limits, or review an existing API.
Why use it?
It helps keep endpoint names, responses, errors, versions, and access limits consistent as an API grows. This makes an API easier for other developers to understand and use.

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

Made for: Claude Code, Codex.

Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,568 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00039 $0.05568
Opus 5 $0.00019 $0.02784
Sonnet 5 $0.00008 $0.01114
Haiku 4.5 $0.00004 $0.00557

Measured 2d ago against content hash d5f5d1f72b3a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

api-design-skill scanned grade C with 1 finding 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.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

When enabled, defaults to `Iterations: 10`. Safety blocks: `.env`, `node_modules/`, `rm -rf`, `git push --force`.
opencode_app/.opencode/skills/api-design-skill/SKILL.md · 652 lines

How it starts

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

What I do

I help you design, document, and implement well-structured APIs:

  1. REST Design: Resource naming, HTTP methods, status codes, URL conventions
  2. OpenAPI/Swagger: Generate and maintain API specifications
  3. GraphQL: Schema design, resolver patterns, query optimization
  4. Versioning: URL, header, and content negotiation strategies
  5. Pagination: Cursor-based, offset-based, and relay-style patterns
  6. Error Handling: Consistent error response formats across API types
  7. Rate Limiting: Implementation patterns and header conventions

When to use me

Use this skill when:

  • Designing a new REST or GraphQL API
  • Creating OpenAPI/Swagger documentation
  • Implementing API versioning strategy
  • Designing pagination for large data sets
  • Standardizing error response formats
  • Planning rate limiting and throttling
  • Reviewing existing API design for improvements
  • Converting REST endpoints to GraphQL (or vice versa)
  • clean-architecture-skill: Layer boundaries and dependency rules for API implementations
  • design-patterns-skill: Structural patterns (Repository, Facade) useful in API design
  • authentication-authorization-skill: Auth middleware and token handling for APIs
  • performance-optimization-skill: Query optimization and caching for API endpoints
  • openapi-contract-adherence-skill: Reactive counterpart — breaking-change detection and consumer-impact review after a spec changes (§4.5 covers authoring-time quality; that skill covers evolution-time impact)

Step 1: REST Design Conventions

Resource Naming

GET    /api/v1/users              # Collection
GET    /api/v1/users/123          # Single resource
POST   /api/v1/users              # Create resource
PATCH  /api/v1/users/123          # Partial update
PUT    /api/v1/users/123          # Full replacement
DELETE /api/v1/users/123          # Delete resource

GET    /api/v1/users/123/orders   # Sub-collection
POST   /api/v1/users/123/orders   # Create sub-resource

GET    /api/v1/orders?status=active&sort=-created_at&page=2

Read the full file on GitHub · 652 lines

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 · 652 lines · 39 tokens per session scan C d5f5d1f72b3a

Subscribe to this mod's changes

api-design-skill is a skill published in the GitHub repository darellchua2/opencode-config-template (6 stars, last pushed 2d ago), licensed Apache-2.0. It adds 39 tokens to every session and 5,568 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). 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

pr-to-video

Turn a GitHub pull request (a PR URL, owner/repo#N, or 'this PR' in a checked-out repo) into a code-change explainer video — changelog, feature reveal, fix, or refactor walkthrough built from the diff, commits, and files: the input is a code change, not a website. Not a product promo (/product-launch-video) or a no-PR…

heygen-com/hyperframes · 104 tokens

slideshow

Author a HyperFrames slideshow — a presentation, pitch deck, or interactive deck with discrete slides, fragment reveals, branching, hotspot navigation, and built-in presenter mode with speaker notes; also converts an existing page into a deck. Output is a navigable deck, not a rendered MP4. If the user didn't…

heygen-com/hyperframes · 83 tokens

general-video

Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated…

heygen-com/hyperframes · 92 tokens

motion-graphics

A short, design-led motion graphic where motion is the message — kinetic typography, stat count-up, chart/data-viz hit, logo sting / brand lockup, lower-third / callout / social overlay, animated map (highlight regions, connect places, zoom to a location), animated tweet / news-article / headline, webpage / UI…

heygen-com/hyperframes · 139 tokens

implementation-final-review

Perform the repository's risk-tiered independent final review before implementation completion. Use only when explicitly invoked or when repository instructions require it after behavior-impacting implementation work; audit the complete task diff, supported contracts, lifecycle and security boundaries, complexity, and…

openai/openai-agents-python · 58 tokens

hyperframes-core

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Also covers Tailwind projects and the STORYBOARD.md / SCRIPT.md…

heygen-com/hyperframes · 77 tokens