# API documentation

> API documentation is an open-source agent skill for developer tools. Keeps API contracts, examples and published docs accurate for callers, tests and mocks. 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/postmanlabs/postman-plugin/tree/main/agent-plugin/skills/api-documentation
- **Repository:** https://github.com/postmanlabs/postman-plugin
- **GitHub stars:** 49
- **License:** Apache-2.0
- **Skill name:** api-documentation
- **Collection:** https://github.com/postmanlabs/postman-plugin
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill guides an agent through maintaining an API contract alongside its documentation. It starts from whichever artifact is the source of truth, such as an OpenAPI spec or a Postman collection, and asks that any sync direction between the two be stated explicitly. When a spec is authoritative, it points the agent to the Postman CLI command that generates a collection from it, with a reminder to inspect the output before overwriting an existing collection that may hold scripts and examples.

The workflow focuses on what changes a caller's decisions: required and optional inputs, auth and scopes, response guarantees, pagination, retryable failures and side effects. It asks the agent to label unresolved design choices rather than invent them, and to save examples for consequential cases including errors, since those examples also feed mock servers. Variables are used to keep credentials out of shared requests.

Publishing is handled by audience. Local files support Git review, a workspace push shares artifacts with teammates, and a public docs link goes through the postman-mcp-server documentation tool after the intended audience is confirmed. Verification checks that edited files parse, that examples match the contract, and that the published page is actually readable.

## When your agent uses it

> Use when defining or improving an API contract, generating documentation from a collection or OpenAPI spec, publishing API docs, or sharing a documentation link. Makes auth, inputs, responses, and examples reusable by callers, tests, and mocks. Use for requests such as "publish API docs".

## What it can access

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

- [Instructions only, no scripts](https://github.com/postmanlabs/postman-plugin/tree/HEAD/agent-plugin/skills/api-documentation)
- [License: Apache-2.0](https://github.com/postmanlabs/postman-plugin/tree/HEAD/agent-plugin/skills/api-documentation)

## Features

- **Contract-first documentation:** Keeps OpenAPI specs and Postman collections aligned with a stated direction of generation.
- **Caller-focused guarantees:** Documents auth, scopes, inputs, pagination, retries and side effects that affect integration.
- **Error and success examples:** Saves examples for consequential cases, including failures, reusable by mocks and tests.
- **Spec-to-collection generation:** Uses the Postman CLI to generate a collection from an OpenAPI spec, with review before replacement.
- **Public docs publishing:** Guides publishing to a workspace or a public documentation link via the Postman MCP server.
- **Verification steps:** Checks that edited artifacts parse, examples agree with the contract and published pages render.

## Good for

- Generate a Postman collection from an existing OpenAPI spec
- Document authentication and error responses for an API endpoint
- Improve examples so mock servers return realistic failure cases
- Publish API documentation to a shared Postman workspace
- Create a public documentation link for an API

## Install

### Claude Code

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

```sh
/plugin marketplace add postmanlabs/postman-plugin
/plugin install postman@postman
```

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

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

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

### Codex

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

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

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

### Cursor

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

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

For one project only, put the folder in `.cursor/skills/api-documentation` 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/postmanlabs/postman-plugin.git --path agent-plugin/skills/api-documentation
```

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

### VS Code

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

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

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

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/postmanlabs/postman-plugin.git
```

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

## FAQ

### When does API documentation trigger?

When you ask to define or improve an API contract, generate docs from a collection or OpenAPI spec, publish API docs, or share a documentation link.

### Does publishing make docs public automatically?

No. A workspace push does not publish a public docs page or change permissions. Public links go through the documentation workflow and the intended audience should be set first.

### Does API documentation overwrite my existing collection?

The skill asks the agent to inspect a generated collection before replacing an existing one, since maintained scripts and examples may be lost.

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

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

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

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 documentation?

The closest alternatives to API documentation are API engineer, API documentation, API mocking, API and API discovery.

## Where this comes from

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

## Alternatives

- [API engineer](https://ai-powered.com/skills/api-engineer): API engineer is an open-source agent skill for legal and government.
- [API documentation](https://ai-powered.com/skills/api-documentation): API documentation is an open-source agent skill for developer tools.
- [API mocking](https://ai-powered.com/skills/api-mocking): API mocking 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.
- [API discovery](https://ai-powered.com/skills/api-discovery): API discovery 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.
- [Postman MCP server](https://ai-powered.com/skills/postman-mcp-server-postmanlabs): Postman MCP server is an open-source agent skill for developer tools.
- [API testing](https://ai-powered.com/skills/api-testing): API testing is an open-source agent skill for developer tools.

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