api-design-principles

api-design-principles is a skill for Claude Code from thapaliyabikendra/ai-artifacts. It costs 38 tokens per session (2,377 once invoked), scanned A, original, Apache-2.0.

Guidance for designing REST APIs, which are web interfaces that let software work with resources such as patients or appointments. It covers naming, structure, versioning, evolution, and documentation.

In plain words
What is it for?
Designing new REST APIs, reviewing API specifications, setting team standards, planning versions, and writing developer documentation.
Why use it?
It helps teams create API contracts that are consistent and easier for other developers to understand and maintain.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Designing new REST APIs, reviewing API specifications, setting team standards, planning versions, and writing developer documentation.

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

Made for: Claude Code.

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-principles

README.md
[![agentmods](https://agentmods.dev/badge/skills/thapaliyabikendra/ai-artifacts/api-design-principles.svg)](https://agentmods.dev/skills/thapaliyabikendra/ai-artifacts/api-design-principles)
Your own site
<a href="https://agentmods.dev/skills/thapaliyabikendra/ai-artifacts/api-design-principles"><img src="https://agentmods.dev/badge/skills/thapaliyabikendra/ai-artifacts/api-design-principles.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,377 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.00038 $0.02377
Opus 5 $0.00019 $0.01189
Sonnet 5 $0.00008 $0.00475
Haiku 4.5 $0.00004 $0.00238

Measured 8d ago against content hash d8eb2c545254, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

api-design-principles 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 8d 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.

.claude/skills/api-design-principles/SKILL.md · 319 lines

How it starts

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

API Design Principles

Master REST API design principles to build intuitive, scalable, and maintainable APIs. This skill focuses on design theory - for implementation patterns, see abp-api-implementation or abp-service-patterns.

When to Use This Skill

  • Designing new REST API contracts
  • Reviewing API specifications before implementation
  • Establishing API design standards for your team
  • Planning API versioning and evolution strategy
  • Creating developer-friendly API documentation

Audience

  • Backend Architects - API contract design
  • Tech Leads - Standards and review
  • Business Analysts - Understanding API capabilities

For Implementation: Use abp-service-patterns for AppService code, api-response-patterns for response wrappers, fluentvalidation-patterns for validation.


Core Principles

1. Resource-Oriented Design

APIs expose resources (nouns), not actions (verbs).

Concept Good Bad
Resource naming /patients, /appointments /getPatients, /createAppointment
Actions via HTTP methods POST /patients POST /createPatient
Plural for collections /patients /patient
Consistent casing kebab-case or camelCase Mixed styles

Resource Hierarchy:

/api/v1/patients                    # Collection
/api/v1/patients/{id}               # Single resource
/api/v1/patients/{id}/appointments  # Nested collection
/api/v1/appointments/{id}           # Direct access to nested resource

Avoid Deep Nesting (max 2 levels):

# Good - Shallow
GET /api/v1/patients/{id}/appointments
GET /api/v1/appointments/{id}

# Bad - Too deep
GET /api/v1/clinics/{id}/doctors/{id}/patients/{id}/appointments/{id}

2. HTTP Methods Semantics

Method Purpose Idempotent Safe Request Body
GET Retrieve resource(s) Yes Yes No
POST Create resource No No Yes
PUT Replace entire resource Yes No Yes
PATCH Partial update Yes* No Yes
DELETE Remove resource Yes No No

Read the full file on GitHub · 319 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 319 lines · 38 tokens per session scan A d8eb2c545254

Subscribe to this mod's changes

api-design-principles is a skill published in the GitHub repository thapaliyabikendra/ai-artifacts (24 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 38 tokens to every session and 2,377 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-30.