$ recombobulate _
home / tips / add-a-bad-patterns-section-to-claudemd
0

Add a "Bad Patterns" Section to CLAUDE.md

bagwaa @bagwaa · Mar 25, 2026 · Configuration
add-a-bad-patterns-section-to-claudemd

Telling Claude what to build only gets you halfway there. The real productivity unlock is also telling it what you never want to see.

Add a ## Bad Patterns section to your CLAUDE.md with concrete code examples you always reject:

## Bad Patterns

Never do these:
- Don't use `any` in TypeScript without a type guard
- Never import from `src/legacy/utils` -- use `src/utils` instead
- Don't use raw SQL strings -- always use the query builder
- Never define business logic inside a controller
- Don't use `console.log` for error handling -- use the logger service

Claude reads CLAUDE.md at the start of every session, so it absorbs your no-go list before writing a single line. One developer reported dropping their suggestion rejection rate from around 40% to around 10% after adding this section -- same model, far fewer back-and-forth corrections.

The existing ## Rules or ## Guidelines sections tell Claude what to aim for. A dedicated ## Bad Patterns section tells it what to avoid entirely. Together they create a much tighter feedback loop than prompting alone.

The more specific the example, the stronger the rule. Vague guidance gets vague compliance.

Positive rules set the target -- negative rules remove the misses.


via @gagansaluja08

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Switch to the Stable Update Channel with autoUpdatesChannel

The autoUpdatesChannel setting pins Claude Code to a stable release track that skips versions with major regressions.

bagwaa @bagwaa · 1 hour ago
0
Set Claude's Response Language with the language Setting

The language setting makes Claude respond in your preferred language by default, across every session and project.

bagwaa @bagwaa · 1 hour ago
0
Customize or Remove Claude's Git Attribution with the attribution Setting

The attribution setting lets you customize or completely remove Claude's Co-Authored-By trailer from git commits and pull requests.

bagwaa @bagwaa · 1 hour ago