sync-claude-md

Installation
SKILL.md

Sync CLAUDE.md

Keeps project-level CLAUDE.md synchronized with codebase evolution. Never commits — the user commits manually.

Preconditions:

  • Not in a git repo (git rev-parse --is-inside-work-tree fails) → the analysis below is git history; without it this skill has nothing to work from. Point the user to /init and stop.
  • Locate the file: check ./CLAUDE.md (preferred), then ./.claude/CLAUDE.md. If both exist, warn about the duplicate, recommend consolidating to ./CLAUDE.md, and ask which to update. Missing → suggest /init to bootstrap one and stop.

1. Gather change context

Use the path located above (not a hardcoded CLAUDE.md):

path=<located path, e.g. ./CLAUDE.md>
last=$(git log --follow --format="%H" -1 -- "$path")
git rev-list --count "$last"..HEAD
git log --oneline "$last"..HEAD
Installs
3
GitHub Stars
6
First Seen
Jan 20, 2026