// Research and persist coding documentation using Perplexity AI. Use when user asks about documentation, APIs, frameworks, libraries, best practices, coding patterns, or needs to research technical topics. Always checks existing research first.
| name | research-docs |
| description | Research and persist coding documentation using Perplexity AI. Use when user asks about documentation, APIs, frameworks, libraries, best practices, coding patterns, or needs to research technical topics. Always checks existing research first. |
| allowed-tools | Read, Write, Bash, Grep, Glob |
Research coding documentation efficiently using Perplexity AI and persist findings in a structured, AI-optimized format.
research/CLAUDE.md (memory index) to see if topic was researched beforeresearch/<topic>.md with consistent formattingresearch/CLAUDE.md is a Claude Code memory file that auto-loads to provide research contextThe research/CLAUDE.md file is a Claude Code memory file that follows these best practices:
Memory Best Practices (from Claude Code documentation):
Index Entry Format:
### <Topic Name> (`<topic>.md`)
**Researched:** YYYY-MM-DD
**Status:** Active | Deprecated | Updated
**When to Use:** Specific concrete scenarios (be detailed)
**Summary:**
- Specific actionable point 1
- Specific actionable point 2
- Specific actionable point 3
This format ensures:
ALWAYS start by checking if we've researched this topic before:
# Read the research index
cat research/CLAUDE.md
Look for the topic in the research index. If found, read the existing research file:
cat research/<topic>.md
If the research exists and is recent (< 3 months old), use it. Otherwise, proceed to Step 2.
Determine the specific topic to research. Create a clean topic name:
python-asyncio, react-hooks, typescript-generics, docker-best-practicesUse the optimized research script with appropriate parameters:
# Basic documentation research
.claude/skills/research-docs/scripts/perplexity-research.sh "python asyncio best practices"
# Target specific domains
.claude/skills/research-docs/scripts/perplexity-research.sh -d "docs.python.org,realpython.com" "python async await"
# Recent documentation only
.claude/skills/research-docs/scripts/perplexity-research.sh -r month "react 19 new features"
# More comprehensive results
.claude/skills/research-docs/scripts/perplexity-research.sh -n 20 "rust ownership patterns"
Script Options:
-n, --max-results NUM: Number of results (1-20, default: 15)-r, --recency FILTER: day, week, month, year (default: year)-d, --domains LIST: Comma-separated domain list-f, --format FORMAT: structured (default), json, plainSave the research output to research/<topic>.md using this format:
# <Topic Name>
**Research Date:** YYYY-MM-DD
**Status:** Active | Deprecated | Updated
**Related Topics:** topic1, topic2, topic3
## Overview
Brief 2-3 sentence overview of the topic.
## Key Concepts
- **Concept 1**: Explanation
- **Concept 2**: Explanation
- **Concept 3**: Explanation
## Official Documentation
- [Primary Docs](<url>) - Description
- [API Reference](<url>) - Description
## Best Practices
### Do's
- ✓ Practice 1 with brief explanation
- ✓ Practice 2 with brief explanation
### Don'ts
- ✗ Anti-pattern 1 with brief explanation
- ✗ Anti-pattern 2 with brief explanation
## Common Patterns
### Pattern 1: <Name>
**Use Case:** When to use this pattern
**Example:**
```language
// Code example
Explanation: Why this works
Use Case: When to use this pattern
Example:
// Code example
Explanation: Why this works
Problem: Description of the issue
Solution:
// Correct approach
Problem: Description of the issue
Solution:
// Correct approach
// Installation or basic setup
// More complex example
Last Updated: YYYY-MM-DD Next Review: YYYY-MM-DD (3 months from research date)
### Step 5: Update research/CLAUDE.md Index
**ALWAYS update research/CLAUDE.md** with an entry for the research.
The `research/CLAUDE.md` file is a **memory file** that Claude Code automatically loads. It serves as an index of all researched topics.
**Format Guidelines** (following Claude Code memory best practices):
- ✓ **Be specific**: Include concrete details, not vague descriptions
- ✓ **Use structure**: Format as bullet points under descriptive headings
- ✓ **Stay scannable**: Use clear sections and consistent formatting
- ✓ **Update regularly**: Keep status and dates current
Add a new entry under the "Research Index" heading:
```markdown
### <Topic Name> (`<topic>.md`)
**Researched:** YYYY-MM-DD
**Status:** Active
**When to Use:** Specific scenarios where this applies (be concrete)
**Summary:**
- Key point 1 with specific detail
- Key point 2 with specific detail
- Key point 3 with specific detail
Example entry:
### Python Asyncio (`python-asyncio.md`)
**Researched:** 2025-11-18
**Status:** Active
**When to Use:** Building concurrent I/O-bound applications, async web servers, or async database operations
**Summary:**
- Use `asyncio.create_task()` for fire-and-forget, `asyncio.gather()` for concurrent execution with results
- Always use `async with` for async context managers to ensure proper cleanup
- Avoid blocking calls in async functions - use `asyncio.to_thread()` for CPU-bound work
Use the TodoWrite tool to track research progress:
[
{"content": "Check existing research in research/CLAUDE.md", "status": "completed", "activeForm": "Checking existing research"},
{"content": "Execute Perplexity search for <topic>", "status": "completed", "activeForm": "Executing Perplexity search"},
{"content": "Structure documentation in research/<topic>.md", "status": "in_progress", "activeForm": "Structuring documentation"},
{"content": "Update research/CLAUDE.md research index", "status": "pending", "activeForm": "Updating research/CLAUDE.md research index"}
]
When updating research:
**Updated:** YYYY-MM-DD - Reason for updateIf documentation becomes outdated:
Error: API key invalid
PERPLEXITY_API_KEY environment variableError: Rate limit exceeded
-n flagToo many irrelevant results
-d "official-docs.com,github.com"-r monthMissing official documentation
-d flag to target specific authoritative sourcesThe perplexity-research.sh script is located at:
.claude/skills/research-docs/scripts/perplexity-research.sh
Key Features:
Default Documentation Domains:
Override with -d flag for specific research needs.