$HOME in Git: One Config for Claude Code

How to stop copying Claude Code settings between projects

Multiple projects. Each with its own CLAUDE.md, its own rules. You improve something in one place - you want it elsewhere. Copy. Improve there. Copy back. Round and round.

At some point I had a mess of different versions of the same rules scattered across a dozen projects. The copy-paste circus was annoying, but I kept putting it off.

During the New Year holidays, I decided to fix it.

The Solution

Moved everything to my home directory ~/.claude/. One config for all projects.

Yes, I’m now coupled to my home directory structure. But that structure hasn’t changed in years - ~/my/ for projects, ~/education/ for learning, ~/family/ for family stuff. Risk is minimal.

Structure

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
~/.claude/
  CLAUDE.md           # Core principles (task confirmation, formatting)
  HOME_MAP.md         # Home directory map for navigation

  rules/              # Rules (auto-loaded)
    architecture.md   # Architecture principles
    coaching-layer.md # Coaching questions
    text-dna.md       # Writing style
    home-navigation.md # Context detection by keywords
    projects/         # Project-specific rules
      aitrader.md     # Rules for aitrader

  commands/           # Slash commands
    ms-todos.md       # /ms-todos - task list
    ms-add-note.md    # /ms-add-note - add note
    ...

  skills/             # Skills
    blog-writing/     # Blog post writing
    go-review/        # Go code review
    social-content/   # Social media content

  agents/             # Custom agents
    go-reviewer.md    # Go code reviewer

  hooks/              # Hooks
    session-logger.py # Session logging

How Navigation Works

The key file is HOME_MAP.md. It’s a map of the entire home directory with context detection rules.

Claude sees keywords in your request and knows which directory to work in:

  • aitrader, archlint, blog -> ~/my/
  • course, book, learning -> ~/education/
  • memory, remember, mission -> ~/my/org-roam/

If context is ambiguous - it asks.

Project-Specific Rules

Need specific rules for a project? Add them to rules/projects/. For example, aitrader.md contains:

  • How to run the collector (without proxy for Tinkoff API)
  • Test commands
  • Project specifics

These rules load globally but apply only when working in the aitrader context.

Git

Everything under git. One repository, one history.

.gitignore is large - it excludes almost everything that shouldn’t be versioned: credentials, caches, Downloads, Documents, Library, .ssh. But everything else - configs, .claude/, dotfiles - is tracked. Planning to add private repos as submodules, so one git clone restores the entire home directory.

No more copying between projects. Improve a rule once - it works everywhere.

Result

Before: a dozen projects with scattered CLAUDE.md files, constant copying, different versions of the same thing.

After: one ~/.claude/, structured rules, git for versioning. Improve once - works everywhere.

Downside: tight coupling to home directory structure. For me it’s not a problem - the structure is stable.

Built with Hugo
Theme Stack designed by Jimmy