api-design-skill

api-design-skill is a skill for Claude Code, Codex from darellchua2/opencode-config-template. It costs 39 tokens per session (1,621 once invoked), scanned C, original, Apache-2.0.

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

Written for no agent in particular: nothing here depends on one. Also seen: mentions OpenCode.

Good fit 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.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/darellchua2/opencode-config-template/api-design-skill
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 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.

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-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/api-design-skill/github.svg)](https://agentmods.dev/skills/darellchua2/opencode-config-template/api-design-skill)
Your own site
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/api-design-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/api-design-skill/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-skill

Your own site · 80×15
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/api-design-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/api-design-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,621 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00039 $0.01621
Opus 5.5 $0.00016 $0.00648
Sonnet 5.5 $0.00008 $0.00324
Haiku 4.5 $0.00004 $0.00162

Measured 1mo ago against content hash 43b5fa815769, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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 protocol is enabled, this skill defaults to `Iterations: 10` (sufficient for typical single-pass workflows). Override with `Iterations: N` for specific tasks. Safety blocks: `.env`, `node_modules/`, `rm -rf`, `git p
skills/api-design-skill/SKILL.md · 90 lines

How it starts

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

What I do

Design APIs: REST conventions, OpenAPI generation (FastAPI auto / Next manual), GraphQL schemas, versioning, pagination, rate limiting, error envelopes. The authoring-quality gate below is load-bearing; the rest is standard practice applied with house judgment.

When to use me

Designing or documenting an API; authoring/editing an OpenAPI spec (directly or via generator code); schema-contract verification.

Related: openapi-contract-adherence-skill (diffing/breaking-change detection) · authentication-authorization-skill (auth implementation) · security-audit-skill (security auditing).

Step 4.5: Authoring Quality Gate

Applies at write time, all languages/frameworks. When authoring or editing an OpenAPI spec — directly (openapi.yaml/openapi.json/swagger.yaml) or via code that generates one (FastAPI, NestJS+nestjs/swagger, tsoa, @asteasolutions/zod-to-openapi / @hono/zod-openapi, Spring+springdoc-openapi, Django DRF+drf-spectacular/drf-yasg) — every operation AND every schema MUST carry a human-readable description and at least one example. This is what makes a spec teach end users how to consume the API; a schema without a description is a type, not a contract.

Per-framework mapping (where the description/example lives)

For code-gen frameworks the spec's description/example come from source annotations:

Framework Description source Example source
FastAPI (Python) route docstring + summary=; Pydantic Field(description=...) Field(examples=[...]); @app.post(..., responses={...})
NestJS (TS) @ApiOperation({description}); @ApiProperty({description}) @ApiProperty({example}); @ApiResponse({content:{...example}})
tsoa (TS) JSDoc on controller method @Example() / @Response() decorators (responses); @example JSDoc tag (params/props)
zod-to-openapi / hono zod-openapi .open({description}) / .meta() .open({example}) / .meta({example})
Spring + springdoc (Java) @Operation(description) / @Schema(description) @Schema(example) / @Parameter(example)
Django DRF (drf-spectacular / drf-yasg) @extend_schema(description=) / @swagger_auto_schema / serializer help_text @extend_schema(examples=[OpenApiExample(...)]); @swagger_auto_schema(...) examples

Read the full file on GitHub · 90 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. 1mo ago Changed · -562 lines 43b5fa815769
  2. 1mo 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 28d ago), licensed Apache-2.0. It adds 39 tokens to every session and 1,621 once invoked, about $0.0002 per session on Opus 5.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.