api-design

api-design is a skill for Claude Code 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 Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the forge-skills plugin — 42 skills, 36 commands, 1 hook shipped together

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

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aneja5/forge-skills/api-design
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 aneja5/forge-skills --skill api-design
Clone the repo
git clone --depth 1 https://github.com/aneja5/forge-skills

Made for: Claude Code.

Or install forge-skills, the plugin that ships this one along with the rest of its 42 skills, 36 commands, 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/github.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/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

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. 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.00048 $0.02209
Opus 5.5 $0.00019 $0.00884
Sonnet 5.5 $0.00010 $0.00442
Haiku 4.5 $0.00005 $0.00221

Measured 1mo ago against content hash a1923d72e9d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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.

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. 1mo 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 5mo ago), licensed MIT. It adds 48 tokens to every session and 2,209 once invoked, about $0.0002 per session on Opus 5.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

add-server-logic

Creates, edits, and manages Power Pages Server Logic files — server-side JavaScript that runs securely on the Power Pages runtime. Orchestrates the full lifecycle: gathering requirements, fetching documentation, implementing code, configuring site settings, and deploying. Use when the user wants to add server-side…

microsoft/power-platform-skills · 83 tokens

integrate-webapi

Integrates Power Pages Web API into a site's frontend code with proper permissions and deployment. Orchestrates the full integration lifecycle: code integration, table permissions setup, and deployment for Dataverse CRUD operations. Also supports PAC-downloaded non-SPA sites by preferring native Forms, Lists, and…

microsoft/power-platform-skills · 105 tokens

add-cloud-flow

Integrates Power Automate cloud flows into a Power Pages site. Lists available flows, suggests relevant ones based on intent, identifies scenarios and web roles, creates metadata files, and generates client-side code to call flows. Handles both new flow registration and adding already-registered flows to additional…

microsoft/power-platform-skills · 91 tokens

integrate-backend

Analyzes the user's business problem and recommends the right backend integration approach — Web API, AI Web API (generative summaries / grounded search), Server Logic, Cloud Flows, or a combination — for a Power Pages site, then routes to the appropriate specialized skill. Use when the user wants to add backend…

microsoft/power-platform-skills · 86 tokens

generate-codeful-mcp-tool

Generate a self-contained JavaScript server runtime and registration metadata for an MCP codeful tool. Use when the user asks to create a codeful MCP tool, generate server logic for an MCP tool, write a runTool function, build a Dataverse-backed MCP tool, or pair MCP server logic with an MCP App widget.

microsoft/power-platform-skills · 71 tokens

add-connector

Adds any Power Platform connector to a Power Apps code app. Generic fallback for connectors not covered by a specific skill.

microsoft/power-platform-skills · 27 tokens