
api-doc-generator
Generate API documentation by scanning Controller classes, extracting endpoint URLs, HTTP methods, parameters, and response structures, then producing standardized docs from templates. Use when the user explicitly mentions generating API documentation, creating API docs, scanning interfaces, or documenting REST APIs. Do not trigger for generic documentation requests without explicit API mention.
- Installs
- 97
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/partme-ai/full-stack-skills --skill api-doc-generator- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads api-doc-generator automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
How to use this skill
Scan code for API endpoints, extract interface details, and generate standardized documentation. Do NOT trigger for generic documentation requests without explicit API/interface mention.
Workflow
- Scan Code - Check current project or specified objects for Controller classes and API interfaces
- Extract Information - Scan interfaces to collect request URL, method, parameters, and response information
- Generate Documentation - Create API documentation following the standard template
- Save Output - Save documentation to
./docsdirectory in the current project
Step-by-Step Process
Step 1: Scan Code for Interfaces
CRITICAL: Before generating any documentation, you MUST scan the code to find API interfaces.
-
Identify Target:
- Ask user if they want to scan the entire project or specific Controller classes
- If no target specified, scan the entire project for Controller classes
- Common Controller patterns:
- Java:
@RestController,@Controllerwith@RequestMapping - Spring Boot: Classes in
controllerorwebpackage - Files ending with
Controller.javaorController.kt
- Java:
-
Scan for Controllers:
- Search for Controller classes in the project
- Identify all classes annotated with
@RestControlleror@Controller - List all found Controller classes
-
Check for Interfaces:
- For each Controller class, scan for methods annotated with:
@GetMapping,@PostMapping,@PutMapping,@DeleteMapping@RequestMappingwith method specification
- Count total number of API interfaces found
- For each Controller class, scan for methods annotated with:
-
Validation:
- If no interfaces found, STOP and inform user:
未找到任何接口,无法生成接口文档。请确认: 1. 项目中是否存在 Controller 类 2. Controller 类中是否有 @GetMapping、@PostMapping 等注解的方法 3. 是否指定了正确的扫描路径 - If interfaces found, proceed to Step 2
- If no interfaces found, STOP and inform user:
Output: List of Controller classes and total number of interfaces found.
Step 2: Extract Interface Information
CRITICAL: For each interface, extract complete information including URL, method, parameters, and response.
For each API interface found, extract:
-
Basic Information:
- Interface Name: Method name or description from annotation
- Request Method: GET, POST, PUT, DELETE, PATCH
- Request URL: Full path including class-level and method-level mappings
- Controller Class: Full class name with package
- Method Name: Java/Kotlin method name
-
Request Information:
- Path Parameters: Parameters in URL path (e.g.,
/user/{id})- Parameter name, type, required flag, description
- Query Parameters: Parameters in query string
- Parameter name, type, required flag, default value, description
- Request Body (for POST/PUT):
- Body type (JSON, Form-data, etc.)
- Field definitions: name, type, required flag, description
- Nested object structures
- Request Headers:
- Common headers: Authorization, Shop-Id, Tenant-Id
- Custom headers if any
- Path Parameters: Parameters in URL path (e.g.,
-
Response Information:
- Response Type: Return type of the method
- Response Structure:
- Standard response wrapper (e.g.,
R<T>,ApiResponse<T>) - Data object structure
- Standard response wrapper (e.g.,
- Response Fields:
- Field name, type, description
- Nested object fields
- Response Examples: Generate example JSON responses
- Error Responses: Common error codes and messages
-
Additional Information:
- Description: From
@ApiOperation,@Operation, or method comments - Tags: From
@Api,@Tagannotations - Deprecated: Check for
@Deprecatedannotation - Security: Authentication/authorization requirements
- Description: From
Output: Structured data for each interface with all extracted information.
Step 3: Generate Documentation
CRITICAL: Generate documentation following the standard template format.
-
Select Template Language:
- Ask user for preferred language: Chinese or English
- If not specified, detect from project context (code comments, package names, etc.)
- Available templates:
- Chinese:
templates/接口文档模板.md - English:
templates/api-documentation-template-en.md
- Chinese:
-
Load Template:
- Load the appropriate template based on language selection
- Use it as the base structure
-
Organize by Module:
- Group interfaces by Controller class or business module
- Create sections for each module
-
Generate Interface List Table:
- For Chinese template: Create "接口一览表" with columns:
- 序号 (Sequence number)
- 接口地址 (Interface URL)
- 请求方式 (Request Method)
- 说明 (Description)
- 完成情况 (Status)
- For English template: Create "API Interface List" with columns:
- No. (Sequence number)
- Interface URL
- Method
- Description
- Status
- For Chinese template: Create "接口一览表" with columns:
-
Generate Interface Definitions: For each interface, generate:
- Interface Name: Clear, descriptive name
- Interface Address: Full URL with method
- Description:
- Corresponding Controller class and method
- Business functionality description
- Business rules if any
- Request Section:
- Method and URL
- Headers table
- Path Parameters table
- Query Parameters table
- Request Body (if applicable) with field definitions
- Response Section:
- Response structure description
- Response fields table
- Response example (JSON)
- Error response examples
-
Add Standard Sections:
- For Chinese template:
- 统一响应结构: Standard response format
- 分页响应格式: Pagination response format
- 错误码约定: Error code conventions
- 请求头规范: Request header specifications
- 注意事项: Important notes
- For English template:
- Standard Response Structure: Standard response format
- Pagination Response Format: Pagination response format
- Error Code Conventions: Error code conventions
- Request Header Specifications: Request header specifications
- Important Notes: Important notes
- For Chinese template:
-
Format Documentation:
- Use proper Markdown formatting
- Ensure tables are properly formatted
- Include code blocks for JSON examples
- Add proper headings hierarchy
Output: Complete API documentation in Markdown format.
Step 4: Save Documentation
CRITICAL: Save documentation to the ./docs directory in the current project.
-
Determine Output Path:
- Default:
./docs/api-documentation.md - If multiple modules:
./docs/{module-name}-api-documentation.md - Ask user if they want a custom filename
- Default:
-
Create Directory:
- Check if
./docsdirectory exists - If not, create it automatically
- Check if
-
Save File:
- Write the generated documentation to the file
- Use UTF-8 encoding
- Ensure proper line endings
-
Inform User:
- Tell user where the file was saved
- Show the file path
- Optionally display a preview of the documentation
Output: Documentation file saved to ./docs/api-documentation.md (or custom path).
Code Scanning Guidelines
Java/Spring Boot Projects
Controller Identification:
- Look for classes annotated with
@RestControlleror@Controller - Check for
@RequestMappingat class level - Common package patterns:
*.controller.*,*.web.*,*.api.*
Method Identification:
- Methods annotated with:
@GetMapping,@PostMapping,@PutMapping,@DeleteMapping,@PatchMapping@RequestMapping(method = RequestMethod.GET)etc.
Parameter Extraction:
@PathVariable: Path parameters@RequestParam: Query parameters@RequestBody: Request body@RequestHeader: Request headers- Parameter types from method signature
Response Extraction:
- Return type from method signature
@ResponseBodyannotation- Generic types (e.g.,
R<T>,Page<T>) - Response entity structure
Kotlin/Spring Boot Projects
Similar to Java, but check for:
- Kotlin data classes for request/response
- Nullable types (
String?,Int?) - Kotlin-specific annotations
Templates and References
templates/接口文档模板.md- Chinese API documentation templatetemplates/api-documentation-template-en.md- English API documentation templateexamples/scan-and-generate-example.md- Complete workflow example
Ask user for preferred language (Chinese/English). If not specified, detect from project context.
Best Practices
- Extract all available information from code annotations and comments
- Follow the template structure strictly
- Include realistic response examples with proper JSON formatting
- Document common error scenarios and codes
- Organize interfaces by module or Controller class
Keywords
api documentation, api docs, generate api docs, scan interfaces, REST API, 接口文档, API文档, 生成接口文档, 扫描接口
FAQ
What does the api-doc-generator skill do?
Generate API documentation by scanning Controller classes, extracting endpoint URLs, HTTP methods, parameters, and response structures, then producing standardized docs from templates. Use when the user explicitly mentions generating API documentation, creating API docs, scanning interfaces, or documenting REST APIs. Do not trigger for generic documentation requests without explicit API mention.
How do I install api-doc-generator?
Run npx skills add https://github.com/partme-ai/full-stack-skills --skill api-doc-generator in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/api-doc-generator/ (personal) or .claude/skills/api-doc-generator/ (project).
Which AI agents can use api-doc-generator?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is api-doc-generator safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains api-doc-generator?
It is published by partme-ai in partme-ai/full-stack-skills. It has 97 recorded installs.
More from partme-ai/full-stack-skills
electron
partme-ai/full-stack-skills
Build cross-platform desktop applications with Electron, covering main/renderer process architecture, IPC communication, BrowserWindow management, menus, tray icons, packaging, and security best practices. Use when the user asks about Electron, needs to create desktop applications, implement Electron features, or build cross-platform desktop apps.
element-plus-vue3
partme-ai/full-stack-skills
Provides comprehensive guidance for Element Plus Vue 3 component library including installation, components, themes, internationalization, and API reference. Use when the user asks about Element Plus for Vue 3, needs to build Vue 3 applications with Element Plus, or customize component styles.
uniapp-project
partme-ai/full-stack-skills
Provides per-component and per-API examples with cross-platform compatibility details for uni-app, covering built-in components, uni-ui components, and APIs (network, storage, device, UI, navigation, media). Use when the user needs official uni-app components or APIs, wants per-component examples with doc links, or needs platform compatibility checks.
drawio-flowchart
partme-ai/full-stack-skills
Creates flowcharts, swim lane diagrams, and business process diagrams using Draw.io (diagrams.net). Covers standard flowchart shapes (process, decision, start/end), connectors, auto-layout, and export to PNG/SVG/PDF. Use when the user needs to visualize workflows, decision trees, or business processes.
vue3
partme-ai/full-stack-skills
Guidance for Vue 3 using the official guide and API reference. Use when the user needs Vue 3 concepts, patterns, or API details to build components, apps, and tooling.
course-designer
partme-ai/full-stack-skills
Open the skill to read its SKILL.md instructions.
Popular backend & apis skills
find-skills
vercel-labs/skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
entra-app-registration
microsoft/azure-skills
Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.
google-agents-cli-adk-code
google/agents-cli
This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).
embedded-captions
heygen-com/hyperframes
Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.
entra-agent-id
microsoft/azure-skills
Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).
neon
neondatabase/agent-skills
Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.