Skip to content
Skillpedia
Websites & UI (frontend)41k · #6816

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.md

Copy 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

Use this skill to help me: https://github.com/PostHog/posthog/blob/master/.agents/skills/react-doctor/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

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

  1. Run the command above at the project root
  2. Read every diagnostic with file paths and line numbers
  3. Fix issues starting with errors (highest severity)
  4. 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

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills