generate-api-ref

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

A command that creates API reference documentation from application source code and route definitions. An API is a defined way for software systems to communicate.

In plain words
What is it for?
Use it to document HTTP routes, parameters, request and response formats, authentication, errors, pagination, rate limits, and caching in Markdown.
Why use it?
It avoids manually tracking endpoints, inputs, outputs, authentication, errors, and examples as the code changes.

Command for Claude Code

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

Part of the api-reference plugin — 1 command shipped together

Good fit Use it to document HTTP routes, parameters, request and response formats, authentication, errors, pagination, rate limits, and caching in Markdown.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/rohitg00/awesome-claude-code-toolkit/generate-api-ref
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,711 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 api-reference, the plugin that ships this one along with the rest of its 1 command.

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 generate-api-ref

README.md
[![agentmods](https://agentmods.dev/badge/commands/rohitg00/awesome-claude-code-toolkit/generate-api-ref/github.svg)](https://agentmods.dev/commands/rohitg00/awesome-claude-code-toolkit/generate-api-ref)
Your own site
<a href="https://agentmods.dev/commands/rohitg00/awesome-claude-code-toolkit/generate-api-ref"><img src="https://agentmods.dev/badge/commands/rohitg00/awesome-claude-code-toolkit/generate-api-ref/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for generate-api-ref

Your own site · 80×15
<a href="https://agentmods.dev/commands/rohitg00/awesome-claude-code-toolkit/generate-api-ref"><img src="https://agentmods.dev/badge/commands/rohitg00/awesome-claude-code-toolkit/generate-api-ref.svg" alt="Reviewed on agentmods" width="80" 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 316 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.00316
Opus 5.5 $0.00000 $0.00126
Sonnet 5.5 $0.00000 $0.00063
Haiku 4.5 $0.00000 $0.00032

Measured 1mo ago against content hash 8f002c4a16f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

generate-api-ref 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 1mo 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.

- Show curl examples for at least the primary endpoints
plugins/api-reference/commands/generate-api-ref.md · 29 lines

What it actually says

/generate-api-ref - Generate API Reference

Generate API reference documentation from source code and route definitions.

Steps

  1. Detect the API framework: Express, FastAPI, Django REST, Spring Boot, Gin, etc.
  2. Scan route definitions to find all API endpoints
  3. For each endpoint, extract: HTTP method, path, middleware, handler function
  4. Parse handler functions to identify request parameters (path, query, body, headers)
  5. Extract request/response schemas from TypeScript types, Pydantic models, or JSDoc
  6. Identify authentication requirements from middleware chains
  7. Find example request/response pairs from test files or inline documentation
  8. Detect rate limiting, pagination, and caching configurations
  9. Generate markdown documentation for each endpoint with: method, path, description, parameters, request body, response, errors
  10. Group endpoints by resource or router module
  11. Add a table of contents and overview section
  12. Save documentation to docs/api-reference.md or the specified output path

Rules

  • Include all HTTP methods (GET, POST, PUT, PATCH, DELETE) for each resource
  • Document error responses (400, 401, 403, 404, 500) with example payloads
  • Use the actual TypeScript/Python types, not simplified versions
  • Include authentication requirements for each endpoint
  • Show curl examples for at least the primary endpoints
  • Do not document internal or health-check endpoints unless requested
  • Keep parameter descriptions concise but include type and required status
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. 1mo ago First seen · 29 lines · 0 tokens per session scan A 8f002c4a16f5

Subscribe to this mod's changes

generate-api-ref is a command published in the GitHub repository rohitg00/awesome-claude-code-toolkit (2,711 stars, last pushed 5mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 316 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-08-30.