update-claude-md
Update CLAUDE.md with learnings
CLAUDE.md is the project's institutional knowledge — the things a new developer (or a new Claude session) needs to know that aren't obvious from the code itself. The goal is to keep it concise, current, and high-signal.
What belongs in CLAUDE.md
Include information that saves future sessions from re-discovering things the hard way:
- Conventions and philosophy — e.g., "Prefer composition over inheritance", "No backwards compatibility unless explicitly requested"
- Non-obvious gotchas — Things that cause repeated bugs or confusion
- Build/test/run commands — How to run, test, lint, deploy
- Project structure — Key directories and their purpose, especially if the layout is non-standard
- Recent significant changes — New capabilities, major refactors, or architectural shifts that change how the project works
What does NOT belong
Skip anything that's either ephemeral or derivable from the code:
- Bug fix details — the fix is in the code, the context is in the commit message
- Implementation details obvious from reading the source
- Temporary workarounds that will be removed soon
- One-off decisions that won't recur
Rule of thumb: Would you tell a new developer this on their first day? If yes, add it. If it's just details about today's work, skip it.
Instructions
- Read CLAUDE.md — If it exists, understand what's already documented so you don't duplicate. If it doesn't exist, you'll create it.
- Review recent work — Run
git log --oneline -20andgit diff HEAD~5..HEAD --statto identify significant changes. Look for patterns: new scripts, moved directories, changed conventions, recurring issues. - Extract meta learnings — From the recent work and the current conversation, identify anything that fits the "what belongs" criteria above.
- Update conservatively — Keep CLAUDE.md under 300 lines. If adding new content pushes it over, remove outdated entries first. Prefer updating existing sections over adding new ones.
Output
After updating, summarize:
- What was added/changed
- What was removed (if anything)
- Current line count
More from carsten-j/agent-resources
refactor-pass
Perform a refactor pass focused on simplicity after recent changes. Use when the user asks for a refactor/cleanup pass, simplification, or dead-code removal and expects build to verify behavior.
11pr-review
Review the current Pull Request that has been checked out locally with structured feedback on code quality, issues, testing, and suggestions. Use when you need a comprehensive code review of a PR branch.
8history
Display Claude conversation history in an easy-to-scan format showing recent sessions with dates, projects, and topics. Use when you want to review past conversations or resume a previous session.
1teach
Learning mode - guides the user to complete tasks themselves through Socratic teaching rather than doing it for them. Use when the user wants to learn how to do something instead of having it done for them.
1gwm
Manage git worktrees using the gwm script. Supports creating, listing, removing, and checking status of worktrees. Use when the user says "create git worktree", "new worktree", or needs to work with multiple branches simultaneously via git worktrees.
1catchup
Catch up on branch changes by reviewing all changes between current branch and master/main, analyzing key files, and providing a comprehensive summary. Use when you need to understand what changed in a feature branch.
1