api-documentation
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.
More from bobmatnyc/claude-mpm-skills
drizzle-orm
Type-safe SQL ORM for TypeScript with zero runtime overhead
4.3Kplaywright-e2e-testing
Playwright modern end-to-end testing framework with cross-browser automation, auto-wait, and built-in test runner
2.7Kpydantic
Python data validation using type hints and runtime type checking with Pydantic v2's Rust-powered core for high-performance validation in FastAPI, Django, and configuration management.
2.2Ktailwind-css
Tailwind CSS utility-first framework for rapid UI development with responsive design and dark mode
1.2Ktrpc-type-safety
tRPC end-to-end type-safe APIs for TypeScript with React Query integration and full-stack type safety
1.1Kpytest
pytest - Python's most powerful testing framework with fixtures, parametrization, plugins, and framework integration for FastAPI, Django, Flask
899