Api Design logo

Api Design

Community
d-padmanabhan
api-design

Designs and reviews production APIs across REST/HTTP, OpenAPI, GraphQL, gRPC, webhooks, asynchronous operations, batch endpoints, SSE, and WebSockets. Use when defining resources, routes, methods, status codes, problem details, pagination, idempotency, conditional writes, API schemas, compatibility, deprecation, authentication, authorization, rate limits, or protocol contracts.

Overview

Publisherd-padmanabhan
Repositoryagent-engineering-handbook
Skill nameapi-design
Stars
20
Forks
3
Bundled files
5
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.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by d-padmanabhan 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/d-padmanabhan/agent-engineering-handbook/tree/main/skills/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/d-padmanabhan/agent-engineering-handbook.git /tmp/agent-engineering-handbook
mkdir -p .claude/skills
cp -r /tmp/agent-engineering-handbook/skills/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.

API Design

Mandatory API gates are owned by the API rule (${HANDBOOK_ROOT}/rules/320-api-design.mdc). This skill owns design workflow, trade-offs, examples, and protocol-specific guidance.

Non-Negotiables

  • Design from consumers, business invariants, trust boundaries, and failure behavior before choosing endpoint shapes.
  • Let resource identifiers name nouns and protocol operations express behavior. Model a business action as a subordinate resource when that produces a clear lifecycle.
  • Follow HTTP safety, idempotency, cache, conditional-request, and status-code semantics. Idempotence means the intended server effect is stable, not that every response is byte-identical.
  • Authenticate the principal and authorize every protected object, tenant, relationship, field, and action on the server.
  • Validate and bound every path, query, header, cookie, message, and body input. Serialize responses from allowlisted schemas rather than persistence objects.
  • Use RFC 9457 Problem Details for new public HTTP error contracts unless an existing compatibility commitment requires another documented shape.
  • Make retryable mutations safe with a stable operation identity, atomic state, and reconciliation. Never imply that transport delivery proves exactly-once business processing.
  • Protect mutable resources from lost updates when concurrency matters.
  • Treat the API description as a versioned contract. Detect breaking changes, provide migration evidence, and deprecate deliberately.
  • Bound payloads, pagination, batches, queries, streams, execution time, concurrency, retries, queues, and per-principal cost.
  • Keep secrets, credentials, raw payloads, and unnecessary personal data out of errors and telemetry.

Design Workflow

1. Define Consumers and Guarantees

Document:

  • consumers, trust levels, environments, and ownership;
  • critical operations and business invariants;
  • latency, availability, durability, freshness, and consistency needs;
  • authentication mechanism and authorization policy inputs;
  • expected load, object size, request size, page size, concurrency, and growth;
  • retry, duplicate, ordering, and partial-failure behavior;
  • compatibility window, support policy, and deprecation owner.

Do not start by listing endpoints.

2. Select the Interface Style

Choose the smallest interface that fits:

  • REST/HTTP for resource-oriented public or broadly interoperable APIs;
  • GraphQL for consumer-selected graphs when demand control and field authorization are enforceable;
  • gRPC for typed service-to-service contracts, streaming, and generated clients where HTTP/2 and Protobuf are operationally supported;
  • webhook delivery for provider-initiated notifications;
  • SSE for server-to-client event streams over HTTP;
  • WebSockets for bounded bidirectional sessions;
  • asynchronous operation resources for long-running work;
  • batch endpoints only when network savings justify their authorization, isolation, and partial-result complexity.

Use the networking transport skill (${HANDBOOK_ROOT}/skills/networking-transport/SKILL.md) for transport and wire format selection.

3. Model Resources and Operations

For REST/HTTP:

  • use stable, lowercase collection nouns and one multiword convention;
  • use opaque identifiers and avoid exposing storage topology;
  • nest only for true containment or scope;
  • use query parameters for filtering, sorting, pagination, field selection, and other optional refinement;
  • never place state-changing behavior behind GET, HEAD, or a query action such as ?action=delete;
  • use an explicit command endpoint only when no honest resource lifecycle fits, then document its authorization, idempotency, result, and failure semantics.

Examples of resource-modeled actions include an order cancellation resource, an export job, or a password-reset request.

4. Define the Contract

Specify:

  • method or operation semantics;
  • request media type, schema, requiredness, defaults, unknown-field policy, and size limit;
  • success status, headers, body schema, and empty-body behavior;
  • RFC 9457 problem types, safe details, field pointers, and retryability;
  • JSON naming, timestamp, identifier, decimal, money, unit, enum, null, and absent-value conventions;
  • filtering operators, sort grammar, deterministic tie-break order, duplicate parameter behavior, and maximum page size;
  • cache scope, validators, conditional reads, and conditional writes;
  • asynchronous status, polling, cancellation, result, failure, expiry, and retention behavior.

Use the REST and HTTP contracts reference (${HANDBOOK_ROOT}/skills/api-design/references/rest-http-contracts.md).

5. Design Security and Failure Behavior

Define authentication separately from authorization. Apply bounded schemas before policy or business logic, and apply output filtering after authorization.

For mutations and remote dependencies, define:

  • idempotency key ownership, request fingerprint, atomic persistence, replayed response, conflict behavior, and retention;
  • optimistic concurrency and stale-write response;
  • one end-to-end deadline, attempt timeouts, retry owner, transient failure classes, backoff, jitter, and retry budget;
  • rate-limit principal, quota unit, window, response headers, and overload behavior;
  • outbound destination and redirect policy;
  • webhook signature, timestamp, replay, durable handoff, and redelivery policy;
  • redacted audit, logs, metrics, and traces.

Use the security and resilience reference (${HANDBOOK_ROOT}/skills/api-design/references/security-resilience.md), the service resilience skill (${HANDBOOK_ROOT}/skills/service-resilience/SKILL.md), and the distributed transactions skill (${HANDBOOK_ROOT}/skills/distributed-transactions/SKILL.md).

6. Define Evolution

Choose the newest OpenAPI version supported by the repository's validated toolchain. Do not copy a version number from a handbook example without checking generator, validator, gateway, and documentation compatibility.

Classify changes across request schemas, response schemas, requiredness, defaults, enums, error types, status codes, ordering, pagination, authorization, and observable behavior. Additive syntax can still be behaviorally breaking.

Use the evolution and OpenAPI reference (${HANDBOOK_ROOT}/skills/api-design/references/evolution-openapi.md).

7. Apply Protocol-Specific Controls

GraphQL, gRPC, webhooks, SSE, WebSockets, and batch APIs retain the same identity, authorization, validation, resource, compatibility, and observability requirements. Add protocol-specific demand, flow-control, deadline, schema, and connection-lifecycle controls.

Use the GraphQL, gRPC, and streaming reference (${HANDBOOK_ROOT}/skills/api-design/references/graphql-grpc-streaming.md).

8. Verify the Contract

Run applicable:

  • schema lint and validation;
  • request and response conformance tests;
  • authorization tests for object, tenant, relationship, action, and field boundaries;
  • negative tests for unknown, malformed, oversized, duplicate, stale, replayed, and out-of-order inputs;
  • OpenAPI or Protobuf breaking-change checks;
  • consumer contract and generated-client tests;
  • retry, timeout, idempotency, concurrency, and partial-failure tests;
  • load, abuse, rate-limit, streaming, and backpressure tests;
  • documentation examples against the production contract.

Review Output

For a design or review, report:

  1. consumers, invariants, and trust boundaries;
  2. interface style and resource or operation model;
  3. request, response, error, pagination, and async contracts;
  4. authentication, authorization, validation, and abuse controls;
  5. idempotency, concurrency, retry, and partial-failure behavior;
  6. compatibility, versioning, and deprecation plan;
  7. verification, observability, and unresolved risks.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Api Design AI skill do?

Designs and reviews production APIs across REST/HTTP, OpenAPI, GraphQL, gRPC, webhooks, asynchronous operations, batch endpoints, SSE, and WebSockets. Use when defining resources, routes, methods, status codes, problem details, pagination, idempotency, conditional writes, API schemas, compatibility, deprecation, authentication, authorization, rate limits, or protocol contracts.

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/d-padmanabhan/agent-engineering-handbook/tree/main/skills/api-design. TypingMind reads its SKILL.md and bundles its files 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 d-padmanabhan 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 👇