18 rules and 30 anti-patterns to stop AI coding agents from making dumb mistakes
A developer shared a skill file designed to prevent common mistakes made by AI coding tools like Claude and Cursor. It contains 18 rules, 30 anti-patterns, and checklists you can hand directly to an AI agent. It's a practical, ready-to-use guide for anyone who lets AI write or edit their code.
AI coding agents can write code fast, but left without clear instructions they often go wrong — adding code that wasn't needed, ignoring what already exists, or confidently heading in the wrong direction. This developer collected those recurring bad behaviors, labeled them 'anti-patterns', and turned them into a skill file the AI reads before starting work.
A skill file is a set of instructions the AI agent follows during a session. Typical rules include things like 'don't delete files without asking' or 'don't recreate a function that already exists'. For solo developers or small teams, this kind of guardrail makes AI assistance more predictable and less likely to create extra cleanup work.
Key points
- 30 common AI coding mistakes are listed as anti-patterns to avoid
- 18 concrete rules help limit what the AI agent is allowed to do on its own
- Checklists make it easy to verify the AI followed the rules after a task
- Works directly with agents like Claude and Cursor — just load the file
- Especially useful for solo developers who rely heavily on AI to write code
Quick term guide
- skill file
- A text file of instructions that an AI agent reads at the start of a session to guide how it behaves.
- AI coding tool
- Software that uses AI to help write, edit, or explain code.
- anti-patterns
- A named list of bad habits or mistakes to avoid — things that seem reasonable but tend to cause problems.
- AI agent
- An AI program that can inspect information and suggest what to do next.
- AI coding agents
- AI tools that can help write, edit, or organize software code.
- AI coding agent
- An AI tool that can write, edit, and run code from your instructions.
- coding agent
- An AI tool that writes or edits code from a person’s instructions.
- developers
- Developers are people who build software, apps, or websites.