code-documentation
Installation
SKILL.md
Code Documentation Skill
This skill provides comprehensive guidelines for documenting code, prioritizing user-centric writing, clarity, and consistency.
1. General Philosophy
- User-Centric: Write for the person using your API. If you had to look up how to use something, document it so others don't have to.
- Explain "Why": Explain why code exists and how to use it effectively, since the code signature already tells what it does.
- Be Concise: Omit fluff. Avoid merely restating the code name, as it is not helpful.
- Consistency: Use standard terminology and consistent formatting.
- Public APIs: Document all public APIs (classes, members, top-level functions) without exception.
- Code Samples: Strongly consider adding code samples to explain usage.
2. General Structure
Follow this general structure for documentation comments across languages: