I kept running into the same problem: I’d set up development standards in CLAUDE.md, and Claude would follow them… for a while. Then as the session grew, they’d fade. After compaction, they’d vanish entirely. So I dug into why and built a plugin to fix it. The Problem CLAUDE.md content gets injected with a framing that tells Claude it “may or may not be relevant” ( GitHub #22309 ). Multiple issues document Claude ignoring explicit CLAUDE.md instructions as context grows ( #21119 , #7777 , #15443 ). On top of that, CLAUDE.md is loaded once. After compaction, it’s summarized away. The Fix: Hook-Based Reinforcement The plugin uses Claude Code hooks to inject your values at two moments: SessionStart — Full values injected at session start, and re-injected after every compaction (the hook fires on compact too) UserPromptSubmit — A single-line motto reminder on every prompt (~15 tokens, negligible) Hook output arrives as a clean system-reminder — no “may or may not be relevant” disclaimer. What You Get YAML config — Define your values in ~/.claude/core-values.yml 4 starter templates — Craftsman, Startup, Security-First, Minimal Per-project overrides — Drop a different config in any project’s .claude/ directory /core-values init — Interactive setup, pick a template, done Example config:
sections: - name: Quality Commitment values: - "No Half Solutions: Always fix everything until it's 100% functional." - "No Band-Aid Solutions: Fix the root cause, not the symptom." - "Follow Through: Continue until completely done and verified." ```
Install
/plugin marketplace add albertnahas/claude-core-values /plugin install claude-core-values@claude-core-values /core-values init
Three commands. Pick a template. Done.
Token Overhead
Session start: ~300-400 tokens (one time + after compactions)
Per-prompt: ~15 tokens (just the motto)
50-turn session: ~750 tokens total from reminders — 0.375% of a 200k context window
Repo:
github.com/albertnahas/claude-core-values
MIT licensed. PRs welcome — especially new templates for different team philosophies.
Would love to hear if others have found workarounds for the CLAUDE.md fading problem, or if you have ideas for additional templates.
submitted by
/u/This-Establishment26
Originally posted by u/This-Establishment26 on r/ClaudeCode
