Your commits look like this:
fix typo
update user
it works
more changes
fix bug
Stop thinking about git. Start building.
🧠 Intelligent Git automation for Claude Code that never lets you lose work and builds toward persistent AI context.
Your messy commits become this:
feat(auth): implement user authentication system
- Add email validation with real-time feedback
- Create JWT token generation and verification
- Implement protected route guards
- Add password strength validation
How? Every file change = automatic descriptive commit. When tasks complete = automatic professional squashing. Zero effort from you.
🔄 Auto-Checkpoint Every Change
- Every file modification = immediate descriptive commit
- Never lose work again - each change safely stored
- AI-generated commit messages that actually make sense
🧠 Intelligent Squashing
- Automatically combines checkpoint commits into meaningful task commits
- Uses conventional commit format (
feat:,fix:,refactor:) - Clean professional git history without manual effort
🛡️ Zero Maintenance
- Works completely automatically with Claude Code hooks
- Universal language support (Node.js, Rust, Python, any project)
- Duplicate protection and error handling built-in
- Claude Code installed
- Git repository with user configured (
git config user.nameandgit config user.email)
The system auto-detects and runs your existing formatters:
- Node.js:
npm run lint:fixorpnpm run lint:fix(requires ESLint/Prettier setup) - Rust:
cargo fmt(built into Cargo) - Python:
black .orruff format .(install viapip install blackorpip install ruff)
If formatters aren't installed, the system works fine without them.
1. Create Claude Code settings file:
# For this project only
mkdir -p .claude && touch .claude/settings.json
# OR for all projects globally
mkdir -p ~/.claude && touch ~/.claude/settings.json2. Add this configuration to your settings.json:
{
"hooks": {
"preToolUse": {
"command": "bash",
"args": ["-c", "if [ -f package.json ]; then npm run lint:fix 2>/dev/null || pnpm run lint:fix 2>/dev/null || true; elif [ -f Cargo.toml ]; then cargo fmt 2>/dev/null || true; elif command -v black >/dev/null; then black . 2>/dev/null || true; elif command -v ruff >/dev/null; then ruff format . 2>/dev/null || true; fi"],
"timeout": 30000
},
"postToolUse": {
"command": "bash",
"args": ["-c", "if [ -d .git ] && [ -n \"$(git status --porcelain)\" ]; then LOCKFILE=\"/tmp/claude_hooks_lock_$$\"; if ! [ -f \"$LOCKFILE\" ]; then touch \"$LOCKFILE\"; DIFF=$(git diff --name-only --diff-filter=M | head -10 | tr '\\n' ' '); if [ -n \"$DIFF\" ]; then MSG=$(claude -p \"Generate a concise commit message for these changes. Format: 'checkpoint: [what was done] - [HH:MM]'. Be specific about the actual changes made. Files: $DIFF. Diff: $(git diff --no-color | head -50)\" 2>/dev/null | head -1 | sed 's/^[^:]*:/checkpoint:/' || echo \"checkpoint: update files $DIFF - $(date +%H:%M)\"); git add -A && git commit -m \"$MSG\" 2>/dev/null || true; fi; rm -f \"$LOCKFILE\"; fi; fi"],
"timeout": 60000
},
"stop": {
"command": "bash",
"args": ["-c", "if [ -d .git ]; then LOCKFILE=\"/tmp/claude_squash_lock_$$\"; if ! [ -f \"$LOCKFILE\" ]; then touch \"$LOCKFILE\"; CHECKPOINT_COUNT=$(git log --oneline --grep=\"^checkpoint:\" | head -20 | wc -l); if [ \"$CHECKPOINT_COUNT\" -gt 1 ]; then CHANGES=$(git log --oneline --grep=\"^checkpoint:\" | head -10 | cut -d' ' -f2- | paste -sd ';' -); MSG=$(claude -p \"Create a single conventional commit message that summarizes these checkpoint changes: $CHANGES. Format: 'type(scope): description' followed by bullet points. Be concise and professional.\" 2>/dev/null | head -5 || echo \"feat: implement changes from checkpoints\"); FIRST_CHECKPOINT=$(git log --grep=\"^checkpoint:\" --format=\"%H\" | tail -1); if [ -n \"$FIRST_CHECKPOINT\" ]; then git reset --soft \"$FIRST_CHECKPOINT~1\" && git commit -m \"$MSG\" 2>/dev/null || true; fi; fi; rm -f \"$LOCKFILE\"; fi; fi"],
"timeout": 45000
},
"preCompact": {
"command": "bash",
"args": ["-c", "if [ -d .git ]; then LOCKFILE=\"/tmp/claude_compact_lock_$$\"; if ! [ -f \"$LOCKFILE\" ]; then touch \"$LOCKFILE\"; CHECKPOINT_COUNT=$(git log --oneline --grep=\"^checkpoint:\" | head -20 | wc -l); if [ \"$CHECKPOINT_COUNT\" -gt 0 ]; then CHANGES=$(git log --oneline --grep=\"^checkpoint:\" | head -15 | cut -d' ' -f2- | paste -sd ';' -); MSG=$(claude -p \"Create a conventional commit message for these checkpoint changes: $CHANGES. Format: 'type(scope): description' with bullet points. Be professional and concise.\" 2>/dev/null | head -5 || echo \"chore: auto-squash checkpoint commits\"); FIRST_CHECKPOINT=$(git log --grep=\"^checkpoint:\" --format=\"%H\" | tail -1); if [ -n \"$FIRST_CHECKPOINT\" ]; then git reset --soft \"$FIRST_CHECKPOINT~1\" && git commit -m \"$MSG\" 2>/dev/null || true; fi; fi; rm -f \"$LOCKFILE\"; fi; fi"],
"timeout": 75000
}
}
}3. Verify installation:
claude /hooks # Should show 4 configured hooks
git status # Make sure you're in a git repository# Make any change to a file, then check git log
echo "// test" >> yourfile.js
git log --oneline -5 # You should see a checkpoint commit# You ask Claude to add a login form
claude "Add a login component to my React app"
# As Claude works, you see:
✅ checkpoint: create LoginForm component structure - 14:25
✅ checkpoint: add email and password input fields - 14:26
✅ checkpoint: implement form validation logic - 14:27
✅ checkpoint: add submit handler and error states - 14:28
# When task completes, auto-squashed to:
✅ feat(auth): implement login component with validation
- Create LoginForm component structure
- Add email and password input fields
- Implement form validation logic
- Add submit handler and error statesThat's it. You focus on building. The system handles professional git history automatically.
- PreToolUse: Auto-formats your code before Claude changes it
- PostToolUse: Creates descriptive checkpoint commits after every change
- Stop: Squashes checkpoints into clean task commits when Claude finishes
- PreCompact: Cleans up any remaining checkpoints before memory clears
Never Lose Work: Every change immediately committed with descriptive messages
Professional Git History: Clean conventional commits without manual effort
Better Debugging: Detailed record of exactly what changed when
Improved Code Reviews: Meaningful commit messages and logical groupings
Team Consistency: Automatic conventional commit format across all developers
This system transforms your git practices into a professional, AI-enhanced workflow:
# Start each new feature in its own branch
git checkout -b feature/user-authentication
git checkout -b fix/login-validation
git checkout -b refactor/api-endpoints# Ask Claude to implement your feature
claude "Add JWT authentication to the login system"
# The hooks automatically create:
✅ checkpoint: create JWT utility functions - 14:25
✅ checkpoint: add token validation middleware - 14:26
✅ checkpoint: implement login endpoint with JWT - 14:27
✅ checkpoint: add protected route guards - 14:28
# When task completes, auto-squashed to:
✅ feat(auth): implement JWT authentication system
- Create JWT utility functions
- Add token validation middleware
- Implement login endpoint with JWT
- Add protected route guards# Create PR with perfect commit history
git push origin feature/user-authentication
# Review shows:
# 1. Clean conventional commits (what was built)
# 2. Detailed checkpoint history (how it was built)
# 3. Zero manual commit management required
# Merge to main with confidence
git checkout main && git merge feature/user-authentication🤖 AI-Enhanced Development
- Claude works faster when it doesn't think about git management
- Every change preserved automatically - experiment fearlessly
- Perfect development narrative captured in each branch
👥 Team Collaboration
- Consistent commit quality across all team members
- Detailed audit trail for complex features
- Code reviews focus on logic, not commit messages
🚀 Professional Output
- Enterprise-quality git history without manual effort
- Perfect conventional commits for automated tooling
- Clean main branch ready for production deployment
💡 Development Flow
- Zero cognitive overhead for git management
- Focus entirely on feature development
- Automatic documentation of decision-making process
This git automation is just the foundation. Coming soon:
Claude automatically rebuilds complete project context when memory resets - never explain your codebase again.
Integrates PRD documents, TaskMaster, documentation, and issue tracking for comprehensive project awareness.
Choose exactly the context depth you need - from basic git to full architectural understanding.
Hooks not working?
which claude # Make sure claude command exists
git status # Verify you're in a git repo
claude /hooks # Check hooks are configuredNo commit messages?
- Ensure the
claudecommand responds to-pflag - Check
/tmpdirectory is writable - Verify git user.name and user.email are set
Duplicate commits?
- Check if multiple Claude Code instances are running
- The system has lockfile protection, but concurrent execution can cause issues
- Vision & Roadmap: Complete technical vision and architecture
- Detailed Guide: In-depth system explanation and advanced usage
Start building your MindPalace today. Transform your development workflow with intelligent, automatic git management.
Never write another commit message manually. 🧠✨