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

Written for no agent in particular: nothing here depends on one.

Good fit Use it to document HTTP methods, paths, parameters, request and response data, status codes, authentication, and related models.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pnp/copilot-prompts/api-docs-generator
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 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/github.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/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 api-docs-generator

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 16
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 233
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 273
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 273
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
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.00051 $0.02206
Opus 5.5 $0.00020 $0.00882
Sonnet 5.5 $0.00010 $0.00441
Haiku 4.5 $0.00005 $0.00221

Measured 1mo ago against content hash 67e1e7938527, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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.

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. 1mo 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 (894 stars, last pushed 4d ago), licensed MIT. It adds 51 tokens to every session and 2,206 once invoked, about $0.0002 per session on Opus 5.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

azure-openai-patterns

Azure OpenAI API patterns for rate limiting, function calling, error handling, and token optimization.

fabioc-aloha/Alex_Skill_Mall · 24 tokens

image-prompt-builder-nl

Craft high-quality natural-language image prompts for any modern text-to-image or image-edit model that accepts flowing English. Trigger when the user wants help writing, rewriting, improving, or translating an English natural-language image prompt — including "write me an image prompt", "improve this image prompt"…

jim60105/copilot-prompt · 125 tokens

api-security

Guideline for designing, implementing, and verifying secure APIs following OWASP API Security Top 10 (2023) best practices. Use when the user wants to: (1) review API code or design for security vulnerabilities, (2) design a secure REST, GraphQL, or gRPC API architecture, (3) implement API authentication and…

jim60105/copilot-prompt · 198 tokens

claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

khanhhuyenngo985-sys/character-scene-design-skills · 53 tokens

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

stefaniuk/loadout · 61 tokens

api-and-interface-design

Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.

stefaniuk/loadout · 49 tokens