5 hacks
When Claude repeats a project gotcha, end your prompt with an instruction to write a CLAUDE.md rule so it never happens again.
Install the GitHub app and mention @claude in review comments so corrections become durable CLAUDE.md rules for every future session.
Keep the root CLAUDE.md short and drop domain-specific CLAUDE.md files under paths like src/db/ so Claude loads them only when it works in that area.
Use /init to generate a starter CLAUDE.md, then delete anything inaccurate or obvious before committing.
Put a single `@AGENTS.md` import in CLAUDE.md so Claude Code and other agent tools share the same project instructions without symlink confusion.
Put domain-specific instructions in path-scoped `.claude/rules/` so they load only when Claude touches matching files.
Shift specialized playbooks into on-demand skills so every session does not pay for instructions you rarely need.
Trim project memory to under ~200 lines so Claude follows critical rules instead of drowning them in noise.
When a skill hits an edge case, append it to a gotchas section in that skill rather than to CLAUDE.md. The lesson then loads only when the skill runs.
Enable /memory auto-memory so Claude writes durable notes about build commands, corrections, and patterns that reload on every new session.
Use the bundled /doctor skill to find duplicate local memory, unused MCP/plugins, and slow hooks eating budget.
Declare a Compact Instructions section in CLAUDE.md so both manual /compact and autocompact preserve the project’s critical decisions by default.
Keep personal shortcuts and machine-specific notes in CLAUDE.local.md (gitignored) instead of polluting the shared CLAUDE.md.
"Never add comments" in CLAUDE.md plus "make this readable" in your prompt is a contradiction Claude has to resolve before it writes a line. Find those pairs and pick one.
Most CLAUDE.md lines exist to correct a model that no longer makes that mistake. Delete them after an upgrade and re-add only the ones a failure proves you need.