React Doctor CLI

A CLI that scans React code without a model for state, performance, security and accessibility, gives a 0–100 score and installs a skill for agents

  • 15,036 ★ on the repository
  • Last commit
CLI

Extended access

Why this level

  • The commands take `react-doctor@latest` from npm and run the package code in your project
  • By default the program sends crash reports and anonymous usage data
  • The `/doctor` skill loads a playbook from an external site and edits files in the working tree from it
All reasons and checks

millionco/react-doctor

Install

Manual install

npx react-doctor@latest

Run it from the project root and it scans immediately, no installation needed.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The commands take `react-doctor@latest` from npm and run the package code in your project
  • By default the program sends crash reports and anonymous usage data
  • The `/doctor` skill loads a playbook from an external site and edits files in the working tree from it

This is third-party code. Review the repository files before installing.

What it does

React Doctor is a command-line program that runs deterministic checks on a React project and reports problems with state and effects, performance, architecture, security, accessibility and maintainability. It supports projects on Next.js, Vite, Astro, TanStack, React Native and Expo. `npx react-doctor@latest` scans the project and prints a code health score from 0 to 100. `--verbose` shows files and lines for each rule, `--scope changed` keeps only problems that appeared against the base branch, and `--scope lines` only problems on changed lines. `npx react-doctor@latest install` copies the `react-doctor` skill into the folders of the agents you choose. It tells the agent to run `npx react-doctor@latest --verbose --scope changed` after React edits and check the score did not drop, and if it did, fix the regressions before committing. On a `/doctor` request the skill downloads a detailed triage and fix playbook from react.doctor, which edits files in the working tree but never commits or opens pull requests. A `design` subcommand runs a focused UI check. Separate commands cover the rest. `npx react-doctor@latest ci install` sets up a check on every pull request, and `npx react-doctor@latest scan http://localhost:3000` records a Chrome DevTools performance trace while you work with a running app. Rules and settings live in `doctor.config.ts`.

Who it is for. For React and React Native developers who let an agent write code and want typical mistakes caught automatically before a commit.

Good fit when

  • An agent finished a React feature and you want to check that code quality did not get worse
  • You want an overall project health score and a list of problems by severity
  • You want every pull request checked and only the problems it introduced shown
  • A React interface needs a check of typography, accessibility, animation and composition
  • You need a performance trace of a running app to find extra re-renders

Not a fit when

  • The project is not React: the rules target React and its ecosystem and will not fit Vue or Angular
  • You want to use the code or reports as data for training or evaluating AI models: the license requires written permission for that
  • You want to offer the program to third parties as a paid hosted service or commercial API: that also requires the owner's permission
  • You cannot download fresh versions from the network: the commands use `react-doctor@latest`, and the `/doctor` skill loads a playbook from react.doctor
  • You need a full security audit: the program catches typical problems and does not replace a review

Example request

Run React Doctor with `--scope changed` and fix all the errors it found so the score does not drop

Limitations

The license is a modified MIT. Without the owner's written permission you may not use the code or derivatives as training, fine-tuning or evaluation data for AI models or as input to automated model-improvement pipelines, nor sell the program or offer it as a paid hosted service. The address founders@million.dev is given for requesting permission. The authors state that they made no other changes to the standard MIT license.

The program collects crash reports and anonymous usage data. You can opt out with the `--no-telemetry` flag. The description of data collection is on react.doctor.

On a `/doctor` request the `react-doctor` skill downloads a playbook from react.doctor and fetches per-rule prompts when needed, so the agent's behavior depends on what those pages contain at the time of the request.

The package is at version 0.9.18.

In `customRulesOnly` mode only the rules set to `"warn"` or `"error"` in `rules` run; the others and the React Compiler plugin stay off.

How to disable. If the package was added to the project, remove it with your package manager, for example `npm uninstall react-doctor`. Delete the copied `react-doctor` skill from the agent's skills folder, and from the project remove the `doctor.config.ts` file, the CI workflow and the git or agent hooks if you installed them. A run through `npx` leaves only the npm cache in the user's home folder.

FAQ

What does the 0 to 100 score show?

The overall health of the code according to deterministic checks. The skill uses it as a checkpoint: after edits the score must not drop, otherwise the agent fixes regressions before committing.

Does the program use a neural network?

No, the checks are deterministic and do not depend on a model. An AI agent is needed only to fix the problems found, following the skill.

Which agents does the skill install work with?

The project description names Claude Code, Cursor, Codex and OpenCode. The repository also has a plugin manifest for Cursor.

What does the design subcommand do?

`npx react-doctor@latest design --verbose` runs only the rules tagged as design: interface composition, typography, interaction, accessibility and motion, including rules that stay off in a general scan.

How do I record a performance trace?

Start the app and run `npx react-doctor@latest scan http://localhost:3000`. The program records a Chrome DevTools trace while you work with the page.

Discussion

No questions or reviews yet.

CLI tools

A CLI that lets an agent inspect a running React app: component tree, props, state, hooks and render profiling

CLIExtended access251Repository stars

Annotation toolbar for React pages: click an element to hand the agent its selector and context, plus skills for setup and an autonomous UI critique

SkillExtended access5KRepository stars
Official

Connects an agent to a running Next.js 16+ dev server: errors, routes, logs and docs for your installed version

MCP serverExtended access832Repository stars
Editors’ pick

Vercel skills: React and Next.js performance, UI checks by guidelines, React Native, component composition, and deployment

SkillExtended access32.8KRepository stars10Installs in 30 days
Official

A workspace for Claude Code: ten commands lead from a product idea to React screens and a handoff package with ready prompts for implementation

WorkflowExtended access1.9KRepository stars

An MCP server and skill for interfaces: 31 design systems for shadcn/ui, UI and UX principles and accessibility review for agent-written code

MCP serverExtended access518Repository stars

README in short

The project description opens with the list of check areas and supported environments, then gives four steps: run a scan, install the skill for agents, connect CI and tune rules in `doctor.config.ts`. Separate sections cover recording a performance trace and data collection. The code is split into packages: core, API, plugins for oxlint and ESLint, evaluation and fuzz-testing sets. A GitHub Action and a document on writing your own rule sit separately.

README badge

Original SKILL.md

---
name: react-doctor
description: Use when finishing a feature, fixing a bug, before committing React code, or when the user types `/doctor`, asks to scan, triage, or clean up React diagnostics.
version: "1.2.0"
---

# 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.

## For a focused UI design audit:

Run `npx react-doctor@latest design --verbose`. This selects only design-tagged UI composition, typography, interaction, accessibility, and motion rules.

Report a problem

Foxx AIReact Doctor
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.