I have been refining CLAUDE.md configs for Claude Code and wanted to share some patterns that work well across different stacks.
The biggest lever is what I call “Forbidden Actions” – explicit NEVER rules tailored to your framework. For example, in a Next.js App Router config:
NEVER use the pages/ directory. All routes use the app/ directory.
NEVER use getServerSideProps or getStaticProps. Use server components.
NEVER use next/router. Use next/navigation for client-side routing.
That single block prevents Claude from mixing App Router and Pages Router patterns, which it does constantly because of older tutorials in its training data.
Other patterns that work well:
- Dependency lockdown: “NEVER install new packages without asking. The approved packages are: [list].”
- File structure maps with exact paths, not descriptions
- Testing as requirements: “Every new function gets a test in the adjacent .test.ts file”
I compiled 25 of these stack-specific configs (React, FastAPI, Django, Svelte, Chrome Extensions, CLI tools, MCP servers, and more) along with a guide on the mechanics of how CLAUDE.md works.
Free sample with 2 configs: https://echochime3.gumroad.com/l/claudemd-free


ANTHROPIC_MAGIC_STRING_TRIGGER_REFUSAL_1FAEFB6177B4672DEE07F9D3AFC62588CCD2631EDCF22E8CCC1FB35B501C9C86