# API

> API is an open-source agent skill for developer tools. Makes the agent design API contracts first and check callers before changing them. 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/JasGujral/mokata-oss/tree/main/src/mokata/skills/api
- **Repository:** https://github.com/jasgujral/mokata-oss
- **GitHub stars:** 19
- **License:** Apache-2.0
- **Skill name:** api
- **Collection:** https://github.com/JasGujral/mokata-oss
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

This skill guides an agent through interface work on routes, handlers, endpoints and public signatures. It asks the agent to define the operation, inputs, outputs, error cases and invariants before writing implementation, and to treat a generated spec such as an OpenAPI document as the shared source of truth where one exists.

Before a change to a shared or exported symbol lands, the skill has the agent look up its callers and blast radius, so the change is designed against real dependents. It also draws the line between backward-compatible changes like adding an optional field and breaking ones like removing a field or changing a status code, and favours extending an interface and deprecating the old shape over breaking it.

The guidance points to HTTP semantics in RFC 9110 for method safety, idempotency and status codes, and to RFC 2119 for requirement keywords. It belongs to the mokata pipeline, which records contract decisions to memory and an audit ledger through a human-approved step. It works with Python-based and other codebases and does not run scripts of its own.

## When your agent uses it

> mokata · API & interface design — contract-first, blast-radius on every change.

## What it can access

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

- [Instructions only, no scripts](https://github.com/JasGujral/mokata-oss/tree/HEAD/src/mokata/skills/api)
- [License: Apache-2.0](https://github.com/JasGujral/mokata-oss/tree/HEAD/src/mokata/skills/api)

## Features

- **Contract-first design:** Defines inputs, outputs, errors and invariants before implementation begins.
- **Caller blast-radius checks:** Looks up callers of shared symbols before a contract change lands.
- **Breaking change classification:** Separates backward-compatible changes from breaking ones and suggests versioning.
- **HTTP semantics guidance:** References RFC 9110 for method safety, idempotency and status code meaning.
- **Hyrum's Law awareness:** Reminds the agent that observable behaviour can become a dependency for callers.
- **Recorded contract decisions:** Feeds contract decisions to memory and an audit ledger through a human gate.

## Good for

- Design a new REST endpoint with its request and response shapes before coding it
- Check which callers would break if I rename a field in this API response
- Decide whether changing an error status code needs a version bump
- Review an interface change for backward compatibility
- Write an OpenAPI contract for an existing service and keep it as the source of truth

## Install

### Claude Code

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

```sh
/plugin marketplace add JasGujral/mokata-oss
/plugin install mokata@mostack
```

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

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

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

### Codex

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

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

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

### Cursor

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

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

For one project only, put the folder in `.cursor/skills/api` 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/JasGujral/mokata-oss.git --path src/mokata/skills/api
```

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

### VS Code

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

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

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

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/JasGujral/mokata-oss.git
```

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

## FAQ

### When does API engage?

It engages when an approach touches a route, handler, endpoint or public interface, or when a change alters a request or response shape, a signature, a status code, or any contract other code calls. It does not engage for purely internal refactors or UI-only or storage-only work.

### Does API run any scripts or tools?

No scripts are included. It directs the agent to use mokata commands such as callers and blast_radius when they are available, and falls back to reading or grepping callers when the code graph is not present.

### Are contract decisions saved automatically?

No. Recording a contract decision to memory and the ledger is a durable write that requires human approval through the mokata gate.

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

Copy the skill folder from GitHub to ~/.claude/skills/api to use it in all your projects, or to .claude/skills/api in one project. Or install the mokata plugin, which includes it: /plugin marketplace add JasGujral/mokata-oss, then /plugin install mokata@mostack.

### Does API 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?

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?

The closest alternatives to API are Contract design, API design, Principle migrate callers then delete legacy APIS, Contract first and API versioning helper.

## Where this comes from

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

## Alternatives

- [Contract design](https://ai-powered.com/skills/contract-design): Contract design is an open-source agent skill for developer tools.
- [API design](https://ai-powered.com/skills/api-design): API design is an open-source agent skill for developer tools.
- [Principle migrate callers then delete legacy APIS](https://ai-powered.com/skills/principle-migrate-callers-then-delete-legacy-apis): Principle migrate callers then delete legacy APIS is an open-source agent skill for developer tools.
- [Contract first](https://ai-powered.com/skills/contract-first): Contract first 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.
- [API AI augmented](https://ai-powered.com/skills/api-ai-augmented): API AI augmented is an open-source agent skill for ai models and llm tooling.
- [API designer](https://ai-powered.com/skills/api-designer): API designer is an open-source agent skill for developer tools.
- [API integration](https://ai-powered.com/skills/api-integration): API integration is an open-source agent skill for developer tools.

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