CLAUDE.md frontmatter is stripped before showing to model
Status Closed — not planned
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 3 comments · opened Dec 3, 2025 · closed Dec 3, 2025
Summary
CLAUDE.md YAML frontmatter is parsed and stripped before being injected into the model's context. Unrecognized fields are silently discarded.
Current behavior
Given this CLAUDE.md:
---
depends:
- skills/subtask
---
# Skills Directory
The model only sees:
# Skills Directory
The frontmatter is parsed (function yF in the codebase), but only paths: is consumed (for the unreleased .claude/rules/ feature). Everything else is thrown away.
Expected behavior
Unrecognized frontmatter fields should be passed through to the model's context, not stripped. This would allow:
- Users to define custom directives the model can interpret
- Forward compatibility—new conventions can emerge without Claude Code updates
- The model to act on metadata like
depends:,setup:, etc.
Workaround
Adding an empty frontmatter block prevents stripping:
---
---
depends:
- skills/subtask
---
This is ugly but functional.
Suggested fix
In the context injection path, either:
- Pass through the raw file content (don't strip frontmatter)
- Or re-serialize recognized + unrecognized frontmatter fields back into the content
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗