document-code
Installation
SKILL.md
Document Code Skill
When documenting code, follow this structured process. Good documentation explains WHY, not just WHAT. The code already shows what it does — documentation should explain the intent, context, trade-offs, and gotchas.
1. Understand Before Documenting
Before writing any documentation:
- Read the code thoroughly — understand the full context
- Identify the audience — is this for new team members, API consumers, future maintainers, or yourself?
- Check existing docs — don't duplicate or contradict what already exists
- Understand the architecture — how does this code fit into the bigger picture?
2. Documentation Types
Determine what kind of documentation is needed: