The README for react-doctor contains just one sentence, but it's worth reading repeatedly:
"Your agent writes bad React. This catches it."
Your Agent wrote bad React code. This tool is responsible for catching it.
No fluff, no nonsense. Aiden Bai, the creator of million.js, is as direct as ever.
2,430 stars in a week, surpassing 10,000 in total. While not the most explosive numbers on GitHub Trending, considering its highly vertical positioning—checking only React code quality—this growth rate indicates a genuine demand is emerging.
What Exactly Makes AI-Generated Code "Bad"?
You might think this is an exaggeration. Today's coding agents—Claude Code, Cursor, Windsurf—are already highly capable. Their SWE-bench scores keep climbing, and the tasks they can handle grow increasingly complex.
But "getting the job done" and "writing good code" are two completely different things.
react-doctor catches issues including:
- Unnecessary re-renders (performance killers)
- Usage that violates React Hooks rules
- Overly complex component nesting
- Missing necessary error boundaries
- State management anti-patterns
Human developers make these mistakes too. But AI agents make them more frequently, for a simple reason: Agents lack "code taste".
Agents generate code based on patterns in their training data. They know "this syntax will make it work," but they don't know "this approach will make you miserable three months down the line."
What is code taste? It's an intuitive judgment of maintainability, readability, and scalability. This kind of insight comes from stepping on landmines, from getting torn apart by seniors during code reviews, and from late-night debugging epiphanies.
Agents don't have these experiences. They only have probability distributions.
But react-doctor Only Treats the Symptoms
Let me share a potentially unpopular opinion:
The emergence of react-doctor shows that our expectations for AI coding agents are flawed.
We expect Agents to write human-level good code. But their training methodology dictates they can at best reach the "average quality of good code in the training data"—and that data is full of bad code.
How many projects on GitHub actually have solid code review processes? How many have clearly written PR descriptions? How many have high enough test coverage to refactor with confidence?
Not many.
So the "normal code" Agents learn inherently contains a lot of anti-patterns. They aren't "going bad"; they are simply "reflecting the true state of the training data."
react-doctor's approach is correct—adding an automated check between Agent output and human review. But this only treats the symptoms, not the root cause.
What Is the Real Solution?
I believe there are three levels:
Level 1 (Doable now): Tools like lint + react-doctor. Automatically run quality checks before the Agent commits code to catch low-level errors. This is already a best practice.
Level 2 (Happening now): Skill-based engineering practices. Like what mattpocock/skills is doing—translating a project's coding standards, review criteria, and best practices into Agent-readable skills. The Agent "knows" what good code looks like for this project before it even starts writing.
Level 3 (Nobody has nailed it yet): Teaching Agents "code taste". This can't be solved by just adding a few rules. It requires Agents to understand code context, grasp team style preferences, and comprehend the real quality demands of specific business scenarios.
Level 3 is the hardest, but also the most valuable. Because once it's done right, it's no longer just about "catching errors," but about "writing good code."
My Take
The emergence of react-doctor is a sign of a maturing AI coding ecosystem.
When tools specifically designed to "quality-check AI-generated code" start appearing in the toolchain, it means AI coding has moved past the "novelty" phase and into the "everyday utility" stage.
I don't see this as a discouraging signal. On the contrary, it shows the developer community is starting to take AI-generated code quality seriously—not panicking about "AI replacing programmers," but pragmatically solving "AI code isn't good enough, how do we make it better?"
This is what healthy ecosystem evolution looks like.
If you're a React developer, I recommend adding react-doctor to your CI pipeline right now. Not because your Agent is bad, but because any automated code generation tool should be paired with an automated quality check tool.
It's the same principle as running a linter on human-written code. The only difference is that linters used to be optional—because human-written code at least had someone reviewing it. For Agent-written code, if no one reviews it, the linter becomes the only line of defense.
Primary Sources: