api-documentation
Skill47 starsChanged 4 months agoMITView on GitHub
Use when source code has changed and API docs are stale, or a new endpoint lacks documentation — generates accurate docs from implementation, not guesswork.
- Sends data out
11 other projects use a version of this.
Adopted by
Most recently taken up by
- 5throck/ai-workspace-standardstheir own version, first seen Sep 26, 2026
- irahardianto/awesome-agvtheir own version, first seen Aug 21, 2026
- leaf76/agent-skillstheir own version, first seen Aug 17, 2026
- arjunprabhulal/agent-skillstheir own version, first seen Aug 3, 2026
- yiweiwan/skillstheir own version, first seen May 12, 2026
- YepAPI/skillstheir own version, first seen Apr 12, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- irahardianto/awesome-agv★ 157same name
- 5throck/ai-workspace-standards★ 16same name
- autohandai/community-skills★ 11same name
- troykelly/claude-skills★ 11same name
- YepAPI/skills★ 8same name
- arjunprabhulal/agent-skills★ 4same name
- onejaejae/skills★ 2same name
- ronrefael/sonde★ 2same name
- OpenBun/Skills★ 1same name
- yiweiwan/skills★ 1same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository111 other files it gives its agents.
- AGENTS.mdAGENTS.md
- COPILOT-INSTRUCTIONS.mdCopilot instructions
- .github/copilot-instructions.mdCopilot instructions
- ai-visibilitySkill
- content-strategySkill
- seoSkill
- actions-debuggingSkill
- agentic-engineeringSkill
- autopilot-patternsSkill
- background-agentSkill
- context-primeSkill
- copilot-memorySkill
- cross-session-memorySkill
- ecosystem-intakeSkill
- fleet-parallelSkill
- github-code-searchSkill
- github-codespaces-efficiencySkill
- github-issue-triageSkill
- github-pr-workflowSkill
- ide-switchingSkill
- knowledge-curatorSkill
- mcp-builderSkill
- mcp-ecosystemSkill
- multi-model-strategySkill
- plan-mode-masterySkill
- scope-guardSkill
- session-managementSkill
- stack-detectorSkill
- sub-agent-sandboxingSkill
- task-intake-routerSkill
- team-plannerSkill
- token-cost-optimizerSkill
- api-and-interface-designSkill
- code-reviewSkill
- context-engineeringSkill
- cpp-debuggingSkill
- deprecation-and-migrationSkill
- diagnoseSkill
- fix-build-errorsSkill
- fix-github-issueSkill
- implementSkill
- improve-codebase-architectureSkill
- nestjs-prismaSkill
- nextjs-prismaSkill
- performance-optimizationSkill
- pr-multi-perspective-reviewSkill
- prototypeSkill
- react-vitestSkill
- receiving-code-reviewSkill
- refactor-cleanSkill
- reviewSkill
- skill-creatorSkill
- source-driven-developmentSkill
- spec-driven-developmentSkill
- systematic-debuggingSkill
- tdd-workflowSkill
- zoom-outSkill
- add-to-changelogSkill
- architecture-decisionsSkill
- code-tourSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 40
Use explore agent for a comprehensive map:
- Distinctive: line 170
Generate from code: when possible — manually written docs drift from reality
- Distinctive: line 172
Document error responses, not just success cases
- Distinctive: line 173
Add rate limiting and pagination details if applicable
- Very specific: line 175
Use task agent to verify documented curl commands actually work against the API
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
API Documentation
When to Use
- Building or updating REST/GraphQL API documentation
- Onboarding new developers who need to understand available endpoints
- Preparing API reference docs for external consumers
- Ensuring API docs stay synchronized with implementation
- Creating OpenAPI/Swagger specifications from existing code
Prerequisites
- API source code with route definitions
- Understanding of the API framework (Express, FastAPI, Gin, etc.)
- Knowledge of request/response formats and authentication requirements
Workflow
1. Discover All Endpoints
# Express / Node.js
grep -rn "router\.\(get\|post\|put\|delete\|patch\)\|app\.\(get\|post\|put\|delete\|patch\)" src/ --include="*.ts" --include="*.js"
# FastAPI / Python
grep -rn "@app\.\(get\|post\|put\|delete\)\|@router\." src/ --include="*.py"
# Go / Gin
grep -rn "\.GET\|\.POST\|\.PUT\|\.DELETE" . --include="*.go"Use explore agent for a comprehensive map:
task agent_type: "explore"
prompt: "Map all API endpoints in this project. For each endpoint list: HTTP method, path, handler function name, file location, and any middleware applied."2. Document Each Endpoint
For each endpoint, capture:
## POST /api/users
Create a new user account.
**Authentication:** Bearer token required
**Request Body:**
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| email | string | Yes | Valid email address |
| name | string | Yes | Display name (1-100 chars) |
| role | string | No | User role (default: "viewer") |
**Response 201:**
```json
{
"id": "usr_abc123",
"email": "user@example.com",
"name": "Jane Doe",
"role": "viewer",
"createdAt": "2024-01-15T10:30:00Z"
}Error Responses:
| Status | Description |
| 400 | Invalid request body |
| 409 | Email already exists |
| 401 | Missing or invalid auth token |
### 3. Extract Types and Schemas
```powershell
# Find request/response type definitions
grep -rn "interface.*Request\|interface.*Response\|type.*Payload" src/ --include="*.ts" -A 10
# Find validation schemas (Zod, Joi, etc.)
grep -rn "z\.object\|Joi\.object\|Schema" src/ --include="*.ts" -A 104. Document Authentication
# Find auth middleware and configuration
grep -rn "auth\|jwt\|bearer\|apiKey\|passport" src/middleware/ --include="*.ts" -A 5## Authentication
All endpoints except `POST /auth/login` require a Bearer token.
```bash
curl -H "Authorization: Bearer <token>" https://api.example.com/usersObtaining a Token
curl -X POST https://api.example.com/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com", "password": "secret"}'
### 5. Add Working Examples
```powershell
# Test each documented example against a running server
# Start the dev server
npm run dev # mode: async, detach: true
# Verify an endpoint
curl -s http://localhost:3000/api/health | python -m json.tool6. Generate OpenAPI Spec (Optional)
# If using a framework that supports auto-generation
npx swagger-jsdoc -d src/swagger-config.js -o docs/openapi.json
# Or generate from TypeScript types
npx ts-to-openapi --input src/types/ --output docs/openapi.yamlExamples
Documenting a CRUD API
# 1. Find all route files
glob pattern="src/routes/**/*.ts"
# 2. For each route file, extract endpoints and their handlers
grep -rn "router\." src/routes/users.ts -A 3
# 3. Find the handler implementation for request/response details
grep -rn "export.*function\|export.*const.*=" src/controllers/users.ts -A 15Quick API Reference Table
| Method | Path | Description | Auth |
|--------|------|-------------|------|
| GET | /api/users | List all users | Yes |
| POST | /api/users | Create user | Yes |
| GET | /api/users/:id | Get user by ID | Yes |
| PUT | /api/users/:id | Update user | Yes |
| DELETE | /api/users/:id | Delete user | Admin |Tips
- Generate from code when possible — manually written docs drift from reality
- Include
curlexamples for every endpoint — they're the most portable format - Document error responses, not just success cases
- Add rate limiting and pagination details if applicable
- Version your API docs alongside API code (same branch, same PR)
- Use
taskagent to verify documented curl commands actually work against the API - Include a Postman collection or similar importable format for API consumers
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

