api-design

api-design is a skill for Claude Code, Codex from aneja5/forge-skills. It costs 48 tokens per session (2,209 once invoked), scanned A, original, MIT.

A guide for defining consistent rules for web APIs, the interfaces software uses to communicate. It covers responses, errors, versions, pagination, access control, and retries.

In plain words
What is it for?
Use it when creating a service or public endpoint, connecting two services, planning breaking changes, or deciding how lists, errors, and repeated requests should work.
Why use it?
It prevents different endpoints or services from using incompatible formats and rules. This makes integrations easier to build and safer to change.

Skill for Claude CodeCodex

Part of the forge-skills plugin — 6 skills, 36 commands, 13 agents, 1 hook shipped together

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

Made for: Claude Code, Codex.

Or install forge-skills, the plugin that ships this one along with the rest of its 6 skills, 36 commands, 13 agents, 1 hook.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/aneja5/forge-skills/api-design.svg)](https://agentmods.dev/skills/aneja5/forge-skills/api-design)
Your own site
<a href="https://agentmods.dev/skills/aneja5/forge-skills/api-design"><img src="https://agentmods.dev/badge/skills/aneja5/forge-skills/api-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,209 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.00048 $0.02209
Opus 5 $0.00024 $0.01104
Sonnet 5 $0.00010 $0.00442
Haiku 4.5 $0.00005 $0.00221

Measured 4d ago against content hash a1923d72e9d7, 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 4d 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.

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.

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

How it starts

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

API Design

Overview

Define the project's API conventions before endpoints proliferate. Output is .forge/api-design.md — verbs and status codes, the error envelope schema, versioning + deprecation policy, pagination/filter contract, rate-limiting envelope, auth/authz envelope, idempotency rules for mutations, and the public-vs-internal API boundary. Consumed by architecture-and-contracts (per-module contracts inherit these), incremental-implementation (endpoints must conform), and code-review-and-quality (PR review checklist).

When to Use

  • A new service or new public endpoint is being designed
  • Two services need a stable interface and there's no project-wide envelope
  • Error shapes vary across endpoints and clients have to special-case each one
  • A breaking change is about to ship and there's no versioning policy
  • A list endpoint is being added and pagination shape is unclear
  • A mutation endpoint will be retried by clients and there's no idempotency story

When NOT to Use

  • A single trivial endpoint is being added to a service that already has documented conventions
  • Internal-only RPC inside one service (use module contracts via architecture-and-contracts)
  • GraphQL or gRPC — adapt the principles but the file should call out the protocol

Common Rationalizations

Thought Reality
"We'll version when we break something" By then clients are coupled to the unversioned shape. Versioning costs nothing on day one, costs a migration on day 200.
"Every endpoint is different, no need to standardize" Inconsistency is a bug, not flexibility. Every divergent error shape costs clients a special case.
"Just return 200 with an error field" Clients can't distinguish success from failure without parsing the body. Proxies and CDNs cache 200s aggressively.
"Internal APIs don't need contracts" Internal APIs become external APIs the moment a second team touches them. Two consumers = production interface.
"PATCH replaces the resource" RFC 7396 says PATCH merges. Clients that depend on merge semantics will break silently if you replace.
"Idempotency keys are only for payments" Network retries happen on every endpoint. Without idempotency, retries create duplicates everywhere.

Read the full file on GitHub · 144 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. 4d ago First seen · 144 lines · 48 tokens per session scan A a1923d72e9d7

Subscribe to this mod's changes

api-design is a skill published in the GitHub repository aneja5/forge-skills (3 stars, last pushed 3mo ago), licensed MIT. It adds 48 tokens to every session and 2,209 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

focus-problem

Deeply scope a problem before coding: parallel Explore agents map related files, similar implementations, and test patterns, producing a problem definition, boundaries, and minimal implementation plan. Use when planning a feature, investigating a bug, or entering an unfamiliar codebase area.

claude-world/director-mode-lite · 56 tokens

create-subagent

Generates single-purpose Claude Code sub-agents for use via the Task tool. Use when creating dedicated sub-agents, scaffolding agent definitions, or generating agents with diagnostics and permissions setup.

QBall-Inc/the-bulwark · 42 tokens

pipeline-templates

Pre-defined F# pipe workflows for multi-agent orchestration. Provides code review, fix validation, test audit, new feature, research & planning, and test execution pipelines. Triggered via PostToolUse hook after significant code changes.

QBall-Inc/the-bulwark · 0 tokens

subagent-output-templating

Template for structured sub-agent output including YAML log format, task completion reports (WHY/WHAT/TRADE-OFFS/RISKS), and summary constraints. Use when defining how sub-agents should report results.

QBall-Inc/the-bulwark · 50 tokens

create

Create a fresh NeatContext context from a user-defined behavioral profile and an existing local knowledge folder. Use only when the user explicitly invokes this skill or asks to create a new context rather than save the current conversation.

XTSoftwareLabs/neatcontext-plugins · 45 tokens

slice

Turn a feature into well-defined, independently shippable slices — whether it's an epic that needs breaking apart or a single story that needs sharpening into a job story.

thoughtbot/rails-consultant · 34 tokens