api-and-interface-design

api-and-interface-design is a skill for Claude Code from borhen68/SkillEngine. It costs 49 tokens per session (2,550 once invoked), scanned A, a copy of api-and-interface-design, MIT.

A guide for designing stable contracts between pieces of software, such as web APIs, modules, components, and database-backed interfaces. An API is a defined way for one program or part of a program to communicate with another.

In plain words
What is it for?
Use it to design REST or GraphQL endpoints, define module and component boundaries, create type contracts, shape database interfaces, and change public interfaces safely.
Why use it?
It reduces breaking changes and unclear behavior for other code or teams that depend on an interface.

Skill for Claude Code

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

Part of the skillengine plugin — 28 skills, 9 commands, 5 agents, 1 hook shipped together

Good fit Use it to design REST or GraphQL endpoints, define module and component boundaries, create type contracts, shape database interfaces, and change public interfaces safely.

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

Made for: Claude Code.

Or install skillengine, the plugin that ships this one along with the rest of its 28 skills, 9 commands, 5 agents, 1 hook.

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/borhen68/skillengine/api-and-interface-design/github.svg)](https://agentmods.dev/skills/borhen68/skillengine/api-and-interface-design)
Your own site
<a href="https://agentmods.dev/skills/borhen68/skillengine/api-and-interface-design"><img src="https://agentmods.dev/badge/skills/borhen68/skillengine/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/borhen68/skillengine/api-and-interface-design"><img src="https://agentmods.dev/badge/skills/borhen68/skillengine/api-and-interface-design.svg" alt="Reviewed on agentmods" width="80" 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,550 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 83% 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.02550
Opus 5.5 $0.00020 $0.01020
Sonnet 5.5 $0.00010 $0.00510
Haiku 4.5 $0.00005 $0.00255

Measured 1mo ago against content hash 9ba8c8b8122f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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.

Origin

This is a copy

83% identical to api-and-interface-design — 110 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 · 322 lines

How it starts

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

API and Interface Design

Overview

Every API is a promise. Once published, it becomes a contract that other code depends on — and breaking that contract creates cascading failure across every consumer. The cost of a poorly designed API isn't just the initial implementation; it's the years of backwards-compatible maintenance, workarounds, and migration efforts that follow.

The interface contract: A good interface makes the right thing easy and the wrong thing impossible. It encodes assumptions explicitly, fails predictably, and evolves gracefully. This applies to REST APIs, GraphQL schemas, module boundaries, component props, function signatures, and any surface where one piece of code talks to another.

Real-world impact: Hyrum's Law states that with enough consumers, every observable behavior becomes a de facto contract. Design interfaces defensively from day one — it's infinitely cheaper than retrofitting constraints later.

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.
  • Tests are not enough. Even with perfect contract tests, Hyrum's Law means "safe" changes can break real users who depend on undocumented behavior.

Read the full file on GitHub · 322 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 · 322 lines · 49 tokens per session scan A 9ba8c8b8122f

Subscribe to this mod's changes

api-and-interface-design is a skill published in the GitHub repository borhen68/SkillEngine (17 stars, last pushed 4mo ago), licensed MIT. It adds 49 tokens to every session and 2,550 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 83% identical to api-and-interface-design, differing in 110 lines, and is treated as a copy.

Related

Other skills, from other repositories

api-and-interface-design

Guidance for designing stable, clearly documented interfaces between software parts, such as web APIs, GraphQL schemas, modules, and component properties. It covers defining the contract first, limiting accidental dependencies, and planning safe changes.

vinvcn/addyosmani-agent-skills-zh · 51 tokens

deprecation-and-migration

A guide for retiring old code, systems, or interfaces and moving users to replacements. Deprecation means marking something as no longer preferred; migration means switching its users safely.

vinvcn/addyosmani-agent-skills-zh · 77 tokens

api-and-interface-design

Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.

addyosmani/agent-skills · 49 tokens

api-design

Design stable, versioned, self-documenting APIs. Easy to use correctly, hard to use incorrectly. Apply Hyrum's Law from day one.

DevelopersGlobal/ai-agent-skills · 34 tokens

code-review-and-quality

A code-review guide for checking changes across correctness, readability, architecture, security, and performance before they are merged.

vinvcn/addyosmani-agent-skills-zh · 73 tokens

constraint-driven-development

A development method for writing a project's quality standards as a lasting, checkable contract. It can cover areas such as test coverage, security, performance, accessibility, and architecture.

vinvcn/addyosmani-agent-skills-zh · 232 tokens