# Api And Interface Design

> Design APIs that are stable, ergonomic, and evolvable

- **Type:** Skill
- **Install:** `agentstack add skill-vignesh2027-ai-agent-skills-api-and-interface-design`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [vignesh2027](https://agentstack.voostack.com/s/vignesh2027)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [vignesh2027](https://github.com/vignesh2027)
- **Source:** https://github.com/vignesh2027/AI-AGENT-SKILLS/tree/main/skills/api-and-interface-design

## Install

```sh
agentstack add skill-vignesh2027-ai-agent-skills-api-and-interface-design
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

## Overview

APIs are promises. Once published, they are hard to break without breaking callers. This skill designs APIs that are easy to use correctly, hard to use incorrectly, and evolvable without breaking changes.

## When to Use

- Before designing a new API endpoint, SDK, or library interface
- Before publishing an API to external consumers
- When an existing API is causing confusion or misuse

## Process

### Step 1: Design the API for the caller, not the implementation
Your internal data model should not dictate your API shape. Design for the use case: what does the caller need to do? What information do they have? What do they want back?

### Step 2: Consistency over cleverness
Naming, parameter order, error formats, and response shapes should be consistent across the entire API. Consistency is worth more than local elegance.

### Step 3: Make the happy path obvious
A caller should be able to guess how to use the API without reading the documentation for the common cases. Reserve documentation for edge cases.

### Step 4: Make errors informative
Every error must tell the caller: what went wrong, which field caused it (for validation errors), what they can do to fix it. "Bad request" is not an error message.

### Step 5: Version from day one
Build versioning into the API from the first version: `/v1/users`, not `/users`. Retrofitting versioning is painful.

### Step 6: Design for evolution
- Additive changes are backward compatible (add fields, add endpoints)
- Destructive changes break callers (remove fields, rename fields, change types)
- Use deprecation periods before removing anything
- Make optional fields optional, not required

### Step 7: Define the contract
Document: authentication method, rate limits, request/response schema, error codes, pagination pattern, time formats, ID formats.

### Step 8: Respect Hyrum's Law
"With a sufficient number of users of an API, it does not matter what you promise in the contract: all observable behaviors of your system will be depended on by somebody." Design carefully; change carefully.

## Verification Requirements

- [ ] API designed from the caller's perspective (not the data model's)
- [ ] Naming and patterns are consistent with the rest of the API
- [ ] Errors include: what, which field, how to fix
- [ ] Versioning included
- [ ] Contract documented: schema, errors, rate limits
- [ ] Backward compatibility considered for every change

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [vignesh2027](https://github.com/vignesh2027)
- **Source:** [vignesh2027/AI-AGENT-SKILLS](https://github.com/vignesh2027/AI-AGENT-SKILLS)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-vignesh2027-ai-agent-skills-api-and-interface-design
- Seller: https://agentstack.voostack.com/s/vignesh2027
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
