generate-api-docs

generate-api-docs is a skill for Claude Code, Cursor from emaraschio/cursor-commands. It costs 10 tokens per session (288 once invoked), scanned A, original, MIT.

A workflow for creating API documentation from endpoints and data models that already exist in code. An API is a defined way for software systems to communicate, and the documentation describes how to call it and what responses mean.

In plain words
What is it for?
Use it to produce OpenAPI or Swagger documentation, describe request and response schemas, and add examples using commands such as cURL.
Why use it?
It saves the work of manually listing routes, inputs, outputs, errors, authentication, and examples. It is designed to avoid documenting endpoints or behavior that the code does not contain.

Skill for Claude CodeCursor

Written for Claude Code and Cursor: user-invocable in frontmatter, but also shipped in a Cursor plugin.

Part of the cursor-commands plugin — 44 skills, 43 commands shipped together

Good fit Use it to produce OpenAPI or Swagger documentation, describe request and response schemas, and add examples using commands such as cURL.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/emaraschio/cursor-commands/generate-api-docs
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.

Any agent
npx skills add emaraschio/cursor-commands --skill generate-api-docs
Clone the repo
git clone --depth 1 https://github.com/emaraschio/cursor-commands

Made for: Claude Code, Cursor.

Or install cursor-commands, the plugin that ships this one along with the rest of its 44 skills, 43 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 generate-api-docs

README.md
[![agentmods](https://agentmods.dev/badge/skills/emaraschio/cursor-commands/generate-api-docs/github.svg)](https://agentmods.dev/skills/emaraschio/cursor-commands/generate-api-docs)
Your own site
<a href="https://agentmods.dev/skills/emaraschio/cursor-commands/generate-api-docs"><img src="https://agentmods.dev/badge/skills/emaraschio/cursor-commands/generate-api-docs/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-docs

Your own site · 80×15
<a href="https://agentmods.dev/skills/emaraschio/cursor-commands/generate-api-docs"><img src="https://agentmods.dev/badge/skills/emaraschio/cursor-commands/generate-api-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 288 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00010 $0.00288
Opus 5.5 $0.00004 $0.00115
Sonnet 5.5 $0.00002 $0.00058
Haiku 4.5 $0.00001 $0.00029

Measured 1mo ago against content hash 9fa0d103fadf, 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-docs scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/skill-contracts/generate-api-docs/SKILL.md · 45 lines

What it actually says

Overview

Create comprehensive API documentation for the current endpoints formatted as OpenAPI/Swagger specification or following the project's documentation standards.

Steps

  1. API Overview
    • Service description and purpose
    • Base URL and versioning information
    • Authentication and authorization requirements
    • Rate limiting and usage policies
  2. Endpoint Documentation
    • HTTP method and URL path
    • Request parameters (path, query, body)
    • Request/response schemas with data types
    • Example requests and responses
    • Possible error codes and messages
  3. Data Models
    • Define all data models and schemas
    • Include field descriptions and constraints
    • Show relationships between models
    • Provide example payloads
  4. Usage Examples
    • Common use case scenarios
    • SDK and client library examples
    • CURL command examples
    • Error handling examples

API Documentation Checklist

  • API overview complete
  • Endpoints documented
  • Data models defined
  • Usage examples provided
  • Documentation formatted per project standards

Guardrails

  • Document only endpoints that exist in code; do not invent endpoints, parameters, or responses.
  • Use placeholder values in examples; never expose real secrets or credentials.
Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 45 lines · 10 tokens per session scan A 9fa0d103fadf

Subscribe to this mod's changes

generate-api-docs is a skill published in the GitHub repository emaraschio/cursor-commands (9 stars, last pushed yesterday), licensed MIT. It adds 10 tokens to every session and 288 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

review-api-compat

Use when the user asks for an API compatibility review, breaking change review, proto breaking change review, buf breaking review, OpenAPI compatibility check, gRPC backwards compatibility audit, "are these API changes breaking", "did we break the wire", contract evolution review, or backwards-compatibility audit on…

paultyng/skill-issue · 69 tokens

review-reliability

Use when the user asks for a reliability review, production readiness assessment, stability analysis, graceful shutdown audit, drain or rollout review, timeout review, timeout budget check, deadline propagation review, circuit breaker or bulkhead review, retry and backoff review, goroutine leak or resource leak…

paultyng/skill-issue · 106 tokens

audit-backend-architecture

Read-only backend-architecture audit and pattern advisor, gated by stack. Use when "audit backend architecture", "which pattern should I use", "am I over-engineering", or "sync vs event-driven". Enforced boundaries → enhance-arch-boundaries.

kensaurus/cursor-kenji · 58 tokens

audit-fe-api

Audit frontend API calls against backend implementation for contract alignment and network shape. Use when "API audit", "FE-BE contract", or "review frontend API integration". Live 4xx/5xx reproduction → debug-fe-be-integration.

kensaurus/cursor-kenji · 52 tokens

audit-realworld

Read-only conformance audit of a full-stack app against RealWorld ("Conduit"): API spec, shared E2E suite, closest-stack reference. Use when "audit against RealWorld", "Conduit conformance", or "is my full-stack app complete?".

kensaurus/cursor-kenji · 58 tokens

backend-error-handling

Implement error-handling patterns: boundaries, toasts, one API error shape. Use when "error boundary", "error toast", or "standardize API errors". Plan-only audit → plan-error-handling. Sentry triage → debug-sentry-monitor.

kensaurus/cursor-kenji · 57 tokens