plugins/api-docs/skills/api_docs/SKILL.md
Generates markdown API documentation from FastAPI routes, Pydantic models, DRF viewsets, and serializers — also detects drift between code and existing docs. Use when asked to "generate api docs", "document api", "api documentation", "openapi", "swagger docs", "update api docs", "check api drift", or "document endpoints".
npx skillsauth add shouenlee/ghcp-dev-plugin api_docsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generates comprehensive markdown API documentation by scanning FastAPI routes, Pydantic models, DRF viewsets, and serializers. Also detects drift between existing documentation and current code.
/api-docs generate — Generate API documentationDetect API framework:
# FastAPI detection
grep -r "APIRouter\|FastAPI()" --include="*.py" .
# Django REST Framework detection
grep -r "ViewSet\|APIView\|@api_view" --include="*.py" .
For FastAPI projects:
grep -r "class.*BaseModel" --include="*.py" -l .
For DRF projects:
grep -r "class.*Serializer" --include="*.py" -l .
Generate markdown documentation:
# API Documentation
## Authentication
{Detected auth mechanism}
## Endpoints
### {Group/Router Name}
#### `{METHOD} {path}`
{Description from docstring}
**Request Body:**
| Field | Type | Required | Description |
|-------|------|----------|-------------|
**Response:**
| Field | Type | Description |
|-------|------|-------------|
**Status Codes:**
| Code | Description |
|------|-------------|
Write to docs/api.md or user-specified location.
Offer to add a table of contents with links to each endpoint group.
/api-docs diff — Detect documentation driftdocs/api.md or user-specified location).API Documentation Drift Report
==============================
Added (not documented):
- POST /api/v1/users/bulk-invite
Removed (still documented):
- DELETE /api/v1/users/{id}/avatar
Changed:
- PUT /api/v1/users/{id}
- Added field: `phone_number` (string, optional)
- Removed field: `legacy_id`
| Problem | Cause | Solution |
|---------|-------|----------|
| Framework not detected | No FastAPI or DRF imports found | Verify the project uses a supported framework; check for non-standard import patterns |
| Routes spread across many files | Large project with modular routing | The tool scans recursively; ensure all route files use standard decorators and patterns |
| Dynamic route generation | Routes created programmatically at runtime | Document dynamic routes manually or point the tool to the route registration code |
| Pydantic v1 vs v2 differences | Model syntax varies between versions | The tool handles both BaseModel styles; flag any issues for manual review |
| Existing docs in non-standard format | Docs don't follow expected markdown structure | Use generate to create fresh docs, then manually merge custom sections |
tools
Decomposes feature descriptions or GitHub issues into ordered subtasks with file-level scope, acceptance criteria, and optional gh issue create. Use when asked to "break down task", "decompose feature", "create subtasks", "plan implementation", "break this into tasks", "task list", or "implementation plan".
documentation
Generates changelogs from conventional commits, bumps semantic versions in pyproject.toml or package.json, and publishes GitHub releases. Use when asked to "create release", "release notes", "changelog", "bump version", "semantic version", "tag release", "publish release", or "what changed since last release".
development
Runs ruff, mypy, and bandit on changed Python files — explains violations and auto-fixes with ruff check --fix. Use when asked to "lint", "fix lint", "check types", "type check", "run mypy", "run ruff", "python quality", or "lint python files".
development
Create new Agent Skills for GitHub Copilot from prompts or by duplicating this template. Use when asked to "create a skill", "make a new skill", "scaffold a skill", or when building specialized AI capabilities with bundled resources. Generates SKILL.md files with proper frontmatter, directory structure, and optional scripts/references/assets folders.