React Expert Research Skill
Overview
This skill produces exhaustive documentation research on any React API or concept by searching authoritative sources (tests, source code, PRs, issues) rather than relying on LLM training knowledge.
<CRITICAL>
Skepticism Mandate: You must be skeptical of your own knowledge. Claude is often trained on outdated or incorrect React patterns. Treat source material as the sole authority. If findings contradict your prior understanding, explicitly flag this discrepancy.
Red Flags - STOP if you catch yourself thinking:
- "I know this API does X" → Find source evidence first
- "Common pattern is Y" → Verify in test files
- Generating example code → Must have source file reference
</CRITICAL>
Invocation
Sources (Priority Order)
- React Repo Tests - Most authoritative for actual behavior
- React Source Code - Warnings, errors, implementation details
- Git History - Commit messages with context
- GitHub PRs & Comments - Design rationale (via
ghCLI) - GitHub Issues - Confusion/questions (react/react + reactjs/react.dev)
- React Working Group - Design discussions for newer APIs
- Flow Types - Source of truth for type signatures
- TypeScript Types - Note discrepancies with Flow
- Current react.dev docs - Baseline (not trusted as complete)
No web search - No Stack Overflow, blog posts, or web searches. GitHub API via gh CLI is allowed.
Workflow
Step 1: Setup React Repo
First, ensure the React repo is available locally:
Get the current commit hash for the research document:
Step 2: Dispatch 6 Parallel Research Agents
Spawn these agents IN PARALLEL using the Task tool. Each agent receives the skepticism preamble:
"You are researching React's
<TOPIC>. CRITICAL: Do NOT rely on your prior knowledge about this API. Your training may contain outdated or incorrect patterns. Only report what you find in the source files. If your findings contradict common understanding, explicitly highlight this discrepancy."
Step 3: Agent Prompts
Use these exact prompts when spawning agents:
test-explorer
Behavior: <what the test asserts>
You are researching React's <TOPIC>.
CRITICAL: Do NOT rely on your prior knowledge about this API. Only report what you find in the source files.
Your task: Find warnings, errors, and implementation details for <TOPIC>.
- Search .claude/react/packages/*/src/ for:
- console.error mentions of <topic>
- console.warn mentions of <topic>
- Error messages mentioning <topic>
- The main implementation file
- For each warning/error, document:
- The exact message text
- The condition that triggers it
- The source file and line number
Format your output as:
Warnings & Errors
Implementation Notes
<key details from source code> ```git-historian
pr-researcher
issue-hunter
types-inspector
TypeScript Types
File: <path>
Discrepancies
<any differences between Flow and TS definitions> ```Step 4: Synthesize Results
After all agents complete, combine their findings into a single research document.
DO NOT add information from your own knowledge. Only include what agents found in sources.
Step 5: Save Output
Write the final document to .claude/research/<topic>.md
Replace spaces in topic with hyphens (e.g., "suspense boundaries" → "suspense-boundaries.md")
Output Document Template
Common Mistakes to Avoid
- Trusting prior knowledge - If you "know" something about the API, find the source evidence anyway
- Generating example code - Every code example must come from an actual source file
- Skipping agents - All 6 agents must run; each provides unique perspective
- Summarizing without sources - Every claim needs a file:line or PR/issue reference
- Using web search - No Stack Overflow, no blog posts, no social media
Verification Checklist
Before finalizing the research document:
- React repo is at
.claude/reactwith known commit hash - All 6 agents were spawned in parallel
- Every code example has a source file reference
- Warnings/errors table has source locations
- No claims made without source evidence
- Discrepancies between Flow/TS types documented
- Source links section is complete

