# Add Documentation

> Add or improve code documentation for the current change

- Skill: `emaraschio/add-documentation` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add emaraschio/add-documentation`
- Raw SKILL.md: https://api.skillmd.com/api/skills/emaraschio/add-documentation/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: emaraschio (https://skillmd.com/u/emaraschio)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/emaraschio/add-documentation

---

## Overview

Add comprehensive documentation for the current code/feature and format it according to the project's documentation standards, including it in the appropriate location (README, docs folder, or inline comments).

## Steps

1. **Overview**
    - What this code/feature does
    - Why it exists and its purpose
    - Key concepts and terminology
2. **API Documentation**
    - Function/method signatures
    - Parameters and return values
    - Example usage with code snippets
    - Error handling and edge cases
3. **Implementation Details**
    - Architecture overview
    - Important design decisions
    - Dependencies and integrations
4. **Examples**
    - Common use cases with full examples
    - Best practices and patterns
    - Common pitfalls to avoid

## Add Documentation Checklist

- [ ] Explained what this code/feature does
- [ ] Documented why it exists and its purpose
- [ ] Defined key concepts and terminology
- [ ] Documented function/method signatures
- [ ] Documented parameters and return values
- [ ] Included example usage with code snippets
- [ ] Documented error handling and edge cases
- [ ] Provided architecture overview
- [ ] Documented important design decisions
- [ ] Included common use cases with full examples
- [ ] Documented best practices and patterns
- [ ] Documented common pitfalls to avoid

## Guardrails

- Document intent, contracts, and edge cases; do not document obvious one-liners.
- Match the project's existing documentation style and location.
