api-and-interface-design

api-and-interface-design is a skill for Claude Code, Codex from vanja-emichi/a0_agent_skills. It costs 49 tokens per session (2,332 once invoked), scanned A, a copy of api-and-interface-design, MIT.

Guidance for designing the boundaries through which software parts communicate, including REST or GraphQL APIs, modules, components, and database-backed contracts.

In plain words
What is it for?
Use it when creating or changing API endpoints, GraphQL schemas, module boundaries, component properties, or database structures that shape an API.
Why use it?
It helps prevent confusing or fragile interfaces and makes changes safer for the code and users that depend on them.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when creating or changing API endpoints, GraphQL schemas, module boundaries, component properties, or database structures that shape an API.

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

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-and-interface-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/vanja-emichi/a0_agent_skills/api-and-interface-design.svg)](https://agentmods.dev/skills/vanja-emichi/a0_agent_skills/api-and-interface-design)
Your own site
<a href="https://agentmods.dev/skills/vanja-emichi/a0_agent_skills/api-and-interface-design"><img src="https://agentmods.dev/badge/skills/vanja-emichi/a0_agent_skills/api-and-interface-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,332 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 80% copy Near-identical to another mod 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.00049 $0.02332
Opus 5 $0.00024 $0.01166
Sonnet 5 $0.00010 $0.00466
Haiku 4.5 $0.00005 $0.00233

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

Security

Grade A, and why

api-and-interface-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 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.

Origin

This is a copy

80% identical to api-and-interface-design — 137 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/api-and-interface-design/SKILL.md · 311 lines

How it starts

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

API and Interface Design

Overview

Design stable, well-documented interfaces that are hard to misuse. Good interfaces make the right thing easy and the wrong thing hard. This applies to REST APIs, GraphQL schemas, module boundaries, component props, and any surface where one piece of code talks to another.

When to Use

  • Designing new API endpoints
  • Defining module boundaries or contracts between teams
  • Creating component prop interfaces
  • Establishing database schema that informs API shape
  • Changing existing public interfaces

Core Principles

Hyrum's Law

With a sufficient number of users of an API, all observable behaviors of your system will be depended on by somebody, regardless of what you promise in the contract.

This means: every public behavior — including undocumented quirks, error message text, timing, and ordering — becomes a de facto contract once users depend on it. Design implications:

  • Be intentional about what you expose. Every observable behavior is a potential commitment.
  • Don't leak implementation details. If users can observe it, they will depend on it.
  • Plan for deprecation at design time. See deprecation-and-migration for how to safely remove things users depend on (load with skills_tool:load skill_name=deprecation-and-migration).
  • Tests are not enough. Even with perfect contract tests, Hyrum's Law means "safe" changes can break real users who depend on undocumented behavior.

The One-Version Rule

Avoid forcing consumers to choose between multiple versions of the same dependency or API. Design for a world where only one version exists at a time — extend rather than fork.

1. Contract First

Define the interface before implementing it. The contract is the spec — implementation follows.

// Define the contract first
interface TaskAPI {
  // Creates a task and returns the created task with server-generated fields
  createTask(input: CreateTaskInput): Promise<Task>;

  // Returns paginated tasks matching filters
  listTasks(params: ListTasksParams): Promise<PaginatedResult<Task>>;

  // Returns a single task or throws NotFoundError
  getTask(id: string): Promise<Task>;

  // Partial update — only provided fields change
  updateTask(id: string, input: UpdateTaskInput): Promise<Task>;

  // Idempotent delete — succeeds even if already deleted
  deleteTask(id: string): Promise<void>;
}

Read the full file on GitHub · 311 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. 8d ago First seen · 311 lines · 49 tokens per session scan A 56c497d38b1e

Subscribe to this mod's changes

api-and-interface-design is a skill published in the GitHub repository vanja-emichi/a0_agent_skills (5 stars, last pushed 1mo ago), licensed MIT. It adds 49 tokens to every session and 2,332 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 80% identical to api-and-interface-design, differing in 137 lines, and is treated as a copy.

Related

Other skills, from other repositories

api-design

API contract design for REST and GraphQL, covering resource shape, URL and header versioning with deprecation windows, RFC 9457 Problem Details error handling, and OpenAPI specs. Use when specifying the wire contract an endpoint exposes, choosing a versioning scheme, or standardizing error response bodies across…

yonatangross/orchestkit · 76 tokens

api-design

Use when settling the contract of an API you expose, before implementation: resources/URLs, REST vs GraphQL, versioning, one RFC 9457 error envelope, pagination, idempotency — emitted as OpenAPI 3.1. NOT implementing the endpoints (that is fastapi/nestjs/go/nodejs), NOT auth hardening (that is secure-coding), NOT…

ericrisco/rsc-harness · 105 tokens

api-design-expert

Expert-level API design principles, REST, GraphQL, versioning, and API best practices. Use when the user mentions REST, GraphQL, API versioning, or API security, or when the task involves API Design Principles, API Styles, or Documentation.

personamanagmentlayer/pcl · 57 tokens

api-designer

Designs production-grade APIs — REST, GraphQL, gRPC, and AsyncAPI patterns including pagination, versioning, error handling, rate limiting, and API governance. Use when the user asks to design APIs, create endpoints, build an API layer, write OpenAPI specs, or needs help with REST/GraphQL/gRPC service design.

buiphucminhtam/forgewright · 73 tokens

api-design-patterns

Comprehensive API design patterns covering REST, GraphQL, gRPC, versioning, authentication, and modern API best practices.

aAAaqwq/AGI-Super-Team · 29 tokens

api-connector-builder

Use when writing a client for someone else's REST or GraphQL API: auth flow choice and token refresh, pagination to exhaustion, retry-with-jitter on transient failures only, rate-limit-aware throttling. NOT inbound callbacks (that is webhooks), NOT chaining services (that is automation-flows), NOT designing your own…

ericrisco/rsc-harness · 80 tokens