api-documentation
Use when API code changes (routes, endpoints, schemas). Enforces Swagger/OpenAPI sync. Pauses work if documentation has drifted, triggering documentation-audit skill.
npx skills add majiayu000/claude-skill-registry --skill api-documentation-troykelly-codex-skills-2 --agent codex
Same command for any agent — swap --agent for claude-code, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# API Documentation Enforcement ## Overview Ensures all API changes are reflected in Swagger/OpenAPI documentation. When documentation drift is detected, work pauses until documentation is synchronized. **Core principle:** API documentation is a first-class artifact, not an afterthought. No API change ships without documentation. **Announce at start:** "I'm using api-documentation to verify Swagger/OpenAPI sync." ## When This Skill Triggers This skill is triggered when ANY of these file patterns are modified: | Pattern | Framework | Trigger Reason | |---------|-----------|----------------| | `**/routes/**/*.ts` | Express/Fastify | Route definitions | | `**/controllers/**/*.ts` | NestJS/Express | Controller endpoints | | `**/*.controller.ts` | NestJS | Controller class | | `**/api/**/*.py` | FastAPI/Flask | API endpoints | | `**/*_router.py` | FastAPI | Router definitions | | `**/handlers/**/*.go` | Go | HTTP handlers | | `**/schema*.ts` | TypeScript | Schema definitions | | `**/dto/**/*.ts` | NestJS | Data transfer objects | | `**/models/**/*.ts` | Various | API models | ## Documentation Locations Check these locations for existing API documentation: | File | Format | Standard | |-
- Overview
- When This Skill Triggers
- Documentation Locations
- The Protocol
- Step 1: Detect API Changes
- Step 2: Find Documentation File
- Step 3: Verify Sync
- Step 4: Handle Drift
- Documentation Requirements
- Required Fields
- Required Examples
- Example OpenAPI Entry
- Validation
- Checklist
Check if current changes affect API Check common API file patterns for pattern in "routes/" "controllers/" "api/" "handlers/" "*.controller.ts" "*_router.py"; do if git diff --name-only HEAD~1 | grep -q "$pattern"; then break fi done Check for schema/DTO changes if git diff --name-only HEAD~1 | grep -qE "(schema|dto|model)"; then echo "API Changed: $API_CHANGED"
What does the api-documentation skill do?
Use when API code changes (routes, endpoints, schemas). Enforces Swagger/OpenAPI sync. Pauses work if documentation has drifted, triggering documentation-audit skill.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill api-documentation-troykelly-codex-skills-2 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
