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
CLAUDE_PRINT_COMMAND: claude --print --model haikuRESEARCHER_AGENT: researcherDOCS_REVIEWER_AGENT: docs-reviewerDetails 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_COMMAND "Do NOT use any skills. How would you [perform task]?"
$CLAUDE_PRINT_COMMAND "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` 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 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.
$DOCS_REVIEWER_AGENTAfter writing documentation:
Use `$DOCS_REVIEWER_AGENT` 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:
$RESEARCHER_AGENT, codebase read, or official docs)Content Quality:
Claude Code Docs:
$CLAUDE_PRINT_COMMAND$DOCS_REVIEWER_AGENT agent for ruthless simplificationResearch foundation in references/:
exemplary-projects.md - Analysis of well-documented projectsbest-practices.md - Authoritative style guide synthesisllm-pitfalls.md - LLM-specific quality issues