api-design
Design public APIs and CLIs — naming, ergonomics, versioning, error surfaces, and backward-compat discipline.
Skill by xanstomper
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/xanstomper-api-design
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, design, backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/api-design
What's inside
- Skill name
api-design- Description
- Design public APIs and CLIs — naming, ergonomics, versioning, error surfaces, and backward-compat discipline. Use when adding a public command, SDK surface, REST/JSON contract, or plugin interface. Ported from Anthropic/OpenAI API-design practice.
- License
- MIT
- Instructions
- 38 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# API Design Procedure APIs are promises. Design for the version that ships in 2 years, not the demo next week. ## 1. Shape from the consumer's side first - Write the ideal consumer code BEFORE the implementation. If the call site reads awkwardly, redesign — the call site is the product. - Consistency with the sibling surface: a new CLI command follows the existing command grammar (`mochi <noun> <verb> --flag`), a new REST route follows the existing resource grammar. Surprise = defect. ## 2. Naming discipline - Nouns for resources, verbs for operations, plain English throughout. One concept = one word everywhere (`session`, never session/job/instance mixed). - Avoid abbreviations except universal ones (id, url). Avoid negated flags (`--no-cache` beats `--cache=false` which beats `--disable-caching`). - Reserved for the future: every list response gets `nextCursor` from day one, every object carries `id` and timestamps, even if unused. ## 3. Error surface - Errors are data: stable machine-readable code + human message + actionable hint. Never a bare string, never a stack trace. - 4xx = caller's problem (fixable by changing the request), 5xx = callee's problem (retryable or reportable). Timeouts are 5xx-shaped. - Every failure mode a consumer can hit is documented with an example response. ## 4. Versioning and compat - Additive changes only within a version: new optional fields, new endpoints. Removing/renaming = new major version, period. - Never repurpose an existing field's semantics — consumers have already built on it. Deprecate with a timeline: announce, warn in responses (`Sunset` header / CLI warning), then remove in the next major. - Unknown fields: consumers (and our parsers) must ignore unknown fields — forward compatibility is a two-way contract. ## 5. Ergonomics pass - Sensible defaults so the hello-world is one call. Required params: as few as possible, ordered by importance. - Idempotency on mutating operations (idempotency keys or natural keys) — retries are normal in production networks. - Dry-run/plan mode where an operation is expensive or destructive. ## 6. Verification - Contract tests capture the public surface (snapshot of routes/flags/errors) so breakage fails CI loudly. - A consumer walkthrough: integrate the API fresh, using only the docs. Every stumble is a doc bug or a design bug — log which. ## Pitfalls - Leaking internals into the public shape (`error: "ECONNRESET at /src/..."`) — translate at the boundary. - Boolean traps (`process(x, true)`), out-parameters, and 7-arg functions: wrap in an options object past 3 params. - Shipping v1 without the escape hatch (pagination, filters): retrofitting lists is a breaking change by default.
From xanstomper/mochi, MIT.
More from xanstomper/mochi
- 0.587score
accessibility-audit
xanstomper
Audit and fix accessibility (a11y) — WCAG 2.2 AA compliance, screen-reader flows, keyboard navigation, and ARIA correctness for web apps.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
api-backwards-compatibility
xanstomper
Change APIs without breaking existing clients — deprecation windows, additive changes, and safe removal.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
api-integration
xanstomper
Integrate third-party APIs correctly — auth patterns, retry/backoff, pagination, rate limits, idempotency, and contract testing.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
api-security-hardening
xanstomper
Secure web APIs and backends — authz enforcement, injection prevention, rate limiting, secret handling, and the OWASP-class checks that block real attacks.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
api-versioning
xanstomper
Evolve APIs without breaking clients — additive change first, deprecation windows, compatibility shims, and migration paths.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
async-concurrency
xanstomper
Design correct async and concurrent code — bounded parallelism, backpressure, cancellation, and deadlock avoidance.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
auth-implementations
xanstomper
Implement authentication correctly — session/JWT/OAuth/SSC flows, password handling, MFA, and the failure modes that become breaches.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
benchmark-methodology
xanstomper
Honest benchmarking with TTFF/TTFI/PSS probes — cold start, token throughput, prompt-to-first-token.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
browser-automation
xanstomper
Automate real browsers for testing and scraping — Playwright-first flows, selector strategy, waiting discipline, and anti-flake patterns.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
caching-strategy
xanstomper
Design caching layers — HTTP caching, CDN, application memory caches, invalidation patterns, and cache-coherence reasoning.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
chaos-engineering
xanstomper
Prove a system survives failure by injecting it deliberately — game days, fault injection, and steady-state hypotheses.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
checkpoint-semantics
xanstomper
Git-backed checkpoints and rollback composition — naming, nesting, conflicts, when to auto-commit.
SkillAFreshness: A★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 2
- Open issues
- 6
- Last commit (this folder)
- Oct 12, 2026 (16 days ago)
- Last release
- Oct 23, 2026 (5 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/xanstomper/mochi
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from xanstomper
- 0.587score
api-backwards-compatibility
xanstomper
Change APIs without breaking existing clients — deprecation windows, additive changes, and safe removal.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
api-integration
xanstomper
Integrate third-party APIs correctly — auth patterns, retry/backoff, pagination, rate limits, idempotency, and contract testing.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
api-security-hardening
xanstomper
Secure web APIs and backends — authz enforcement, injection prevention, rate limiting, secret handling, and the OWASP-class checks that block real attacks.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
api-versioning
xanstomper
Evolve APIs without breaking clients — additive change first, deprecation windows, compatibility shims, and migration paths.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
async-concurrency
xanstomper
Design correct async and concurrent code — bounded parallelism, backpressure, cancellation, and deadlock avoidance.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
accessibility-audit
xanstomper
Audit and fix accessibility (a11y) — WCAG 2.2 AA compliance, screen-reader flows, keyboard navigation, and ARIA correctness for web apps.
SkillAFreshness: A★ 1Claude Code +9
Cite this page
api-design skill. Agent Mart. https://agentmart.dev/skills/xanstomper-api-design (last updated 2026-10-24)