claude-code
claude-code copied to clipboard
[Feature Request]: Add Git Variable Support in CLAUDE.md
Feature Request
Problem
Currently, CLAUDE.md files are static and cannot dynamically reference git-related information like the current branch name. This makes it difficult to maintain context-aware documentation that adapts to different branches or development workflows.
Proposed Solution
Add support for git variable interpolation in CLAUDE.md files using a template syntax like {{git.branch}}.
Example Usage
Input in CLAUDE.md:
* See @docs/{{git.branch}}/plan.md for current overview
Expected Output (when on branch feature/add-something):
* See @docs/feature/add-something/plan.md for current overview
Benefits
- Enables dynamic documentation that adapts to the current git context
- Reduces maintenance overhead for branch-specific references
- Improves workflow consistency across different branches
Additional Context
This would be particularly useful for teams that maintain branch-specific documentation or need to reference branch-dependent resources in their Claude Code instructions.