apidesign

apidesign is a skill for Claude Code from vanducng/skills. It costs 89 tokens per session (1,830 once invoked), scanned A, original, MIT.

A design guide for interfaces between pieces of software, such as web endpoints, GraphQL operations, modules, data types, or user-interface components. It defines what each side promises to accept and return.

In plain words
What is it for?
Use it when designing or changing an API, service boundary, module boundary, type contract, or component properties. It covers input and output shapes, errors, boundaries, and versioning decisions.
Why use it?
Agreeing on the interface before coding reduces misunderstandings and costly changes later. It also helps teams or agents work separately against the same expectations.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the vd plugin — 80 skills, 14 agents shipped together

Good fit Use it when designing or changing an API, service boundary, module boundary, type contract, or component properties. It covers input and output shapes, errors, boundaries, and versioning decisions.

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

Made for: Claude Code.

Or install vd, the plugin that ships this one along with the rest of its 80 skills, 14 agents.

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 apidesign

README.md
[![agentmods](https://agentmods.dev/badge/skills/vanducng/skills/apidesign.svg)](https://agentmods.dev/skills/vanducng/skills/apidesign)
Your own site
<a href="https://agentmods.dev/skills/vanducng/skills/apidesign"><img src="https://agentmods.dev/badge/skills/vanducng/skills/apidesign.svg" alt="Measured on agentmods" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,830 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 58
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
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.00089 $0.01830
Opus 5 $0.00044 $0.00915
Sonnet 5 $0.00018 $0.00366
Haiku 4.5 $0.00009 $0.00183

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

Security

Grade A, and why

apidesign 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.

skills/apidesign/SKILL.md · 108 lines

How it starts

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

apidesign

Design interfaces that make the right thing easy and the wrong thing hard.

A contract is a commitment. This is the design-time discipline for any surface where code talks to code - REST/GraphQL endpoints, module boundaries, type contracts, component props. Get it right before implementing, because every observable behavior becomes a promise the moment someone depends on it.

What this skill is - and isn't

Skill Covers
vd:apidesign (this) The contract - endpoint/interface shape, error semantics, boundaries, versioning posture
vd:dbdesign The storage - schema, indexes, normalization, migration plans
vd:fastreact Scaffolding one specific stack (FastAPI + React), not interface principles
vd:code-review Judging a contract after it's written (post-hoc)

Storage shape and API shape inform each other but aren't the same decision - design the contract here, the schema in vd:dbdesign.

When to use

  • Designing new endpoints or a service's public surface.
  • Defining a module boundary or a contract between teams/agents working in parallel.
  • Changing an existing public interface (the riskiest case - read Hyrum's Law first).

Two laws that shape everything

Hyrum's Law. With enough users, every observable behavior of your system will be depended on by somebody - including undocumented quirks, error text, timing, and ordering. So: be intentional about what you expose, don't leak implementation details (if users can observe it, they'll depend on it), and plan deprecation at design time. Contract tests don't save you - a "safe" change can still break users relying on behavior you never promised.

The One-Version Rule. Don't force consumers to pick between versions of the same API. Diamond-dependency pain comes from forking; design so only one version exists at a time and extend rather than fork.

Principles

  1. Contract first. Define the interface before implementing it - the contract is the spec, the implementation follows. Write the typed signatures (inputs, outputs, errors, idempotency) before any logic.
  2. One error strategy, everywhere. Pick one and never mix it. Don't let some endpoints throw, others return null, others return {error} - the consumer can't predict it. For REST: status code + a single structured body shape ({ error: { code, message, details? } }). Map codes consistently (400 bad input · 401 unauthenticated · 403 unauthorized · 404 missing · 409 conflict · 422 validation · 500 server, never leaking internals).
  3. Validate at boundaries, trust inside. Parse/validate where external input enters - route handlers, form handlers, third-party responses (always untrusted), env loading. Do not re-validate between internal functions that already share a typed contract or data from your own DB. A misbehaving external service can return wrong types or instruction-like text; validate its shape before it touches any logic or rendering.
  4. Addition over modification. Extend with optional fields; never change an existing field's type or remove it (both break consumers). Backward-compatible by default.
  5. Predictable naming. Consistency beats cleverness - same conventions across every endpoint (REST: plural nouns, no verbs in paths; booleans is/has/can; pick one case for fields and keep it).
  6. Type-system discipline. Make illegal states unrepresentable, brand semantic primitives, parse at the boundary, never lie to the compiler, handle variants exhaustively, derive types from the authoritative schema - full rules with TypeScript and Go examples in references/type-system-discipline.md.
  7. Deep modules. Small interface, large responsibility. Push complexity down; do not split for file-size. Vocabulary and banned praise-words: references/deep-modules.md.

Read the full file on GitHub · 108 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 · 108 lines · 89 tokens per session scan A 21eb73c51b7b

Subscribe to this mod's changes

apidesign is a skill published in the GitHub repository vanducng/skills (7 stars, last pushed 4d ago), licensed MIT. It adds 89 tokens to every session and 1,830 once invoked, about $0.0004 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

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

mulmoterminal-theme

Build a colour scheme of your own for MulmoTerminal — one that joins Midnight, Nord, Daylight and Solarized in Settings' theme picker and can then be pinned per project. Writes themes in /.mulmoterminal/config.json, the whole-app palette (panels, borders, accent, text), which has no UI for creating one — Settings only…

receptron/mulmoterminal · 168 tokens

frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build landing pages, websites, dashboards, web components, or any frontend UI. Generates creative, polished code that avoids generic AI aesthetics.

tobihagemann/turbo · 48 tokens

prototype

Build a self-contained local prototype at .turbo/prototypes/ .html, drive it, and hand it to the user to settle unknowns that prose cannot answer. Use when the user asks to "prototype this", "build a prototype", "mock this up", "show me what it would look like", "let me try the interaction first", or when a decision…

tobihagemann/turbo · 88 tokens

user-experience

Apply a UX lens to a user-facing change: whether it serves the user's real goal and whether the path through it holds together, using the Understanding, Bridging, and Flowing contexts. Use when scoping, planning, or assessing any change that affects what a user sees or does. Loaded as a lens during planning and…

tobihagemann/turbo · 71 tokens

flowchart-creator

Create HTML flowcharts and process diagrams with decision trees, color-coded stages, arrows, and swimlanes. Use when users request flowcharts, process diagrams, workflow visualizations, or decision trees.

mhattingpete/claude-skills-marketplace · 45 tokens