react-doctor
What it does
This skill runs a health scan on a React codebase and lists each issue with its file name and line number. It is for developers who want their React app to be safer, faster and easier to maintain.
When to use it
- ✓When you want a health check on a React project before a release.
- ✓When a React screen feels slow or re-renders too often and you need to find out why.
- ✓When you are reviewing React code and want a score to track your improvements.
Skill link
https://github.com/PostHog/posthog/blob/master/.agents/skills/react-doctor/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Scan my React app for problems and fix the most serious ones first.”
5 new skills a week. 1 minute to read.
How it works
It runs a scanner from the project folder that checks dozens of rules, such as hardcoded secrets, poor effects and heavy imports. The AI fixes the most serious items first, then runs the scan again to confirm the score went up.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
React Doctor
Scans your React codebase for security, performance, correctness, and architecture issues. Outputs a 0-100 score with actionable diagnostics.
Usage
npx -y react-doctor@latest . --verbose
Workflow
- Run the command above at the project root
- Read every diagnostic with file paths and line numbers
- Fix issues starting with errors (highest severity)
- Re-run to verify the score improved
Rules (47+)
- Security: hardcoded secrets in client bundle, eval()
- State & Effects: derived state in useEffect, missing cleanup, useState from props, cascading setState
- Architecture: components inside components, giant components, inline render functions
- Performance: layout property animations, transition-all, large blur values
- Correctness: array index as key, conditional rendering bugs
- Next.js: missing metadata, client-side fetching for server data, async client components
- Bundle Size: barrel imports, full lodash, moment.js, missing code splitting
- Server: missing auth in server actions, blocking without after()
- Accessibility: missing prefers-reduced-motion
- Dead Code: unused files, exports, types
Score
- 75+: Great
- 50-74: Needs work
- 0-49: Critical
FAQ
What score should I aim for?
A score of 75 or higher is rated great, 50 to 74 needs work, and anything below 50 is critical.
Does the AI fix the problems on its own?
It works through the findings from the most serious down, makes the fixes, and runs the scan again to check the result.
Do I need to install anything first?
The scanner runs through npx, so you need Node.js on your computer. The command fetches the latest scanner each time it runs.
Details
Original description by the author
Diagnose and fix React codebase health issues. Use when reviewing React code, fixing performance problems, auditing security, or improving code quality.
repo: PostHog/posthog
Popularity
- GitHub stars
- 41k
- Ranking position
- #6816
- License
- —
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
depot-ci
41kHelps your agent set up and run Depot CI workflows, a GitHub Actions alternative, including migrating existing workflows and reading run logs.
depot-container-builds
41kHelps your agent build Docker images on Depot's remote builders, including multi-platform images, pushing to registries, and fixing build failures.
depot-github-runners
41kHelps your agent move GitHub Actions jobs to Depot-managed runners, choosing runner sizes and labels, and troubleshooting runner setup issues.
editing-agents-md
41kHelps your agent decide whether a rule belongs in an AGENTS.md or CLAUDE.md file, and write it so it sticks without bloating the file.
Similar skills
angular-developer
280kHelps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
frontend-a11y
280kHelps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
frontend-patterns
280kHas your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.