Agent skill
generate-api-docs
Create API reference documentation from docstrings. Use when documenting public module interfaces.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/generate-api-docs
SKILL.md
Generate API Docs
Extract docstrings from functions and classes to automatically generate API reference documentation.
When to Use
- Documenting public module interfaces
- Creating reference guides for libraries
- Generating HTML API documentation
- Maintaining up-to-date API specs
Quick Reference
# Python with pdoc
pdoc --html module_name -o docs/
# Python with Sphinx
sphinx-quickstart docs/
make -C docs html
# Extract docstrings
python3 -c "import module; help(module.function)"
Workflow
- Ensure docstrings: Verify all public functions/classes have docstrings
- Validate format: Check docstring format (Google, NumPy, or reStructuredText)
- Extract metadata: Parse function signatures, parameter types, return types
- Generate documentation: Create HTML or Markdown API reference
- Validate output: Verify links work and examples are correct
Output Format
API documentation:
- Module overview
- Function/class signatures with type hints
- Parameter documentation (type, description, default)
- Return value documentation
- Raises/exceptions
- Code examples
- Cross-references to related APIs
References
- See
generate-docstringsskill for creating docstrings - See CLAUDE.md > Documentation for standards
- See
doc-issue-readmeskill for issue documentation
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?