Skip to content

React Doctor

Actions

About

Scan React codebases for security, performance, and correctness issues
react-doctor@0.0.38
Latest
Star (10.6K)
React Doctor

version downloads

Your agent writes bad React, this catches it.

React Doctor deterministically scans your codebase and finds issues across state & effects, performance, architecture, security, and accessibility.

Works for all React frameworks and libraries - Next.js, Vite, TanStack, React Native, Expo, you name it.

Install

1. Quick start

Run this at your project root to get an audit.

npx react-doctor@latest
Main.mp4

2. Install for agents

Once you have an audit, you can install the skill for your coding agent to learn from the issues and fix them in the future.

npx react-doctor@latest install

Works with Claude Code, Cursor, Codex, OpenCode, and many more.

npx react-doctor@latest install --agent-hooks

This currently installs project hooks for Claude Code and Cursor that run after agent file edits and feed findings back without blocking tool calls.

3. Run in CI (GitHub Actions) for your team

Add a workflow to scan every pull request and leave findings where reviewers already look:

name: React Doctor

on:
  pull_request:

permissions:
  contents: read
  pull-requests: write

jobs:
  react-doctor:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - uses: millionco/react-doctor@main
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          diff: ${{ github.base_ref }}
          fail-on: error
          annotations: true

diff keeps CI focused on files changed in the PR, annotations shows findings inline in GitHub's Files changed view, and github-token enables a sticky React Doctor PR comment with the score and scan output. Use fail-on: warning for a stricter gate, or fail-on: none while introducing React Doctor to an existing codebase.

Contributing

Issues are welcome!

MIT-licensed.

React Doctor is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Scan React codebases for security, performance, and correctness issues
react-doctor@0.0.38
Latest

React Doctor is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.