code-documentation
Writing effective code documentation - API docs, README files, inline comments, and technical guides. Use for documenting codebases, APIs, or writing developer guides.
By moizibnyousaf · 555 installs
npx skills add moizibnyousaf/ai-agent-skills --skill code-documentation
Source repository · Upstream listing
Code Documentation
README Structure
Standard README Template
API Documentation
JSDoc/TSDoc Style
ts
const user = await createUser({
email: 'user@example.com',
name: 'John'
});
OpenAPI/Swagger
Inline Comments
When to Comment
When NOT to Comment
Architecture Documentation
ADR (Architecture Decision Record)
Component Documentation
Documentation Principles
1. Write for your audience New devs vs API consumers
2. Keep it close to code Docs in same repo, near relevant code
3. Update with code Stale docs are worse than none
4. Examples over explanations Show, don't just tell
5. Progressive disclosure Quick start first, details later