Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Document Api Ganeshnair007 Ibm X Quantum Comput?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/majiayu000-document-api-ganeshnair007-ibm-x-quantum-comput)
---
name: document_api
description: Generates standardized API documentation (OpenAPI/Markdown) for backend endpoints.
---
# Document API
Use this skill to automatically map out and document your server's API surface area.
## Inputs
* **Source Code**: The directory or entry point (e.g., `server.js`).
* **Format**: Preferred output (Markdown vs Swagger/OpenAPI).
## Tooling Strategy
* Use `grep_search` to find route definitions (e.g., `.get(`, `@app.route`).
* Use `view_file` to understand request/response schemas.
## Workflow
### 1. Analysis
* **Scan**: Identify the server entry point (e.g., `server.js`, `app.py`).
* **Route Discovery**: Trace route definitions (Express `.get()`, Flask `@app.route`, FastAPI decorators).
* **Parameters**: specific inputs (Body, Query Params, Path Variables).
### 2. Documentation Generation
* **Format**: Create/Update `API_DOCUMENTATION.md` (or generate an OpenAPI/Swagger spec).
* **Structure**:
* **Endpoint Details**: `METHOD /path`, description, rate limiting limits, and Auth requirements.
* **Request Specification**: Path/Query params, headers, and precise body schemas (with types & validation rules).
* **Response Specification**:
* 200 Success: Include a full JSON example.
* Error Responses: Document ALL possible error codes (e.g., 400 Bad Request, 401 Unauthorized, 409 Conflict), their message formats, and troubleshooting tips.
* **Code Examples**: Include a `cURL` command example and a JavaScript/Python snippet if applicable.
* **Usage Guidelines**: Provide a getting started guide, pagination patterns, and filtering/sorting options.
### 3. Output
* Make the documentation clear and consistent.
* Ensure every identified route is listed.