api-docs

api-docs is a command for Claude Code from rohitg00/awesome-claude-code-toolkit. It costs 0 tokens per session (770 once invoked), scanned A, original, Apache-2.0.

A command that creates reference documentation for HTTP API endpoints from route definitions, types, annotations, and middleware. An API is an interface that lets programs communicate, usually through HTTP requests and responses.

In plain words
What is it for?
Use it to document routes, methods, URLs, parameters, headers, request bodies, response schemas, and authentication requirements.
Why use it?
It makes endpoint behavior, authentication, inputs, outputs, errors, pagination, and limits easier for API users to understand.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the doc-forge plugin — 2 commands shipped together

Good fit Use it to document routes, methods, URLs, parameters, headers, request bodies, response schemas, and authentication requirements.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/rohitg00/awesome-claude-code-toolkit/api-docs
About the project

Awesome Claude Code Toolkit is a curated collection of extensions and configuration for Claude Code, including agents, skills, commands, plugins, hooks, rules, templates, MCP configurations, and companion apps. It is for Claude Code users who want ready-made workflows and integrations for different development tasks. The catalogue add-ons are selected components from this toolkit.

rohitg00/awesome-claude-code-toolkit · 2,595 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/rohitg00/awesome-claude-code-toolkit

Made for: Claude Code.

Or install doc-forge, the plugin that ships this one along with the rest of its 2 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-docs

README.md
[![agentmods](https://agentmods.dev/badge/commands/rohitg00/awesome-claude-code-toolkit/api-docs.svg)](https://agentmods.dev/commands/rohitg00/awesome-claude-code-toolkit/api-docs)
Your own site
<a href="https://agentmods.dev/commands/rohitg00/awesome-claude-code-toolkit/api-docs"><img src="https://agentmods.dev/badge/commands/rohitg00/awesome-claude-code-toolkit/api-docs.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 770 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00770
Opus 5 $0.00000 $0.00385
Sonnet 5 $0.00000 $0.00154
Haiku 4.5 $0.00000 $0.00077

Measured 4d ago against content hash b6e087854dfc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

api-docs scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- curl command for the most common use case
plugins/doc-forge/commands/api-docs.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/doc-forge:api-docs

Generate API reference documentation from source code annotations, types, and route definitions.

Process

  1. Discover the API surface:

    • Scan for route definitions, controller classes, or handler functions
    • Read middleware chain to understand request preprocessing (auth, validation, parsing)
    • Identify the response format conventions (JSON envelope, error structure, pagination)
    • Check for existing API documentation (Swagger UI, Redoc, custom docs)
  2. For each endpoint, extract and document:

Endpoint Header

  • HTTP method and full URL path (including base path and version prefix)
  • Brief description of what the endpoint does
  • Authentication requirement (public, authenticated, admin-only)
  • Rate limit tier if applicable

Request Documentation

  • Path Parameters: name, type, description, example value, validation constraints
  • Query Parameters: name, type, required/optional, default value, description, allowed values
  • Headers: required custom headers beyond standard ones (Accept, Content-Type)
  • Request Body: full schema with field descriptions, types, constraints, and example payload
    • Mark required fields explicitly
    • Document nested objects and arrays with their own field descriptions
    • Include validation rules (min/max length, regex patterns, enum values)

Response Documentation

  • For each possible status code:
    • Status code and meaning in context
    • Response body schema with field descriptions
    • Complete example response payload
  • Standard status codes to document:
    • 200/201 for success
    • 400 for validation errors (with example of error detail format)
    • 401 for unauthenticated requests
    • 403 for insufficient permissions
    • 404 for resource not found
    • 409 for conflict (duplicate creation, version mismatch)
    • 429 for rate limit exceeded
    • 500 for server errors (with error correlation ID format)

Code Examples

  • curl command for the most common use case
  • Language-specific examples if SDK libraries exist (JavaScript fetch, Python requests)
  • WebSocket examples if the API includes real-time features

Read the full file on GitHub · 84 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 84 lines · 0 tokens per session scan A b6e087854dfc

Subscribe to this mod's changes

api-docs is a command published in the GitHub repository rohitg00/awesome-claude-code-toolkit (2,595 stars, last pushed 3mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 770 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.