Menu

1 / 2

Why Your AI Coding Assistant Keeps Overengineering: 4 Rules That Actually Fix It

DEV Community·Evan-dong·6 months ago
#5brpjdxW
#rule#ai#api#code#claude
Reading 0:00
15s threshold

You ask Claude Code to add input validation. It writes an abstract class, three subclasses, and a factory method. 200 lines. You needed 5.

You ask it to fix a bug. It refactors three adjacent functions, adds type hints everywhere, and switches all single quotes to double quotes. Half the diff has nothing to do with the bug.

This isn't a you problem. It's a fundamental LLM tendency.

Andrej Karpathy — OpenAI co-founder, former Tesla AI lead — catalogued the same frustrations. In January 2026, he posted on X about four recurring failure modes in LLM-assisted coding. Someone turned those observations into a single CLAUDE.md file. Drop it in your project root, and Claude Code follows these rules automatically.

The repo: forrestchang/andrej-karpathy-skills . Currently at 97.8k stars .

Rule 1: Think Before Coding

The most common failure mode: you say "write an export function," and the model silently decides on CSV format, all fields, overwrite existing files.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.