api-docs-generator

api-docs-generator is a skill for Claude Code, Codex from pnp/copilot-prompts. It costs 51 tokens per session (2,206 once invoked), scanned A, original, MIT.

A guide for generating structured API reference documentation from source code, route files, or OpenAPI specifications. An API is a defined way for software systems to communicate.

In plain words
What is it for?
Use it to document HTTP methods, paths, parameters, request and response data, status codes, authentication, and related models.
Why use it?
It helps turn implementation details into consistent endpoint documentation without manually reconstructing every route and parameter.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/pnp/copilot-prompts/api-docs-generator
Any agent
npx skills add pnp/copilot-prompts --skill api-docs-generator
Clone the repo
git clone --depth 1 https://github.com/pnp/copilot-prompts

Made for: Claude Code, Codex.

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-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/pnp/copilot-prompts/api-docs-generator.svg)](https://agentmods.dev/skills/pnp/copilot-prompts/api-docs-generator)
Your own site
<a href="https://agentmods.dev/skills/pnp/copilot-prompts/api-docs-generator"><img src="https://agentmods.dev/badge/skills/pnp/copilot-prompts/api-docs-generator.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,206 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00051 $0.02206
Opus 5 $0.00026 $0.01103
Sonnet 5 $0.00010 $0.00441
Haiku 4.5 $0.00005 $0.00221

Measured 3d ago against content hash 67e1e7938527, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

api-docs-generator 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 3d 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 -X GET "{base-url}/{path}" \
samples/skills/api-docs-generator/SKILL.md · 289 lines

How it starts

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

API Documentation Generator

Generate clean, structured Markdown API reference docs from source code, OpenAPI/Swagger specs, or route definitions.

Gather Context

Before writing anything, determine:

  1. Source — Controller, route file, OpenAPI spec (JSON/YAML), or a set of files?
  2. API name — e.g., "User Management API". Infer from class/file name if not stated.
  3. Base URL — e.g., https://api.example.com/v1. Default to https://api.example.com if unknown.
  4. Auth method — Bearer token (default), API key, OAuth 2.0, or none.
  5. Output format:
    • single-file (default) — one Markdown file with all endpoints
    • per-endpoint — one file per endpoint ({method}-{path-slug}.md) plus a README.md index
  6. Language/framework — Auto-detect from file extensions, imports, and decorators.

If context is missing: In conversational mode, ask. In agent/inline mode, use sensible defaults and note your assumptions at the top of the output.

Analyzing the Source

From Source Code

Read the file(s) and extract:

  • Every endpoint: HTTP method + route path
  • Route params, query params, request body schemas
  • Response types, status codes, and return models
  • Auth requirements (per-endpoint if they vary)
  • Doc comments, decorators, or annotations (/// <summary>, @ApiOperation, @app.get(...), JSDoc @param/@returns, etc.)

Framework detection hints:

Signal Framework
[ApiController], [HttpGet] ASP.NET Core
@app.get(), @router.post() FastAPI
router.get(), app.use() Express.js
@GetMapping, @RestController Spring Boot
@Controller, @Get() NestJS
resources :users Rails

From OpenAPI/Swagger Specs

Parse the spec and map directly:

  • paths → endpoints
  • parameters → params table
  • requestBody → request body section
  • responses → response table + examples
  • components/schemas → inline the referenced models
  • securityDefinitions / securitySchemes → auth section
  • info.title, info.version, servers[0].url → header metadata

Read the full file on GitHub · 289 lines

Files

What ships with it

2 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. 3d ago First seen · 289 lines · 51 tokens per session scan A 67e1e7938527

Subscribe to this mod's changes

api-docs-generator is a skill published in the GitHub repository pnp/copilot-prompts (859 stars, last pushed 9d ago), licensed MIT. It adds 51 tokens to every session and 2,206 once invoked, about $0.0003 per session on Opus 5. 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.

Related

Other skills, from other repositories

apm-review-panel

Use this skill to run a multi-persona expert advisory review on a labelled pull request in microsoft/apm. The panel fans out to five mandatory specialists plus a test-coverage specialist (active on every PR that touches src/) plus three conditional specialists (auth, doc-writer, performance-expert), all running in…

microsoft/apm · 178 tokens

batch-bug-shepherd

Use this skill to drive a batch of suspected bugs in microsoft/apm from raw issue list to mergeable PR queue. Fan out one triage subagent per issue (LEGIT / UNCLEAR / FIXED-AT-HEAD), gate every legit bug against PRINCIPLES.md via an apm-ceo strategic-alignment pass, cross-reference legit issues against open PRs, then…

microsoft/apm · 227 tokens

apm-issue-autopilot

Use this skill to drive any open microsoft/apm issue (bug, feature, docs, refactor, perf) from raw intake to a mergeable PR with triage as the central, paramount gate. Run the apm-triage-panel rubric per issue first, then present ONE consolidated triage review for the whole batch and escalate to the maintainer BY…

microsoft/apm · 238 tokens

apm-spec-guardian

Use this skill to run a four-panel adversarial advisory review on any pull request that touches the OpenAPM specification artifact (docs/src/content/docs/specs/openapm-.md), its inline / sidecar JSON Schemas (docs/src/content/docs/specs/schemas/.schema.json), or the conformance fixture seed…

microsoft/apm · 215 tokens

apm-triage-panel

Use this skill to triage one microsoft/apm issue selected by the daily sweep, the status/needs-triage fast path, or manual dispatch. Emit one synthesized comment with a decision, label set, exact milestone, and suggested next action.

microsoft/apm · 59 tokens

cli-logging-ux

Use this skill when editing or creating CLI output, logging, warnings, error messages, progress indicators, or diagnostic summaries in the APM codebase. Activate whenever code touches console helpers (richsuccess, richwarning, richerror, richinfo, richecho), DiagnosticCollector, STATUSSYMBOLS, CommandLogger, or any…

microsoft/apm · 94 tokens