// Write clear, effective technical documentation following industry-proven patterns from exemplary projects and authoritative style guides, with built-in countermeasures for common LLM documentation issues
| name | writing-documentation |
| description | Write clear, effective technical documentation following industry-proven patterns from exemplary projects and authoritative style guides, with built-in countermeasures for common LLM documentation issues |
Details in references/best-practices.md.
CRITICAL: When writing documentation that Claude reads (SKILL.md, CLAUDE.md, commands, agents):
Verify what Claude already knows:
# Use haiku for cost-effective testing (gives same quality answers as sonnet)
claude --print --model haiku "Do NOT use any skills. How would you [perform task]?"
claude --print --model haiku "Do NOT use any skills. When should you [make decision]?"
Include only what Claude wouldn't naturally do:
Remove redundant content:
Testing revealed Claude knows TanStack Query/Zustand/RTL patterns but doesn't default to:
Result: 328→125 lines (-62%) by documenting only unique opinions.
When documenting unfamiliar APIs or libraries:
1. Launch researcher agent:
Use Task tool to launch researcher agent to verify [API/library] documentation
Researcher agent uses Context7 MCP to fetch official API docs and verify method signatures.
2. Read the codebase:
For internal/project APIs:
Read relevant source files to verify method signatures exist
3. State version requirements:
# Using pandas 2.0+ DataFrame.merge()# Verify this API exists in your version4. Direct to official docs: Add link to authoritative source.
Required checks before documenting code:
yaml.safe_load(), never yaml.load()Use researcher agent if uncertain about security best practices.
Example:
# Process in batches of 1000 to avoid memory exhaustion.
# Testing: smaller (100) = 3x overhead, larger (10000) = OOM on 8GB systems.
BATCH_SIZE = 1000
for batch in chunks(items, BATCH_SIZE):
process_batch(batch)
Include when relevant:
See references/best-practices.md for complete production-ready examples.
After writing documentation:
Use docs-reviewer agent to ruthlessly simplify
The agent challenges every element's necessity, asking "Would the documentation still be clear without this?"
Critical for:
Eliminates:
Before publishing:
Verification:
Content Quality:
Claude Code Docs:
claude --printResearch foundation in references/:
exemplary-projects.md - Analysis of well-documented projectsbest-practices.md - Authoritative style guide synthesisllm-pitfalls.md - LLM-specific quality issues