api-and-interface-design

api-and-interface-design is a skill for Claude Code from charlieviettq/awesome-agent-skill. It costs 40 tokens per session (459 once invoked), scanned A, original, MIT.

A guide to designing clear boundaries and rules for web APIs, GraphQL services, command-line interfaces, and reusable modules.

In plain words
What is it for?
Use it when defining request and response formats, errors, versioning, pagination, filtering, and safe retries.
Why use it?
It helps prevent confusing errors, inconsistent requests, pagination problems, and breaking changes as an interface is used by more clients or teams.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it when defining request and response formats, errors, versioning, pagination, filtering, and safe retries.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/charlieviettq/awesome-agent-skill/api-and-interface-design/github.svg)](https://agentmods.dev/skills/charlieviettq/awesome-agent-skill/api-and-interface-design)
Your own site
<a href="https://agentmods.dev/skills/charlieviettq/awesome-agent-skill/api-and-interface-design"><img src="https://agentmods.dev/badge/skills/charlieviettq/awesome-agent-skill/api-and-interface-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-and-interface-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/charlieviettq/awesome-agent-skill/api-and-interface-design"><img src="https://agentmods.dev/badge/skills/charlieviettq/awesome-agent-skill/api-and-interface-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 459 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.00040 $0.00459
Opus 5 $0.00020 $0.00230
Sonnet 5 $0.00008 $0.00092
Haiku 4.5 $0.00004 $0.00046

Measured 9d ago against content hash abb436116cfa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 9d 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-and-interface-design/SKILL.md · 66 lines

What it actually says

API and Interface Design

Contract-first design for HTTP APIs, GraphQL, CLI surfaces, and library module boundaries. Complements secure-api-design (security) and agent-tool-contracts (LLM tools) with general interface ergonomics and evolution rules.

When to use

  • New public or cross-team API
  • Breaking-change review
  • Designing pagination, filtering, idempotency, or error shapes

When not to use

  • Internal refactor with no boundary change
  • Security-only audit (use secure-api-design)
  • Agent tool schema only (use agent-tool-contracts)

Design checklist

Contract

  • Resource naming consistent (nouns, plural collections)
  • Versioning strategy documented (URL prefix, header, or additive-only)
  • Request/response schemas with examples for happy path + common errors
  • Idempotency keys for mutating operations where retries matter

Errors

  • Stable machine-readable codes separate from human messages
  • HTTP/status mapping documented; no stack traces in client responses
  • Validation errors: field-level detail when safe (no PII leakage)

Pagination and lists

  • Cursor-based preferred for large/live datasets; offset only when bounded
  • Default and max page size documented
  • Sort/filter params explicit; reject unknown params predictably

Compatibility

  • Additive changes only in minor versions
  • Deprecation headers or sunset dates for removals
  • Consumer migration notes in changelog

Observability

  • Correlation/request IDs in responses or logs
  • Rate-limit headers where applicable

Workflow

  1. Draft resource model and primary use cases
  2. Write example requests/responses (including errors)
  3. Run doubt-driven-review or secure-api-design for high-risk surfaces
  4. Implement with tests locked to contract examples

Output

  • Short design note or OpenAPI/GraphQL schema sketch
  • Compatibility and deprecation table if evolving an existing API
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. 9d ago First seen · 66 lines · 40 tokens per session scan A abb436116cfa

Subscribe to this mod's changes

api-and-interface-design is a skill published in the GitHub repository charlieviettq/awesome-agent-skill (25 stars, last pushed 1mo ago), licensed MIT. It adds 40 tokens to every session and 459 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-09-03.

Related

Other skills, from other repositories

api-tester

A tool for creating and checking API tests from the real API contract and implementation. An API is the agreed way that software sends requests and receives responses.

laolaoshiren/claude-code-skills-zh · 86 tokens

ash-framework

Ash Framework — resources, actions, policies, aggregates, calculations, AshPhoenix.Form, LiveView, migrations. Use when generating resources via mix ash.codegen, editing changes, checks, types, validations, or domain code interfaces.

oliver-kriska/claude-elixir-phoenix · 48 tokens

deploy

Elixir/Phoenix deployment patterns — Dockerfile, fly.toml, runtime.exs, mix release, rel/ overlays. Use when configuring Fly.io, Docker, CI/CD, health checks, or production migrations.

oliver-kriska/claude-elixir-phoenix · 46 tokens

liveview-patterns

Build LiveView: async data (assignasync), PubSub (check connected?), phx-change events, form components/modals/uploads, streams for lists, livepatch. Use when handling interactions, debugging events, or tracking Presence.

oliver-kriska/claude-elixir-phoenix · 51 tokens

tidewave-integration

Tidewave MCP runtime tools — debugging, smoke testing, live state inspection, SQL queries, hex docs. Use when evaluating code in a running Phoenix app.

oliver-kriska/claude-elixir-phoenix · 38 tokens

oban

Oban job processing — workers, perform/1 (OSS) and process/1 (Pro), queues, cron, retries, unique jobs, idempotency, Oban Pro (Workflow, Batch, Chunk, Smart Engine), Testing. Use when writing Oban workers, queue config, or debugging jobs.

oliver-kriska/claude-elixir-phoenix · 64 tokens