api-design

api-design is a skill for Claude Code, Codex from atuljha23/holocron. It costs 36 tokens per session (729 once invoked), scanned A, original, MIT.

A guide for designing REST and GraphQL APIs, including URL structure, status codes, error responses, pagination, versioning, and safe retries. REST and GraphQL are two common ways for applications to expose data and actions to other software.

In plain words
What is it for?
Use it when adding, changing, or reviewing API endpoints, resource models, pagination, errors, versions, or idempotency.
Why use it?
It helps keep endpoints predictable for clients and consistent across a project. It also reduces ambiguity around errors, large result sets, and repeated requests.

Skill for Claude CodeCodex

Part of the holocron plugin — 11 skills, 24 commands, 14 agents, 6 hooks 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/atuljha23/holocron/api-design
Any agent
npx skills add atuljha23/holocron --skill api-design
Clone the repo
git clone --depth 1 https://github.com/atuljha23/holocron

Made for: Claude Code, Codex.

Or install holocron, the plugin that ships this one along with the rest of its 11 skills, 24 commands, 14 agents, 6 hooks.

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/atuljha23/holocron/api-design.svg)](https://agentmods.dev/skills/atuljha23/holocron/api-design)
Your own site
<a href="https://agentmods.dev/skills/atuljha23/holocron/api-design"><img src="https://agentmods.dev/badge/skills/atuljha23/holocron/api-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 729 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.00036 $0.00729
Opus 5 $0.00018 $0.00365
Sonnet 5 $0.00007 $0.00146
Haiku 4.5 $0.00004 $0.00073

Measured 4d ago against content hash 417a4280fc83, 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 · 92 lines

How it starts

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

API design

REST

Resource, not action

URLs name nouns. Actions are verbs.

Good: POST /users/:id/password-reset Bad: POST /resetUserPassword?id=123

Status codes mean things

  • 200 success with body
  • 201 created (include Location)
  • 204 success, no body
  • 400 client sent something invalid (bad syntax, bad shape)
  • 401 not authenticated
  • 403 authenticated but not authorized
  • 404 resource doesn't exist (or the caller isn't allowed to know it does)
  • 409 conflict (version conflict, duplicate, precondition failed)
  • 422 semantic validation failed (body parses but rules reject)
  • 429 rate limited
  • 5xx server fault — internal detail logged, opaque to caller

Error envelope

Pick one. Use it everywhere.

{
  "error": {
    "code": "resource_not_found",
    "message": "User [email protected] not found.",
    "requestId": "abc123"
  }
}
  • code is machine-readable, stable, lowercase_snake.
  • message is human-readable. Safe to surface.
  • requestId lets the caller tell you what went wrong without you reading prod logs.

Pagination

Cursor-based for anything you'll scale. Offset paging breaks under concurrent writes.

GET /messages?cursor=abc&limit=50
→ { items: [...], nextCursor: "xyz" }

Idempotency

Any POST that has side-effects and will be retried needs an idempotency key:

POST /payments
Idempotency-Key: <uuid-v4>

Server stores the (key → response) for a reasonable TTL. Retries return the cached response, not a second charge.

Versioning

Prefer additive changes. Add fields; don't remove or rename. When you must break, version:

  • URL (/v2/...) — simple, explicit, slightly ugly
  • Accept header (Accept: application/vnd.foo.v2+json) — prettier URLs, slightly opaque

Pick one per service. Never mix.

GraphQL

Nullability is a contract

String! says "this WILL be present". If you're not sure, it's String (nullable). A lie here cascades.

Relay-style pagination

Connections, edges, pageInfo, cursors. Don't invent your own.

Read the full file on GitHub · 92 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 · 92 lines · 36 tokens per session scan A 417a4280fc83

Subscribe to this mod's changes

api-design is a skill published in the GitHub repository atuljha23/holocron (2 stars, last pushed 4mo ago), licensed MIT. It adds 36 tokens to every session and 729 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

batch-orchestration

Decompose large-scale changes into independent units and spawn parallel agents in isolated worktrees. Use for migrations, refactors, codemods, and any change touching 10+ files with the same pattern.

rohitg00/pro-workflow · 46 tokens

design-engineering

Apply interface craft when building or reviewing UI - motion, easing, timing, springs, component feel, and visual foundations. Use when building a component, animation, transition, hover or press state, modal, drawer, toast, or when polishing an interface so it feels right. Says "make this feel better", "add an…

rohitg00/pro-workflow · 82 tokens

skill-optimizer

SkillOpt-flavored offline training loop for any SKILL.md. Treats accumulated learn-rule corrections as training trajectories, proposes bounded patches via an optimizer LLM, gates each candidate against a held-out validation set built from the user's own past corrections, and ships only candidates that demonstrably…

rohitg00/pro-workflow · 124 tokens

skill-router

The index of every pro-workflow skill and command, grouped by job, with when to reach for each and whether it is human-run or auto-triggered. Use when you are not sure which skill fits, want the full map, or ask "what can this do", "which skill for X", "list the workflow".

rohitg00/pro-workflow · 69 tokens

sprint-status

Track parallel work sessions and prevent confusion across multiple Claude Code instances. Every major step ends with a status line. Every question re-states project, branch, and task.

rohitg00/pro-workflow · 38 tokens

survey-generator

Compile a structured literature survey on any AI/ML topic. Agent curates a research bundle (taxonomy + sections + bibliography of real papers) from a public anchor resource, then a chosen LLM generates the survey artifact. Output target is a wiki page (markdown), not a one-off HTML — survey lands in /derived/surveys/…

rohitg00/pro-workflow · 135 tokens