react-doctor
БесплатноБез исполняемых скриптовНе проверенReact Doctor scans a React codebase with deterministic rules and reports bugs, effect and state mistakes, performance problems, accessibility errors, security…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
React Doctor — deterministic health check for React code
Overview
React Doctor (react-doctor on npm) is a command-line scanner for React projects. It runs a fixed set of rules (no model involved) over the source and prints findings grouped by category such as Bugs, Accessibility, Performance, Security and Maintainability, each with a rule id, a file and a line. It understands Next.js, Vite, Astro, TanStack, React Native and Expo projects, and monorepos.
It suits two jobs: a one-off audit of an existing codebase, and a guardrail that checks what a coding agent or a teammate changed. It can scan only changed files or only newly introduced issues, emits a versioned JSON report, and sets a non-zero exit code when a blocking issue is found.
Instructions
Run a scan
Run from the project root (or pass a directory or file paths). No install is needed.
npx react-doctor@latest # whole project, top 3 rules shown
npx react-doctor@latest --verbose # every rule and file
npx react-doctor@latest ./apps/web # one package in a monorepo
npx react-doctor@latest src/Cart.tsx src/Checkout.tsx # selected files
The terminal output lists each finding as a severity mark (✖ error, ⚠ warning), the title, the rule id (for example react-doctor/no-fetch-in-effect) and path:line. The full list is also written to a temporary folder printed at the end; --output-dir <dir> chooses where.
The exit code is 1 when there is an error-level finding and 0 otherwise. --blocking warning makes warnings fail too; --blocking none makes the run advisory (always 0). --warning-exit-code 2 (any value from 2 to 255) gives warnings their own exit code, for CI systems that show a "warning" state.
Understand a finding
npx react-doctor@latest why src/OrderList.tsx:7 # explains the rule and shows the code
npx react-doctor@latest rules list # all rules and their severity in this config
npx react-doctor@latest rules explain exhaustive-deps
why also tells you whether a suppression comment applies. To silence one false positive, put a react-doctor-disable-next-line comment on the line above (the why output shows the exact form). Use --no-respect-inline-disables for an audit that ignores existing suppressions.
Narrow a scan to what changed
npx react-doctor@latest --scope changed --base main # only issues new compared with main
npx react-doctor@latest --scope lines --base main # only issues on changed lines
npx react-doctor@latest --staged # staged files, for a pre-commit hook
npx react-doctor@latest --json-out before.json --json . ; npx react-doctor@latest --baseline before.json
--scope accepts full (default), files, changed, lines and contextual. The base ref is auto-detected when --base is omitted. --baseline <report.json> reports only findings that are not in a previously saved JSON report, which suits legacy codebases where you want to stop new problems first.
Machine-readable output
npx react-doctor@latest --json --no-score > report.json
The report has schemaVersion (3), mode, projects, diagnostics and summary. Each diagnostic carries filePath, plugin, rule, severity, category, title, message, help, line, column and an id. Do not conclude a project is clean from an empty diagnostics list; check each project's complete and analyzedFiles fields.
Filter with --category Security (repeatable), --no-warnings for errors only, or --project web,admin for named workspaces.
Configure rules
Create doctor.config.ts (or .js, .mjs, .json, or a reactDoctor key in package.json) in the project root. CLI flags override it. For quick changes use the CLI instead of editing by hand:
npx react-doctor@latest rules set no-array-index-as-key off
npx react-doctor@latest rules category Accessibility error
npx react-doctor@latest rules ignore-tag design
Add it to the agent workflow and CI
npx react-doctor@latest install # installs the react-doctor skill for detected coding agents, optional git hook, "doctor" script
npx react-doctor@latest ci install # sets up a pull-request scan in CI
Both commands change files in the repository (agent skill files, package.json, workflow files). Run them only when the user asked for the setup, and review the diff afterwards.
Runtime performance trace
npm run dev & # your app on its own port
npx react-doctor@latest scan http://localhost:5173
scan <url> opens Chrome, records a DevTools performance trace of one interaction and waits for you to press Enter. It needs a person at a terminal, so an agent should leave it to the user.
Network use and privacy
By default the CLI sends crash reports and anonymous usage data, calls a score API, and runs a dependency supply-chain check backed
Установить react-doctor в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл react-doctor?
React Doctor scans a React codebase with deterministic rules and reports bugs, effect and state mistakes, performance problems, accessibility errors, security issues and maintainability hotspots. Use when the user asks to audit a React, Next.js, Vite, Expo or React Native project, check what an AI agent wrote for React mistakes, gate pull requests on React issues, or says "run react-doctor", "scan my React app", "why did this rule fire", "fix useEffect problems".
Как установить скилл react-doctor?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл react-doctor запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic