Just did a deep cleanup on my
CLAUDE.md based on latest Anthropic guidance. Key takeaway:
CLAUDE.md should be 60-150 lines max; mine had ballooned to 786 😬 (now 110!)
Restructured it by pulling domain-specific docs into path-scoped rules files (.claude/rules/) with globs: frontmatter, so Claude only loads them when touching relevant files. Went from 1 bloated file to 5 focused ones totaling ~300 lines.
Then built an /update-docs skill that audits all docs against actual source code and auto-fixes drift. The skill has a "best practices" section with a date stamp; when it goes stale (i defined as "3 months"), it web-searches for current Anthropic guidance and updates itself.
If you want to do the same for your projects, tell Claude something like: "Research the latest Anthropic best practices for
CLAUDE.md and path-scoped rules files, then audit my
CLAUDE.md against those recommendations and restructure it." From there you can ask it to extract sections into .claude/rules/ files and build a similar update skill."