Api Design logo

Api Design

Community
qa-aman
api-design

Design clean and consistent APIs. Use when the user says "design an API", "API design review", "design these endpoints", "REST API for X", "GraphQL schema", "API contract", "how should this endpoint work", "review my API design", or wants to create or improve an API interface - even if they don't explicitly say "API design".

Overview

Publisherqa-aman
Repositoryclaude-skills
Skill nameapi-design
Stars
26
Forks
4
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by qa-aman on GitHub. Read the source before you install it.

Installation

Install the Api Design AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/qa-aman/claude-skills/tree/main/skills/by-role/engineer/api-design
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/qa-aman/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/skills/by-role/engineer/api-design .claude/skills/api-design
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Api Design in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Api Design on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Api Design is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Overview

Based on "A Philosophy of Software Design" by John Ousterhout. Ousterhout's key principle: modules should be deep - simple interface, powerful implementation. Applied to APIs: the surface area exposed to callers should be as small as possible, while the behavior provided should be as rich as possible. A leaky abstraction (where callers need to understand implementation details) is a design failure.

Workflow

Step 1: Define the API's job

Before designing any endpoint, state what the API enables:

  • What is the caller trying to accomplish?
  • What information does the caller have?
  • What should the API hide from the caller?

Ousterhout: if callers need to know how the API works internally to use it correctly, the API is leaky.

Step 2: Design resources (REST) or schema (GraphQL)

REST:

  • Resources are nouns, not verbs: /users, /orders not /getUsers, /createOrder
  • Use HTTP verbs for actions: GET (read), POST (create), PUT (replace), PATCH (update), DELETE (remove)
  • Nest for ownership: /users/{id}/orders (orders owned by a user)
  • Don't nest beyond 2 levels deep

GraphQL:

  • Types model your domain, not your database schema
  • Queries fetch data, mutations change it, subscriptions stream it
  • Design the schema from the client's perspective: what does the UI need?

Step 3: Design request and response contracts

For each endpoint:

Endpoint: [METHOD] /path/{param}
Purpose: [one sentence]
Auth: [required scope or token type]

Request:
  Path params: [required identifiers]
  Query params: [optional filters, pagination]
  Body: [JSON schema with required/optional fields]

Response (200):
  [JSON schema]

Errors:
  400 - [validation failure - which fields, why]
  401 - [unauthenticated]
  403 - [unauthorized - caller lacks permission]
  404 - [resource not found]
  409 - [conflict - e.g. duplicate]
  422 - [unprocessable entity - valid syntax, invalid semantics]
  500 - [internal error]

Step 4: Apply consistency rules

Pick conventions and apply them everywhere:

  • Naming: snake_case or camelCase for fields (pick one)
  • Dates: ISO 8601 (2026-03-03T14:30:00Z)
  • IDs: UUID or integer (pick one, apply everywhere)
  • Pagination: cursor-based or page/limit (pick one)
  • Errors: consistent error response shape { error: { code, message, details } }

Inconsistency is the top complaint from API consumers.

Step 5: Design for the caller's mental model

Ousterhout's information hiding principle: don't expose implementation artifacts.

  • Don't expose database table names or internal IDs in API paths
  • Don't return internal error codes that callers can't act on
  • Don't require callers to make multiple requests for data they logically need together

Step 6: Version the API

Every public API needs a versioning strategy before it ships:

  • URL versioning: /v1/users (most common, most visible)
  • Header versioning: API-Version: 2026-01-01
  • Pick a strategy before v1 ships - changing it later breaks all callers

Anti-Patterns

1. Verbs in resource paths Bad: POST /createUser, GET /getUserById Good: POST /users, GET /users/{id}

2. Inconsistent error shapes Bad: Some endpoints return { error: "message" }, others return { message: "error" }. Good: One error schema, applied everywhere.

3. Leaking implementation details Bad: /api/db/users_table/row/42 Good: /api/users/42

4. No versioning plan on day 1 Bad: Ship v1 with no versioning, then break callers when you need to change the contract. Good: Version from the first public release. Breaking changes require a new version.

Quality Checklist

  • Resources are nouns, HTTP verbs are the actions
  • Request and response contracts documented for every endpoint
  • All error codes documented with when each occurs
  • Naming convention consistent across all endpoints (snake_case or camelCase)
  • Dates in ISO 8601, IDs consistent type throughout
  • No implementation details exposed to callers
  • Versioning strategy defined before first public release
  • Pagination strategy defined and consistent

Frequently asked questions

What does the Api Design AI skill do?

Design clean and consistent APIs. Use when the user says "design an API", "API design review", "design these endpoints", "REST API for X", "GraphQL schema", "API contract", "how should this endpoint work", "review my API design", or wants to create or improve an API interface - even if they don't explicitly say "API design".

Why use Api Design on TypingMind?

Because you install it once and use it with any model. Api Design is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Api Design in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/qa-aman/claude-skills/tree/main/skills/by-role/engineer/api-design. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Api Design?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Api Design?

As many as you like. As long as a model supports skills, you can use Api Design with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Api Design AI skill free?

Yes. It is published on GitHub by qa-aman under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇