Agent skill
mkdocs-generation
Generate MkDocs documentation sites with Material theme, mkdocstrings for API docs, and versioning. Use when setting up or extending project documentation.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/mkdocs-generation
SKILL.md
MkDocs Documentation Generation
Generate professional documentation sites using MkDocs Material theme with automatic API reference generation.
Stack
- MkDocs: Static site generator for project documentation
- Material Theme: Modern, responsive theme with navigation features
- mkdocstrings: Auto-generate API docs from Python docstrings
- mike: Version management for documentation
Dependencies
Add to pyproject.toml (optional extras group):
[project.optional-dependencies]
docs = [
"mkdocs>=1.5",
"mkdocs-material>=9.4",
"mkdocstrings[python]>=0.24",
"mike>=2.0",
]
Or requirements.txt:
mkdocs>=1.5
mkdocs-material>=9.4
mkdocstrings[python]>=0.24
mike>=2.0
Directory Structure
Simple (flat):
docs/
├── index.md # Home/overview
├── getting-started.md # Installation and quickstart
├── configuration.md # Config options
└── tools.md # Feature reference
Complex (nested):
docs/
├── index.md
├── compatibility.md
├── guide/
│ ├── getting-started.md
│ ├── cli.md
│ └── advanced.md
└── api/
├── panel.md # ::: module.Class
└── entities/
├── area.md
└── zone.md
mkdocs.yml Configuration
See templates/mkdocs.yml for the full configuration template.
Key sections:
- Site metadata: name, description, URLs
- Versioning: mike provider for multi-version docs
- Theme: Material with navigation features
- Plugins: search + mkdocstrings for API docs
- Navigation: Explicit nav structure
API Reference with mkdocstrings
Create minimal markdown files that reference Python modules:
# Panel API
::: mypackage.panel.Panel
::: mypackage.panel.PanelSync
mkdocstrings auto-generates documentation from docstrings. Configure in mkdocs.yml:
docstring_style: google- Use Google-style docstringsshow_source: false- Hide source codemerge_init_into_class: true- Combine__init__with class docsfilters: ["!^_"]- Exclude private members
Commands
# Serve locally with hot-reload
mkdocs serve
# Build static site
mkdocs build
# Deploy to GitHub Pages
mkdocs gh-deploy
# Version management (mike)
mike deploy --push --update-aliases 0.1.0 latest
mike set-default --push latest
Writing Guidelines
- index.md: Brief overview, key features as bullet list, installation snippet, "Where to Next" links
- getting-started.md: Prerequisites, step-by-step setup, minimal working example
- API docs: Let mkdocstrings generate from docstrings; add brief intro if needed
- Guides: Task-oriented, include code examples, link to related API docs
Templates
templates/mkdocs.yml- Configuration filetemplates/index.md- Home pagetemplates/getting-started.md- Quickstart guidetemplates/api-reference.md- API doc page using mkdocstrings
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?