Install React Doctor for coding agents
Install the /react-doctor skill so your coding agent scans changed React code before it finishes a task.
Run a local scan from the project root:
npx react-doctor@latest --verbose --scope changedThis reports issues introduced on your branch. Review the output before installing the agent workflow.
Install the agent skill
Run the installer from the project root:
npx react-doctor@latest installReact Doctor detects supported coding agents and asks where to install the skill. It can also add a non-blocking pre-commit hook.
With --yes, React Doctor installs the skill for every detected agent. Native Claude Code and Cursor hooks still require --agent-hooks.
Use --dry-run to preview every file change before installation.
Add continuous integration
npx react-doctor@latest ci installThe dedicated CI command writes a GitHub Actions workflow or a GitLab CI scaffold. It does not reinstall the coding-agent skill. See GitHub Actions setup.
For CircleCI, Jenkins, Buildkite, or another provider, add the CLI command directly to the job. See Other CI providers.
Optional agent and hook add-ons
The installer can surface findings before CI runs:
- Git pre-commit hook: logs staged-file findings on every commit without blocking it, by running
react-doctor --staged --blocking warning. It reuses an existing hook manager when present, or falls back to.git/hooks/pre-commit. - Coding-agent skill: teaches Claude Code, Cursor, Codex, OpenCode, and other detected agents to run React Doctor after React changes.
- Native agent hooks: run after the agent edits files and feed findings straight back, so it self-corrects mid-session. Off by default; skip them to use less context.
The Git hook reuses these managers when it finds one:
- Existing
core.hooksPath - Husky
- Vite Plus
- simple-git-hooks
- Lefthook
- pre-commit
- Overcommit
- Yorkie
- ghooks
- git-hooks-js
- pretty-quick
Install options
Pass flags to skip the prompts, for CI or dotfiles:
--yes: install for every detected agent without prompting--agent-hooks: also install the native hooks--dry-run: preview what would be installed without writing files