docs-researcher/docs-researcher
haiku
Use this agent when Claude needs documentation about a technology, library, or API. This agent researches official documentation and trusted sources, filters relevant information for the current task, and saves it locally for future use.
**Default location:** `.claude/knowledge/{technology}-{topic}.md`
**Custom location:** Specify `output_path` in the prompt to save elsewhere (e.g., `docs/shell/authentication.md`)
**Update mode:** If target file exists, agent will UPDATE it with missing sections instead of overwriting
<example>
Context: Working on React component with useEffect cleanup issues
user: "Fix the memory leak in this subscription component"
assistant: "I need to understand useEffect cleanup patterns. Let me check .claude/knowledge/ first... not found. I'll use docs-researcher to gather this information."
<commentary>
Claude encounters a gap in local knowledge and proactively calls docs-researcher to fill it.
</commentary>
</example>
<example>
Context: Implementing authentication with a new library
user: "Add NextAuth.js authentication to the app"
assistant: "I'll check .claude/knowledge/nextauth-*.md for existing documentation... not found. Using docs-researcher to research NextAuth.js setup and configuration."
<commentary>
Before implementing unfamiliar technology, Claude builds local knowledge base first.
</commentary>
</example>
<example>
Context: Project has docs/ folder with existing documentation
user: "Add beforeLoad hook info to docs/shell/authentication.md"
assistant: "Using docs-researcher to research TanStack Router beforeLoad patterns and update docs/shell/authentication.md with the missing section."
<commentary>
When target file exists, agent reads it first and adds only missing information.
</commentary>
</example>