# API design

> API design is an open-source agent skill for developer tools. Guides an agent through REST, GraphQL and gRPC API design and versioning. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/majiayu000/spellbook/tree/main/skills/api-design
- **Repository:** https://github.com/majiayu000/spellbook
- **GitHub stars:** 303
- **License:** MIT
- **Skill name:** api-design
- **Collection:** https://github.com/majiayu000/spellbook
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

This skill gives the agent a design playbook for HTTP and RPC interfaces. It covers contract-first work with OpenAPI 3.2, resource naming, method and status code choices, RFC 7807 problem responses, cursor pagination, URL versioning with sunset signalling, and idempotency keys for POST requests.

For GraphQL it adds schema principles such as domain-driven types, Relay-style connections, typed error unions, Federation entity keys and DataLoader batching to avoid N+1 queries. For gRPC it shows proto service layouts covering unary and streaming methods, streamed error embedding, deadlines and retry policies, plus rate limit headers and a closing checklist for design, features, documentation and operations.

The guidance is written as reference patterns and code snippets; the skill ships supporting reference documents and starter templates for OpenAPI, GraphQL and proto files. It runs no scripts and needs no particular language runtime beyond what the examples show.

## When your agent uses it

> REST/GraphQL/gRPC API design best practices. Use when designing APIs, defining contracts, handling versioning. Covers OpenAPI 3.2, GraphQL Federation, gRPC streaming.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/majiayu000/spellbook/tree/HEAD/skills/api-design)
- [License: MIT](https://github.com/majiayu000/spellbook/tree/HEAD/skills/api-design)

## Features

- **Contract-first REST design:** Covers resource naming, HTTP methods, status codes and OpenAPI 3.2 documentation.
- **Error and pagination conventions:** Explains RFC 7807 problem responses and cursor-based pagination patterns.
- **Versioning and idempotency:** Describes URL versioning with sunset headers and idempotency keys for POST.
- **GraphQL schema patterns:** Covers Federation keys, Relay connections, typed errors and DataLoader batching.
- **gRPC service patterns:** Shows streaming RPC layouts, deadlines, retry policies and error embedding.
- **Rate limiting and checklist:** Provides rate limit headers and a pre-release checklist for API operations.

## Good for

- Design a REST API for a new orders service
- Plan versioning for an existing public endpoint
- Model a GraphQL schema with federated entities
- Define a gRPC service with streaming methods
- Add cursor pagination and error responses to an API
- Review an API contract against a design checklist

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/api-design` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/majiayu000/spellbook.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/api-design &&
cp -R "$tmp/skills/api-design" ~/.claude/skills/api-design &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/api-design` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/api-design` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/majiayu000/spellbook.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/api-design &&
cp -R "$tmp/skills/api-design" ~/.agents/skills/api-design &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/api-design` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/api-design` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/majiayu000/spellbook.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/api-design &&
cp -R "$tmp/skills/api-design" ~/.cursor/skills/api-design &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/api-design` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/majiayu000/spellbook.git --path skills/api-design
```

Or copy the folder to `~/.gemini/skills/api-design` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/api-design`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/majiayu000/spellbook.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/api-design &&
cp -R "$tmp/skills/api-design" ~/.copilot/skills/api-design &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/api-design` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/majiayu000/spellbook.git
```

Then copy `spellbook/skills/api-design` into your agent's skills folder as `api-design`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does API design change in the agent's behaviour?

It gives the agent API design conventions for REST, GraphQL and gRPC to follow when designing interfaces, such as status codes, pagination, versioning and error formats.

### Does API design need any scripts or extra tools?

The skill runs no scripts and does not set allowed tools. It includes reference documents and starter templates for OpenAPI, GraphQL and proto files.

### Which API style should API design recommend?

Its selection table suggests REST for public APIs and MVPs, GraphQL for frontend-driven or mobile clients, and gRPC for internal microservices and streaming.

### How do I install API design in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/api-design to use it in all your projects, or to .claude/skills/api-design in one project.

### Does API design run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use API design?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to API design?

The closest alternatives to API design are API design, API design, API GraphQL GRPC, API design and API and interface design.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [API design](https://ai-powered.com/skills/api-design): API design is an open-source agent skill for developer tools.
- [API design](https://ai-powered.com/skills/api-design-fmarzochi): API design is an open-source agent skill for developer tools.
- [API GraphQL GRPC](https://ai-powered.com/skills/api-graphql-grpc): API GraphQL GRPC is an open-source agent skill for developer tools.
- [API design](https://ai-powered.com/skills/api-design-abdullayevtemurmalik): API design is an open-source agent skill for developer tools.
- [API and interface design](https://ai-powered.com/skills/api-and-interface-design-ajyadav013): API and interface design is an open-source agent skill for design and media.
- [API and interface design](https://ai-powered.com/skills/api-and-interface-design): API and interface design is an open-source agent skill for design and media.
- [API design edho ferdian](https://ai-powered.com/skills/api-design-edho-ferdian): API design edho ferdian is an open-source agent skill for developer tools.
- [API design](https://ai-powered.com/skills/api-design-nabwinsaud): API design is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/api-design-majiayu000
