api-design

api-design is a skill for Claude Code, Codex from open-gsd/gsd-pi. It costs 91 tokens per session (2,068 once invoked), scanned A, original, MIT.

A guide for designing or reviewing HTTP, REST, or GraphQL APIs—the interfaces through which applications exchange data.

In plain words
What is it for?
Use it to shape endpoints and schemas, choose versioning and authentication, define pagination and error responses, handle retries safely, set status and cache headers, and review breaking changes.
Why use it?
It helps keep APIs understandable and compatible as clients, mobile apps, or outside integrations continue using older versions while the server changes.

Skill for Claude CodeCodex

About the project

GSD Pi is a command-line coding agent and project workflow system that plans, implements, verifies, and tracks software work through milestones, tasks, Git worktrees, and stored project notes. It is for developers who want structured, longer-running agent sessions using different model providers. The catalogue entries extend GSD Pi with skills and agents.

open-gsd/gsd-pi · 1,196 stars · on GitHub

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/open-gsd/gsd-pi/api-design.svg)](https://agentmods.dev/skills/open-gsd/gsd-pi/api-design)
Your own site
<a href="https://agentmods.dev/skills/open-gsd/gsd-pi/api-design"><img src="https://agentmods.dev/badge/skills/open-gsd/gsd-pi/api-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,068 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.00091 $0.02068
Opus 5 $0.00046 $0.01034
Sonnet 5 $0.00018 $0.00414
Haiku 4.5 $0.00009 $0.00207

Measured 5d ago against content hash 8915bda09a99, 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 5d 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.

src/resources/skills/api-design/SKILL.md · 191 lines

How it starts

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

Invocation points:

  • Adding a new public API endpoint
  • Redesigning an internal API boundary between services
  • Code review of a PR that introduces HTTP handlers
  • A slice whose acceptance criteria include "the API works"
  • A GraphQL schema change

<core_principle> CALLERS OUTLIVE YOUR ASSUMPTIONS. An API you ship today has to keep working when your internals change, when the mobile app version two is still in use, and when a third party integrates against it. Design for extension, not just for the current caller.

HONEST STATUS CODES. 200 OK with {"error": "not found"} is a lie. 404 says not found. Use the HTTP semantics the protocol offers — HTTP clients, caches, and intermediaries rely on them.

PAGINATION IS NON-OPTIONAL. Any list endpoint that doesn't paginate will eventually get a request for "all records" that kills your database. </core_principle>

Step 1: Gather the contract

Answer, or ask (one round, 1–3 questions):

  1. Who are the callers? Internal service / mobile app / public third-party / same-repo frontend.
  2. What's the versioning stance? None / URL-path (/v1/) / header-based / GraphQL schema evolution.
  3. Auth model? Public / API key / OAuth / session cookie / mTLS / none-but-internal-only.
  4. Idempotency expectation? Is a retry safe? Required?
  5. Consistency model? Read-your-writes, eventual, serializable?

Read the full file on GitHub · 191 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. 5d ago First seen · 191 lines · 91 tokens per session scan A 8915bda09a99

Subscribe to this mod's changes

api-design is a skill published in the GitHub repository open-gsd/gsd-pi (1,196 stars, last pushed yesterday), licensed MIT. It adds 91 tokens to every session and 2,068 once invoked, about $0.0005 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-30.