api-documentation
Installation
SKILL.md
API Documentation
Best practices for documenting APIs and code interfaces. Eliminates ~100-150 lines of redundant documentation guidance per agent.
Core Documentation Principles
- Document the why, not just the what - Explain intent and rationale
- Keep docs close to code - Inline documentation stays synchronized
- Document contracts, not implementation - Focus on behavior
- Examples are essential - Show real usage
- Update docs with code - Outdated docs are worse than no docs
Function/Method Documentation
Python (Docstrings)
def calculate_discount(price: float, discount_percent: float) -> float:
"""
Calculate discounted price with percentage off.