
React Doctor
- 12k installs
- 14.3k repo stars
- Updated August 5, 2026
- millionco/react-doctor
A CLI scanner that analyzes React codebases for security, performance, correctness, and architecture issues, returning a health score and actionable diagnostics.
About
React Doctor is a CLI tool that scans React codebases for security, performance, correctness, and architecture violations, outputting a 0-100 health score. Developers run it before committing code to detect regressions via `--scope changed`, or perform full codebase cleanup with `--scope full`. It integrates a local-triage workflow that fetches a canonical playbook from https://www.react.doctor/prompts/react-doctor-agent.md, enabling rule-by-rule fixes with reviewer-tested recipes. Users can configure rule behavior via CLI flags or `doctor.config.*` / `package.json#reactDoctor` without reinstalling.
- Scans React code for security, performance, correctness, and architecture issues with a 0-100 health score
- Regression detection via --scope changed to block regressions before commit
- Fetches canonical local-triage playbook and per-rule fix recipes from react.doctor/prompts
- Configure rules via CLI (disable, set, category, ignore-tag) or config file without reinstall
- Outputs verbose mode with affected files and line numbers per rule
React Doctor by the numbers
- 11,968 all-time installs (skills.sh)
- +212 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #70 of 2,153 Testing & QA skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
react-doctor capabilities & compatibility
- Capabilities
- scan react code for security, performance, corre · calculate regression via scope changed · fetch canonical playbook from react.doctor/promp · configure rules via cli or config file · output health score and verbose diagnostics
- Use cases
- code review · testing · refactoring
- Platforms
- macOS · Windows · Linux · WSL
- Runs
- Runs locally
- Pricing
- Free
What react-doctor says it does
Scans React codebases for security, performance, correctness, and architecture issues. Outputs a 0–100 health score.
Run `npx react-doctor@latest --verbose --scope changed` and check the score did not regress.
npx skills add https://github.com/millionco/react-doctor --skill react-doctorAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 12k |
|---|---|
| repo stars | ★ 14.3k |
| Security audit | 2 / 3 scanners passed |
| Last updated | August 5, 2026 |
| Repository | millionco/react-doctor ↗ |
What it does
Scan React codebases for security, performance, and architecture issues before committing, with regression detection and health scoring.
Who is it for?
Pre-commit testing, regression detection, full codebase cleanup, and continuous rule-based code quality enforcement in React projects.
Skip if: Production deployment validation, runtime error detection, or non-React codebases.
When should I use this skill?
Finishing a feature, fixing a bug, before committing React code, or when user types /doctor or asks for scan/triage/cleanup.
What you get
Developers identify and fix security, performance, and architecture issues early, with canonical, reviewer-tested fix recipes.
- health score report
- lint and a11y diagnostics
- bundle and architecture findings
By the numbers
- Version 1.2.0
- Health score range: 0-100
- Supports three scope modes: full (default), changed, lines
Files
React Doctor
Scans React codebases for security, performance, correctness, and architecture issues. Outputs a 0–100 health score.
After making React code changes:
Run npx react-doctor@latest --verbose --scope changed and check the score did not regress.
If the score dropped, fix the regressions before committing.
For general cleanup or code improvement:
Run npx react-doctor@latest --verbose (the default --scope full) to scan the full codebase. Fix issues by severity — errors first, then warnings.
/doctor — full local triage workflow
When the user types /doctor, says "run react doctor", or asks for a full triage / cleanup pass (not just a regression check), fetch the canonical local-triage playbook and follow every step in it:
curl --fail --silent --show-error \
--header 'Cache-Control: no-cache' \
https://www.react.doctor/prompts/react-doctor-agent.mdThe playbook is the single source of truth — a scan → filter → triage → fix → validate loop that edits the working tree directly (never commits, never opens PRs). Updating the prompt at its source updates every agent on its next fetch — no skill reinstall needed.
Pair it with the matching per-rule prompts at https://www.react.doctor/prompts/rules/<plugin>/<rule>.md (fetched on demand inside the playbook) so each fix uses the canonical, reviewer-tested recipe.
Configuring or explaining rules
When the user wants to understand a rule, disagrees with one, or wants to disable / tune which rules run (not fix code), read references/explain.md and follow it. Start with npx react-doctor@latest rules explain <rule>, then apply the narrowest control via npx react-doctor@latest rules disable|set|category|ignore-tag …, which edits your doctor.config.* (or package.json#reactDoctor).
Command
npx react-doctor@latest --verbose --scope changed| Flag | Purpose |
|---|---|
. | Scan current directory |
--verbose | Show affected files and line numbers per rule |
--scope changed | Only report issues introduced vs the base branch (default: full) |
--scope lines | Only report issues on the changed lines |
--score | Output only the numeric score |
Explaining and configuring rules
Explain React Doctor rules and edit doctor.config.* safely. Use this when a user wants to understand a rule or change which rules run — not for fixing diagnostics (that is the main react-doctor skill / /doctor).
Triggers: "why did this rule fire", "I disagree with this rule", "turn this rule off", "stop flagging X", "too noisy", "disable design rules".
Workflow
1. Identify the rule key from the diagnostic (e.g. react-doctor/no-array-index-as-key). 2. Explain it before changing anything:
npx react-doctor@latest rules explain react-doctor/no-array-index-as-key3. Pick the narrowest control that matches the user's intent (see decision guide). 4. Apply it with a rules subcommand (edits your doctor.config.* or package.json#reactDoctor in place, preserving other fields and formatting). 5. Validate the change did what they wanted:
npx react-doctor@latest --verbose --diffCommands
npx react-doctor@latest rules list # every rule + its effective severity
npx react-doctor@latest rules list --configured # only what your config changed
npx react-doctor@latest rules list --category Performance # filter by category
npx react-doctor@latest rules explain <rule> # why it matters + how to configure
npx react-doctor@latest rules disable <rule> # rule never runs
npx react-doctor@latest rules enable <rule> # turn back on at its recommended severity
npx react-doctor@latest rules set <rule> warn # off | warn | error
npx react-doctor@latest rules category "React Native" off # whole category
npx react-doctor@latest rules ignore-tag design # skip a rule family (design, test-noise, …)
npx react-doctor@latest rules unignore-tag designRule references accept the full key (react-doctor/no-danger), the bare id (no-danger), or a legacy key (react/no-danger).
Decision guide
Match the control to the intent — prefer the narrowest one:
- User disagrees with one rule / it's a false positive for them →
rules disable <rule>(setsrules.<key> = "off"; the rule stops running everywhere). This is the default for "I don't want this rule". - Rule is fine but wrong severity →
rules set <rule> warnorrules set <rule> error. - A disabled-by-default rule they want on →
rules enable <rule>. - A whole area is unwanted (e.g. all React Native rules) →
rules category "<Category>" off. - A behavioral family is noisy (
design,test-noise,migration-hint) →rules ignore-tag <tag>. - Keep it locally but hide from PR comment / score / CI gate only → do NOT disable. Edit
surfacesin your config (surfaces.prComment.excludeRules,surfaces.score.excludeTags,surfaces.ciFailure.excludeCategories). The rule still shows in localclioutput.
How the layers combine: ignore.tags disables every rule carrying that tag before linting, so a tagged rule stays off even if rules/categories set it to warn/error (a rule-level override cannot re-enable a tag-ignored rule). For rules that aren't tag-disabled, rules overrides categories overrides the rule's default. surfaces is visibility-only and never changes whether a rule runs.
Config shape
Config lives in doctor.config.ts (or .js/.mjs/.cjs/.json/.jsonc), or the reactDoctor key in package.json. The rules commands edit whichever exists — TS/JS edits preserve formatting (via magicast) — and create doctor.config.json when none does, stamping $schema:
// doctor.config.ts
export default {
rules: { "react-doctor/no-array-index-as-key": "off" },
categories: { "React Native": "warn" },
ignore: { tags: ["design"] },
};Educating the user
When explaining a rule, lead with the "Why it matters" guidance from rules explain and, when they want depth, the per-rule recipe at https://www.react.doctor/prompts/rules/<plugin>/<rule>.md. Only after they understand it should you offer to disable it — many "bad" rules are catching real issues.
Related skills
How it compares
Use react-doctor for scored React diff gates; use simplify for behavior-safe readability cleanup without automated metrics.
FAQ
What does the health score measure?
A 0-100 score aggregating security, performance, correctness, and architecture rule violations in the React codebase.
How do I prevent regressions from being committed?
Run `npx react-doctor@latest --verbose --scope changed` and fix issues before committing; the playbook loops scan → filter → triage → fix → validate.
Can I customize which rules run?
Yes, via `npx react-doctor@latest rules disable|set|category|ignore-tag` to edit doctor.config.* or package.json#reactDoctor; no reinstall needed.
Is React Doctor safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.