[Feature Request]: Add Git Variable Support in CLAUDE.md

Resolved 💬 3 comments Opened May 29, 2025 by tim-watcha Closed Dec 7, 2025

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.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗