claude-code - 💡(How to fix) Fix Feature: Support .claude/rules.local/ for project-specific gitignored rules [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#53333Fetched 2026-04-26 05:18:26
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Author
Timeline (top)
commented ×1labeled ×1

Claude Code already has a consistent pattern for local (gitignored) overrides at every level — except for the rules directory:

File/DirectoryScopeCommitted?
CLAUDE.mdProject instructions✅ Yes
CLAUDE.local.mdProject instructions❌ No (gitignored)
.claude/rules/Project rules✅ Yes
.claude/rules.local/Project rulesMissing
.claude/settings.jsonProject settings✅ Yes
.claude/settings.local.jsonProject settings❌ No (gitignored)

Root Cause

The pattern is already established in the codebase. This is just the missing piece that completes the symmetry.

Fix Action

Fix / Workaround

There's no way to have project-specific rules that stay local and don't get committed to the repo. The only current workaround is putting everything in CLAUDE.local.md, which mixes instructions with rules and doesn't support the file-path scoping that .claude/rules/ provides.

RAW_BUFFERClick to expand / collapse

Summary

Claude Code already has a consistent pattern for local (gitignored) overrides at every level — except for the rules directory:

File/DirectoryScopeCommitted?
CLAUDE.mdProject instructions✅ Yes
CLAUDE.local.mdProject instructions❌ No (gitignored)
.claude/rules/Project rules✅ Yes
.claude/rules.local/Project rulesMissing
.claude/settings.jsonProject settings✅ Yes
.claude/settings.local.jsonProject settings❌ No (gitignored)

Problem

There's no way to have project-specific rules that stay local and don't get committed to the repo. The only current workaround is putting everything in CLAUDE.local.md, which mixes instructions with rules and doesn't support the file-path scoping that .claude/rules/ provides.

Proposed Solution

Add support for .claude/rules.local/ — a directory that behaves exactly like .claude/rules/ but is automatically gitignored, just like CLAUDE.local.md and .claude/settings.local.json.

This would allow developers to have personal, project-scoped rules (e.g., local DB paths, personal preferences, machine-specific config) without polluting the shared repo config.

Why This Matters

The pattern is already established in the codebase. This is just the missing piece that completes the symmetry.

extent analysis

TL;DR

Add support for a .claude/rules.local/ directory that is automatically gitignored to store project-specific, local rules.

Guidance

  • Introduce a new directory .claude/rules.local/ to mirror the structure and functionality of .claude/rules/ but for local, non-committed rules.
  • Ensure .claude/rules.local/ is added to the .gitignore file to prevent accidental commits.
  • Update the code to recognize and apply rules from .claude/rules.local/ in the same manner as .claude/rules/.
  • Consider adding documentation to reflect the new capability and its usage.

Example

No specific code example is provided due to the lack of technical implementation details in the issue.

Notes

The solution assumes that the existing pattern for local overrides is well-established and understood within the codebase. The introduction of .claude/rules.local/ aims to complete the symmetry of local configuration options without altering the fundamental approach to configuration management.

Recommendation

Apply workaround by introducing .claude/rules.local/ and updating the codebase to support it, as this directly addresses the identified gap in functionality without requiring an upgrade to a potentially non-existent fixed version.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Feature: Support .claude/rules.local/ for project-specific gitignored rules [1 comments, 2 participants]