react-doctor

Validates changed React code with oxlint-based react-doctor and verifies zero new error findings via JSON report parsing.

Updated Mar 4, 2026
One-click install
npx skills add https://github.com/gmolike/Claude-Template --skill react-doctor-gmolike
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: react-doctor
Source: https://github.com/gmolike/Claude-Template/tree/main/.claude/skills/react-doctor
Command: npx skills add https://github.com/gmolike/Claude-Template --skill react-doctor-gmolike

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires react-doctor.

What problem does it solve? React-specific lint gates often fail silently: exit codes can report success even when no scan actually ran, and remote score endpoints leak project data off the machine. This Skill defines a fail-closed advisory gate for React changes that proves scan coverage from a local JSON report instead of trusting exit codes. ## Core Features & Use Cases - Changed-scope scanning: Runs react-doctor (pinned to version 0.9.1) with --scope changed --base <target-branch> so only modified files are checked against the target branch. - JSON-based evidence: Requires ok !== false, complete !== false, filesScanned > 0, and newErrors === 0 from .react-doctor.json, catching documented fail-open paths like --blocking none, timeout truncation, and exit-0-without-JSON bugs. - Privacy enforcement: Mandates --no-score and --no-supply-chain so no project fingerprint is sent to remote score endpoints, Socket.dev, or Sentry. - Use Case: After finishing a React feature in apps/web, run the gate to confirm zero new error-severity findings on the changed scope before committing, with a RED-verify step proving the gate actually turns red on a known violation. ## Quick Start Run the react-doctor advisory gate on my changed React files against the main branch and confirm from the JSON report that zero new error findings were introduced.

Frequently Asked Questions about react-doctor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I lint only changed React files against a target branch?

Run react-doctor with --scope changed --base <target-branch> so only files modified relative to that branch are scanned. Combine with --blocking error so only error-severity findings count as blockers while warnings stay advisory.

Why should I not trust the react-doctor exit code alone?

The exit code has documented fail-open paths: --blocking none short-circuits to exit 0, --max-duration truncation aborts the scan with exit 0, and a known issue exits 0 without writing JSON. Always verify ok, complete, filesScanned > 0, and newErrors === 0 in the JSON report.

Does react-doctor send project data to external servers?

Yes, by default the score endpoint and Socket.dev supply-chain check send data externally on every run. Passing --no-score and --no-supply-chain keeps the scan fully local and prevents the project fingerprint from leaving the machine.

Does the no-barrel-import rule conflict with FSD alias imports?

No. The no-barrel-import rule only checks relative paths starting with a dot, so Feature-Sliced Design alias imports like @features/* and @entities/* pass cleanly. Problematic categories can be disabled selectively via react-doctor.config.json.

How do I verify a lint gate actually fails on violations?

Perform a RED-verify: deliberately introduce a known error-severity finding, run the gate, and confirm it reports newErrors > 0 and turns red. Then remove the finding and confirm it returns to green, proving the gate is wired correctly.