Skip to content

Use CLAUDE.local.md instead of CLAUDE.md for Claude Code project context#78

Open
rickalee wants to merge 1 commit into
10up:mainfrom
rickalee:feature/use-claude-local-md
Open

Use CLAUDE.local.md instead of CLAUDE.md for Claude Code project context#78
rickalee wants to merge 1 commit into
10up:mainfrom
rickalee:feature/use-claude-local-md

Conversation

@rickalee

@rickalee rickalee commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Closes #77

Summary

  • Changes the Claude Code agent target to write site context into CLAUDE.local.md instead of CLAUDE.md
  • Updates .gitignore entry from CLAUDE.md to CLAUDE.local.md
  • Adds a one-time migration (migrateClaude) that removes any existing Agent Tools marker block from CLAUDE.md on the next enable or regenerate — leaving the rest of the file intact

Why

CLAUDE.local.md is Claude Code's native file for machine-specific, uncommitted project context. It loads automatically alongside CLAUDE.md without interfering with it. Writing to CLAUDE.md causes friction for teams that have a committed CLAUDE.md with shared project instructions — either the add-on appends to it (requiring a gitignored workaround) or users reach for git update-index --skip-worktree.

Test plan

  • Enable Agent Tools on a fresh site with no CLAUDE.md → context appears in CLAUDE.local.md, not CLAUDE.md
  • Enable Agent Tools on a site that already has a committed CLAUDE.mdCLAUDE.md is not modified
  • Enable Agent Tools on a site that has an old-style CLAUDE.md with marker block → block is removed from CLAUDE.md and written to CLAUDE.local.md
  • Disable Agent Tools → CLAUDE.local.md is cleaned up; CLAUDE.md unchanged
  • Regenerate config → same migration behaviour as enable

🤖 Generated with Claude Code

Claude Code's CLAUDE.local.md is the correct home for machine-specific,
uncommitted project context — it sits alongside a committed CLAUDE.md
without interfering with it. This change updates the claude agent target
to write there instead, and adds a one-time migration that strips any
existing Agent Tools marker block from CLAUDE.md on the next enable or
regenerate.

Fixes 10up#77
@rickalee rickalee requested a review from christianc1 as a code owner June 1, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use CLAUDE.local.md instead of CLAUDE.md for Claude Code project context

1 participant