Add .claude/rules/my.md to .gitignore.
Claude Code officially provides CLAUDE.local.md for personal project overrides (gitignored, auto-loaded). But my.md is a better convention.
my.md — instantly clear that this is your personal file. No ambiguity.CLAUDE.local.md — what does “local” mean? Local machine? Local branch? You have to know the convention to understand it.Your personal rules are usually short — things like “reply in Japanese” or “use this commit format.” A root-level CLAUDE.local.md feels like overkill for a few one-liners. A small file in rules/ matches the actual granularity of what you’re writing.
With my.md in .claude/rules/, your personal rules live alongside other rule files — team-conventions.md, code-style.md, and my.md. The structure tells the story at a glance: team rules + your rules, all in one place with consistent granularity.
Some suggest using @import in CLAUDE.md to include a personal file (e.g., @~/.claude/my-preferences.md) as an alternative to CLAUDE.local.md. But this has a fundamental problem: where do you write the @import line? If you add it to the shared CLAUDE.md, it gets committed. If you add it to CLAUDE.local.md, you might as well write your rules there directly.
With my.md, there’s nothing to wire up. Files in .claude/rules/ are auto-loaded — no import lines, no indirection, and no worktree issues since rules are picked up from every worktree automatically.
Just two steps for any project:
.claude/rules/my.md to .gitignore.claude/rules/my.mdThat’s it. Your rules are automatically loaded by Claude Code, kept out of version control, and unmistakably yours.
Clone this repo (or just copy the .gitignore) and start writing your own my.md.