continuous-claudemd-updates
Skill0 starsChanged 9 months agoMITView on GitHub
Maintains CLAUDE.md in sync with codebase changes after commits. Use when (1) A commit has been made and CLAUDE.md needs updating, (2) User explicitly requests CLAUDE.md update or audit, (3) Major refactoring or architectural changes occur, (4) New conventions or patterns are established, (5) Files referenced in CLAUDE.md are deleted/moved. Keeps documentation concise by moving verbose content to docs/ folder with links, removes outdated information, and ensures CLAUDE.md reflects current codebase state.
We split this skill into the rules it gives an agent
40 rules. About 0 are common, 39 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈39
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Follow this sequence when a commit has been made:
- Distinctive: line 22
Run the analysis script to understand the impact:
- Distinctive: line 32
Commit message for context
- Distinctive: line 46
Only test files changed
- Distinctive: line 63
Config changes: Check if CLAUDE.md mentions these configs
- Distinctive: line 64
Update version numbers, dependency changes, new scripts
- Distinctive: line 65
Add new configuration requirements
- Distinctive: line 66
Remove references to deleted configs
- Distinctive: line 74
Deletions: Remove obsolete references
- Distinctive: line 75
Check for file paths that no longer exist
- Distinctive: line 76
Remove outdated pattern descriptions
- Distinctive: line 77
Delete deprecated workflow instructions
- Distinctive: line 94
If adding >3 paragraphs or >20 lines of code examples:
- Very specific: line 96
Create a docs/ note using the template from assets/note-template.md
- Distinctive: line 97
Place detailed content there
- Distinctive: line 98
Add concise summary to CLAUDE.md with link
- Distinctive: line 117
Delete references to renamed/deleted files
- Distinctive: line 120
Update file paths that changed
- Distinctive: line 124
Check that all docs/ links are valid:
- Distinctive: line 135
Create a commit for CLAUDE.md changes:
- Distinctive: line 154
When explicitly requested or for periodic maintenance:
- Distinctive: line 173
Remove the reference or update to correct path
- Distinctive: line 176
Verify the reference matches actual config state
- Distinctive: line 177
Update or remove if inaccurate
- Distinctive: line 190
Fix file references: Update all missing file paths
- Distinctive: line 191
Verify configs: Check each config reference against actual files
- Distinctive: line 193
Repair links: Create missing docs or fix paths
- Distinctive: line 197
After fixing audit issues, review CLAUDE.md as a whole:
- Distinctive: line 238
Be current: Remove outdated info immediately
- Distinctive: line 252
When to create docs/ notes
- Distinctive: line 349
When to include vs move to docs/
- Distinctive: line 383
Leave outdated file references in CLAUDE.md
- Distinctive: line 384
Add verbose content (>4 paragraphs) directly to CLAUDE.md
- Distinctive: line 387
Commit without descriptive message
- Distinctive: line 390
Run analysis before updates (automatic mode)
- Distinctive: line 391
Check for verbosity (split to docs/ if needed)
- Distinctive: line 392
Remove outdated information immediately
- Distinctive: line 393
Verify links before committing
- Distinctive: line 394
Create commit with specific change description
- Distinctive: line 401
After git commit via post-commit hook
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Continuous CLAUDE.md Updates
Overview
Keeps CLAUDE.md synchronized with codebase changes through automatic analysis after commits and periodic audits. Maintains conciseness by moving detailed content to docs/ folder, removes outdated information, and ensures documentation accuracy.
Announce at start: "I'm using the continuous-claudemd-updates skill to sync CLAUDE.md with recent changes."
Workflow
After Each Commit (Automatic Mode)
Follow this sequence when a commit has been made:
1. Analyze Changes
Run the analysis script to understand the impact:
python scripts/analyze_changes.py --commit HEADThis outputs JSON with:
- Changed files categorized by type (config, source, tests, docs, assets)
- Change magnitude (insertions, deletions, total changes)
- Impact level (minor, moderate, major)
- Commit message for context
2. Review CLAUDE.md Relevance
Based on analysis, determine if CLAUDE.md needs updates:
Update if:
- Config files changed (package.json, tsconfig.json, etc.)
- New patterns/conventions introduced in source files
- Architecture or structure modified
- Files referenced in CLAUDE.md were changed/deleted
- Major features added (impact: "major" or "moderate")
Skip if:
- Only test files changed
- Documentation-only changes
- Minor bug fixes with no pattern changes
- Impact level: "minor" with no config changes
3. Read Current CLAUDE.md
cat CLAUDE.mdUnderstand current structure and content before modifying.
4. Compare Against Changes
For each changed file category:
Config changes: Check if CLAUDE.md mentions these configs
- Update version numbers, dependency changes, new scripts
- Add new configuration requirements
- Remove references to deleted configs
Source changes: Identify pattern changes
- New component structures
- Changed API conventions
- Modified file organization
- Updated workflows
Deletions: Remove obsolete references
- Check for file paths that no longer exist
- Remove outdated pattern descriptions
- Delete deprecated workflow instructions
5. Apply Updates
When updating CLAUDE.md:
Keep entries concise (1-4 sentences):
## API Client
All API calls use `src/lib/api.ts`. Handles auth, retries, errors.
See [docs/api-patterns.md](docs/api-patterns.md) for advanced patterns.Move verbose content to docs/:
If adding >3 paragraphs or >20 lines of code examples:
- Create a docs/ note using the template from
assets/note-template.md - Place detailed content there
- Add concise summary to CLAUDE.md with link
Example:
# Create detailed note
cp assets/note-template.md docs/authentication-flow.md
# Edit docs/authentication-flow.md with detailsThen in CLAUDE.md:
## Authentication
Using NextAuth.js with session-based auth. Config in `pages/api/auth/[...nextauth].ts`.
Full setup guide: [docs/authentication-flow.md](docs/authentication-flow.md)Remove outdated information:
- Delete references to renamed/deleted files
- Remove deprecated patterns
- Eliminate historical context ("previously we used...")
- Update file paths that changed
6. Verify Links
Check that all docs/ links are valid:
# Manual verification or use audit script
python scripts/audit_claudemd.py --claudemd CLAUDE.mdFix any broken links before committing.
7. Commit Updates
Create a commit for CLAUDE.md changes:
git add CLAUDE.md docs/
git commit -m "$(cat <<'EOF'
Update CLAUDE.md: [brief description of changes]
- [Specific change 1]
- [Specific change 2]
Synced with commit: [original commit hash]
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
EOF
)"Manual Audit Mode
When explicitly requested or for periodic maintenance:
1. Run Full Audit
python scripts/audit_claudemd.py --claudemd CLAUDE.md --reportThis checks for:
- Broken file references
- Outdated configuration mentions
- Overly verbose sections
- Broken docs/ links
2. Review Audit Results
The audit categorizes issues:
missing_file: File referenced in CLAUDE.md no longer exists
- Remove the reference or update to correct path
config_check: Configuration file mentioned may be outdated
- Verify the reference matches actual config state
- Update or remove if inaccurate
verbosity: Section is too long
- Move content to docs/ with link
- Condense to essential points
broken_link: docs/ link is invalid
- Fix the link or create the missing doc
3. Systematic Cleanup
Work through audit issues systematically:
- Fix file references: Update all missing file paths
- Verify configs: Check each config reference against actual files
- Reduce verbosity: Move long sections to docs/
- Repair links: Create missing docs or fix paths
4. Overall Coherence Check
After fixing audit issues, review CLAUDE.md as a whole:
Structure check:
- Is organization logical?
- Are sections clearly labeled?
- Is there a natural flow?
Content check:
- Does each section add value?
- Are examples current and accurate?
- Is information duplicated anywhere?
Completeness check:
- Are critical conventions documented?
- Are new patterns from recent commits included?
- Is anything essential missing?
5. Commit Audit Changes
git add CLAUDE.md docs/
git commit -m "$(cat <<'EOF'
Audit and update CLAUDE.md
- Fix [N] broken file references
- Move verbose sections to docs/
- Update configuration references
- Remove outdated information
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
EOF
)"Content Guidelines
See references/guidelines.md for comprehensive content standards.
Quick reference:
- Be concise: Bullet points over paragraphs
- Be current: Remove outdated info immediately
- Be specific: Link to actual file paths
- Split when verbose: >3 paragraphs → docs/ folder
- Link generously: Point to details rather than include everything
Examples
See references/examples.md for good vs bad examples covering:
- Configuration changes
- Component patterns
- API conventions
- Testing requirements
- Major refactoring scenarios
- When to create docs/ notes
Common Patterns
Pattern 1: New Feature Added
1. Analyze: Major source changes detected
2. Review: New component pattern introduced
3. Update: Add concise entry to CLAUDE.md
4. If complex: Create docs/component-patterns.md
5. Commit: "Update CLAUDE.md: Document new component pattern"Pattern 2: Configuration Changed
1. Analyze: Config file modified (e.g., package.json)
2. Review: New scripts or dependencies
3. Update: Modify relevant CLAUDE.md section
4. Verify: Ensure all config references accurate
5. Commit: "Update CLAUDE.md: Sync with package.json changes"Pattern 3: Files Renamed/Deleted
1. Analyze: File deletions detected
2. Review: CLAUDE.md for references to deleted files
3. Update: Remove or fix file path references
4. Verify: Run audit to catch any missed references
5. Commit: "Update CLAUDE.md: Fix stale file references"Pattern 4: Audit Finds Verbosity
1. Audit: Section flagged as too long
2. Create: New docs/ note using template
3. Move: Detailed content to docs/ file
4. Update: Replace with concise summary + link
5. Commit: "Refactor CLAUDE.md: Move [topic] details to docs/"Decision Tree
Commit made or update requested?
├─ Automatic after commit
│ ├─ Run analyze_changes.py
│ ├─ Impact level "minor" + no config changes?
│ │ └─ Skip update (notify user)
│ └─ Impact "moderate"/"major" or config changed?
│ ├─ Read CLAUDE.md
│ ├─ Compare against changes
│ ├─ Apply updates (concise, split if verbose)
│ └─ Commit changes
│
└─ Manual audit requested
├─ Run audit_claudemd.py --report
├─ Review audit issues
├─ Fix systematically (files → configs → verbosity → links)
├─ Overall coherence check
└─ Commit audit changesResources
scripts/analyze_changes.py
Analyzes git changes and determines impact on CLAUDE.md.
Usage:
python scripts/analyze_changes.py [--commit <hash>]Output: JSON with change analysis (magnitude, categories, impact level)
scripts/audit_claudemd.py
Audits CLAUDE.md against actual codebase state.
Usage:
python scripts/audit_claudemd.py [--claudemd <path>] [--report] [--json]Checks:
- Missing file references
- Outdated config mentions
- Overly verbose sections
- Broken docs/ links
references/guidelines.md
Comprehensive content guidelines for CLAUDE.md including:
- When to include vs move to docs/
- Content quality standards
- Section organization
- Maintenance workflow
- Red flags to watch for
Load when you need detailed guidance on content decisions.
references/examples.md
Good vs bad examples covering:
- Configuration changes
- Component patterns
- API conventions
- Major refactoring scenarios
- When to create docs/ notes
Load when you need specific examples for comparison.
assets/note-template.md
Template for creating detailed docs/ notes with standard structure:
- Purpose statement
- Overview
- Sections with examples
- Common patterns
- Troubleshooting
- Last updated date
Copy this template when creating new docs/ notes.
Red Flags
Never:
- Leave outdated file references in CLAUDE.md
- Add verbose content (>4 paragraphs) directly to CLAUDE.md
- Include historical context ("we used to...")
- Skip verification after updates
- Commit without descriptive message
Always:
- Run analysis before updates (automatic mode)
- Check for verbosity (split to docs/ if needed)
- Remove outdated information immediately
- Verify links before committing
- Create commit with specific change description
Integration
This skill runs:
Automatically (if configured):
- After git commit via post-commit hook
- Triggered by commit workflow skills
Manually:
- User requests CLAUDE.md update
- User requests CLAUDE.md audit
- After major refactoring
- Periodic maintenance (weekly/monthly)
Pairs with:
- Commit workflow skills
- Documentation maintenance tasks
- Code review processes
In this repository29 other files it gives its agents.
- .agents/skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- .agents/skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- agent-browserSkill
- ai-sdkSkill
- algorithmic-artSkill
- audit-websiteSkill
- before-and-afterSkill
- core-web-vitalsSkill
- find-skillsSkill
- frontend-designSkill
- mcp-builderSkill
- next-best-practicesSkill
- pdfSkill
- performanceSkill
- prdSkill
- programmatic-seoSkill
- ralphSkill
- seo-auditSkill
- skill-creatorSkill
- theme-factorySkill
- ui-ux-pro-maxSkill
- using-git-worktreesSkill
- vercel-composition-patternsSkill
- vercel-react-best-practicesSkill
- webapp-testingSkill
- web-design-guidelinesSkill
- cold-outreachSkill
- design-tasteSkill
- pr-review-handlerSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

