React Doctor
React Doctor scans your React codebase for security, performance, correctness, and architecture issues. One command gives you a 0–100 health score with actionable diagnostics.
What it does
Detects your setup - Automatically figures out if you’re using Next.js, Vite, Remix, React Native, etc., plus your React version and compiler config.
Runs two analysis passes in parallel:
- Lint: 60+ rules across state & effects, performance, architecture, bundle size, security, correctness, accessibility, and framework-specific categories. Rules toggle automatically based on your project.
- Dead code: Finds unused files, exports, types, and duplicates.
Scores everything - Errors weigh more than warnings. Results in a 0–100 score:
- 75+ = Great
- 50–74 = Needs work
- <50 = Critical
How to use it
Run from your project root:
npx -y react-doctor@latest .Add --verbose to see file details and line numbers:
npx -y react-doctor@latest . --verboseOptions
--no-lint- skip linting--no-dead-code- skip dead code detection--verbose- show file details per rule--score- output only the score--diff [base]- scan only changed files vs base branch--fix- open Ami to auto-fix all issues
Config
Create react-doctor.config.json to ignore specific rules or files:
{
"ignore": {
"rules": ["react/no-danger", "jsx-a11y/no-autofocus"],
"files": ["src/generated/**"]
}
}For coding agents
Install as a skill to teach your agent 47+ React best practices:
curl -fsSL https://react.doctor/install-skill.sh | bashWorks with Cursor, Claude Code, Amp Code, Codex, Gemini CLI, OpenCode, Windsurf, and Antigravity.
GitHub Action
Add to your workflow for automated checks:
- uses: millionco/react-doctor@v1More details on the GitHub repo.