# API design

> API design is an open-source agent skill for developer tools. Gives agents conventions for designing HTTP/JSON endpoints, errors and pagination. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/Nabwinsaud/forgeline/tree/main/skills/api-design
- **Repository:** https://github.com/nabwinsaud/forgeline
- **GitHub stars:** 8
- **License:** MIT
- **Skill name:** api-design
- **Collection:** https://github.com/Nabwinsaud/forgeline
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill sets out a consistent set of rules for HTTP and JSON APIs: how resource paths and HTTP methods are chosen, which status codes to return, and a single error body shape with stable machine-readable codes. It also covers cursor-based pagination, filtering and sorting with allow-listed fields, idempotency keys for retried POSTs, and ETag or version checks for concurrent updates.

The guidance is meant to be applied after the agent looks at a couple of existing endpoints in the repository and matches their style. The rules serve as defaults only where the codebase has no established convention. The skill also gives a backward-compatibility split between additive changes and breaking ones, plus a checklist the agent can run through when adding a new endpoint or reviewing an API contract.

It is a set of written conventions with no scripts. It works with any HTTP/JSON backend and does not depend on a particular language or framework.

## When your agent uses it

> Conventions for HTTP/JSON APIs built by the factory - resource paths, methods, status codes, one error body shape, cursor pagination, filtering, idempotency keys, versioning, boundary validation and backward-compatibility rules. Use when adding or changing an endpoint, or reviewing an API contract in a spec or PR.

## What it can access

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

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

## Features

- **Resource path rules:** Guidance on plural nouns, kebab-case paths, sub-resources for actions and nesting depth.
- **Status code reference:** A table mapping success, client error and server error situations to the right HTTP codes.
- **Standard error body:** One error shape with stable codes, safe messages and field-level details.
- **Cursor pagination and filters:** Opaque cursors, limit clamping, stable ordering and allow-listed sorting and filtering.
- **Idempotency and concurrency:** Idempotency-Key handling for retried writes and ETag or version checks for updates.
- **Backward compatibility checks:** Separates safe additive changes from breaking ones and describes a deprecate-first approach.

## Good for

- Design a new orders endpoint with pagination and filtering
- Review an API change in a pull request for breaking changes
- Add idempotency keys to a payment or order creation route
- Standardize error responses across existing endpoints
- Decide whether a field change needs a new API version

## Install

### Claude Code

This skill ships in the `forgeline` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add Nabwinsaud/forgeline
/plugin install forgeline@forgeline
```

Or copy only this skill to `~/.claude/skills/api-design`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Nabwinsaud/forgeline.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/Nabwinsaud/forgeline.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/Nabwinsaud/forgeline.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/Nabwinsaud/forgeline.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/Nabwinsaud/forgeline.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/Nabwinsaud/forgeline.git
```

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

## FAQ

### When does API design trigger?

It is meant for adding or changing an endpoint, or reviewing an API contract in a spec or pull request.

### Does API design override the conventions already in my repo?

No. The skill says to read existing endpoints first and match them, and applies its rules only where the repo has no established convention.

### Does API design include scripts or tools?

No. It consists of a SKILL.md file with written guidance and no scripts.

### 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. Or install the forgeline plugin, which includes it: /plugin marketplace add Nabwinsaud/forgeline, then /plugin install forgeline@forgeline.

### 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. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

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

The closest alternatives to API design are API design, Go API design, HTTP semantics, API design edho ferdian and API designer.

## 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.
- [Go API design](https://ai-powered.com/skills/go-api-design): Go API design is an open-source agent skill for developer tools.
- [HTTP semantics](https://ai-powered.com/skills/http-semantics): HTTP semantics is an open-source agent skill for developer tools.
- [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 designer](https://ai-powered.com/skills/api-designer): API designer is an open-source agent skill for developer tools.
- [API](https://ai-powered.com/skills/api): API is an open-source agent skill for developer tools.
- [Backend patterns](https://ai-powered.com/skills/backend-patterns): Backend patterns is an open-source agent skill for developer tools.
- [API versioning helper](https://ai-powered.com/skills/api-versioning-helper): API versioning helper is an open-source agent skill for developer tools.

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