fqih/.mycc-setup/api-docs

Claude Code and agent skill by fqih/.mycc-setup

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when generating API documentation — OpenAPI/Swagger auto-generation from code, MkDocs Material, Docusaurus, Mintlify, Postman/Insomnia export. Trigger on "openapi", "swagger", "api docs", "mkdocs", "docusaurus", "/api-docs".

Install

npx vskill@latest install fqih/.mycc-setup/api-docs

SKILL.md

The same SKILL.md was published earlier as fqih/.mycc-setup/api-docs.

api-docs

Auto-generate API documentation from source code atau manual specification. Local-first, version-controlled.

Pendekatan

PendekatanToolBest for
Spec-firstOpenAPI YAML/JSON hand-writtenPublic API, contract dengan client
Code-first (Python)FastAPI → auto OpenAPIFastAPI projects
Code-first (Node)swagger-jsdoc / tsoaExpress/Fastify
Code-first (Go)swagGin/Echo
Static siteMkDocs Material, Docusaurus, MintlifyLong-form + API reference
HostedStoplight, ReadMe, Mintlify cloudZero ops, $$

Default FastAPI: zero effort, OpenAPI auto-generated. Default Node: swagger-jsdoc inline JSDoc annotations. Default Go: swag dengan // @Summary annotations.

FastAPI auto-OpenAPI

FastAPI generates OpenAPI spec at /openapi.json by default. Plus Swagger UI di /docs, ReDoc di /redoc. Customization:

python
from fastapi import FastAPI
from fastapi.openapi.utils import get_openapi
import json
app = FastAPI(
title="My API",
description="API for X",
version="1.0.0",
contact={"name": "Fqih", "email": "mhmdfkih21@gmail.com"},
license_info={"name": "MIT"},
openapi_tags=[
{"name": "users", "description": "User operations"},
{"name": "auth", "description": "Authentication endpoints"},
],
)
# Add security scheme
from fastapi.security import OAuth2PasswordBearer
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="auth/token")
@app.get("/users", tags=["users"], summary="List users")
async def list_users():
"""List all users with pagination.
- **skip**: number of users to skip
- **limit**: max users to return (max 100)
"""
...
# Export spec ke file
with open("openapi.json", "w") as f:
json.dump(app.openapi(), f, indent=2)

MkDocs Material setup

bash
pip install mkdocs mkdocs-material
mkdocs new my-docs

mkdocs.yml:

yaml
site_name: My API
site_url: https://docs.example.com
repo_url: https://github.com/Fqih/repo
repo_name: Fqih/repo
theme:
name: material
palette:
- scheme: default
primary: indigo
toggle:
icon: material/brightness-7
name: Switch to dark mode
- scheme: slate
primary: indigo
toggle:
icon: material/brightness-4
name: Switch to light mode
features:
- navigation.tabs
- navigation.sections
- navigation.expand
- search.highlight
- content.code.copy
markdown_extensions:
- admonition
- pymdownx.highlight
- pymdownx.superfences
- pymdownx.tabbed
- pymdownx.inlinehilite
plugins:
- search
- mkdocstrings: # Python source doc integration
handlers:
python:
paths: [src]
options:
docstring_style: google
show_source: true
nav:
- Home: index.md
- Getting Started: getting-started.md
- API Reference:
- Users: api/users.md
- Auth: api/auth.md
- Guides:
- Deployment: guides/deployment.md

Serve locally:

bash
mkdocs serve # http://localhost:8000

Build + deploy:

bash
mkdocs build # → site/
# Deploy:
# - GitHub Pages: mkdocs gh-deploy
# - Netlify: drag-drop site/ folder
# - Vercel: vercel deploy --prebuilt

mkdocstrings (auto-generate dari docstrings)

Di docs/api/users.md:

markdown
::: myapp.users
options:
show_source: true
docstring_style: google
members:
-create_user
-list_users
-delete_user

Auto-renders signature + Google-style docstrings sebagai markdown.

Docusaurus (React-based, JS-heavy)

bash
npx create-docusaurus@latest my-docs classic
cd my-docs
npm start

Plus OpenAPI integration:

bash
npm install docusaurus-plugin-openapi-docs

docusaurus.config.js:

js
{
plugins: [
[
'docusaurus-plugin-openapi-docs',
{
id: 'api',
specPath: '../openapi.json',
outputDir: 'docs/api',
},
],
],
}

Mintlify (hosted, paid, but best DX)

mint.json:

json
{
"name": "My API",
"openapi": "openapi.json",
"navigation": [
{
"group": "Getting Started",
"pages": ["introduction", "authentication"]
},
{
"group": "API",
"pages": ["api/users", "api/auth"]
}
]
}

Auto-generates from OpenAPI + allows custom MDX pages.

Code-first: Node (swagger-jsdoc)

javascript
// routes/users.js
/**
* @openapi
* /users:
* get:
* tags: [users]
* summary: List users
* responses:
* 200:
* description: List of users
* content:
* application/json:
* schema:
* type: array
* items:
* $ref: '#/components/schemas/User'
*/
router.get('/users', listUsers);
javascript
// swagger.js
const swaggerJsdoc = require('swagger-jsdoc');
const swaggerUi = require('swagger-ui-express');
const spec = swaggerJsdoc({
definition: {
openapi: '3.0.0',
info: { title: 'My API', version: '1.0.0' },
},
apis: ['./routes/*.js'],
});
app.use('/docs', swaggerUi.serve, swaggerUi.setup(spec));

Code-first: Go (swag)

go
// @Summary List users
// @Description Get list of users with pagination
// @Tags users
// @Param skip query int false "Skip count"
// @Param limit query int false "Limit (max 100)"
// @Success 200 {array} User
// @Router /users [get]
func ListUsers(c *gin.Context) {
...
}
bash
swag init # → docs/swagger.json
# Serve via gin-swagger

CI/CD: keep docs in sync

yaml
# .github/workflows/docs.yml
name: Build docs
on: [push]
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pip install mkdocs mkdocs-material
- run: mkdocs build --strict
- uses: actions/deploy-pages@v4
with:
artifact: site

Versioning

API versions di spec + URL:

  • /api/v1/users
  • /api/v2/users (breaking changes)

OpenAPI versions via info.version. Maintain changelog.md.

OpenAPI spec tips

✅ Use $ref untuk reusable components (User schema, Error response) ✅ Add example ke semua fields (Swagger UI tampilkan) ✅ Define error responses (400, 401, 404, 500) ✅ Security schemes: Bearer JWT, OAuth2, API key ✅ Pagination: cursor-based atau offset-based, document choice ✅ Document rate limits + quotas

Anti-patterns

❌ Hand-write OpenAPI untuk FastAPI (auto-generated lebih reliable) ❌ Docs repo terpisah dari code repo (drift inevitable) ❌ Skip error response docs (user bingung saat error) ❌ Publish docs tanpa versioning ❌ Inline JSDoc tanpa @openapi annotation (tidak ter-export) ❌ Hosting public docs untuk internal API (security leak)

Integration dengan audit-workflow

Audit dimension "docs drift" cek apakah README references match actual files. Untuk API docs, validasi:

  • All endpoint di OpenAPI ter-implement di code
  • All routes terdaftar punya description
  • OpenAPI valid JSON/YAML
  • Docs site builds tanpa error (mkdocs --strict)

Invokation

Auto-trigger:

  • Edit FastAPI routes, Node route handlers, Go handlers
  • Reference ke "openapi", "swagger", "api docs", "docs site"
  • Slash command: /api-docs, /gen-openapi

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/fqih/.mycc-setup/api-docs/badge)](https://verified-skill.com/skills/fqih/.mycc-setup/api-docs)

Something wrong with this skill or its page? Tell us.