api-design

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

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

Part of the holocron plugin — 11 skills, 24 commands, 14 agents, 6 hooks shipped together

Good fit Use it when adding, changing, or reviewing API endpoints, resource models, pagination, errors, versions, or idempotency.

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

Made for: Claude Code.

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/github.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/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/atuljha23/holocron/api-design"><img src="https://agentmods.dev/badge/skills/atuljha23/holocron/api-design.svg" alt="Reviewed on agentmods" width="80" 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. 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.00036 $0.00729
Opus 5.5 $0.00014 $0.00292
Sonnet 5.5 $0.00007 $0.00146
Haiku 4.5 $0.00004 $0.00073

Measured 1mo ago against content hash 417a4280fc83, 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 · 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. 1mo 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 6mo ago), licensed MIT. It adds 36 tokens to every session and 729 once invoked, about $0.0001 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

software-design

Software design principles, patterns, and architecture from SOLID through distributed systems. Covers the five SOLID principles with violations and fixes, DRY/KISS/YAGNI heuristics, separation of concerns, 12 GoF design patterns organized by intent (creational, structural, behavioral), architectural patterns (MVC…

Tibsfox/gsd-skill-creator · 119 tokens

distributed-consensus

Distributed consensus algorithms and logical time for cloud and multi-node systems. Covers Lamport clocks, vector clocks, FLP impossibility, Paxos (basic, multi, fast), Raft, Viewstamped Replication, Byzantine fault tolerance basics, quorum reads/writes (N/R/W), leader election, and TLA+ specification style. Use when…

Tibsfox/gsd-skill-creator · 101 tokens

network-fundamentals-cloud

Networking fundamentals as they apply to cloud infrastructure — virtual networks, subnets, routers, NAT, floating IPs, security groups, VLAN/VXLAN segmentation, load balancing, SDN concepts, and how Neutron-style cloud networks sit on top of physical topology. Covers TCP behavior at scale, congestion control, tail…

Tibsfox/gsd-skill-creator · 109 tokens

service-architecture

Service-oriented and microservices architecture patterns for cloud-scale systems. Covers service boundaries, API versioning and backward compatibility, eventual consistency at the API layer, idempotency keys, saga and choreography patterns, bulkheads, circuit breakers, service meshes, and the Vogels "you build it, you…

Tibsfox/gsd-skill-creator · 94 tokens

agent-operated-software

Use when designing, building, operating, or diagnosing an ongoing application whose live backend or control loop includes OpenRig agents, including applications with a Markdown, YAML, or JSON agent control plane or a thin surface over specialist agent roles.

mvschwarz/openrig · 51 tokens

behavioral-economics

Systematic departures from rational choice theory and their implications for economic analysis and policy. Covers cognitive heuristics (anchoring, availability, representativeness), biases (loss aversion, status quo, overconfidence), prospect theory (reference dependence, probability weighting, diminishing…

Tibsfox/gsd-skill-creator · 103 tokens