Git-native project documentation that Claude reads automatically.
Store requirements, workflows, and progress in git commits. No external docs. No sync issues. Claude loads everything on session start and resumes exactly where you left off.
- Zero Setup Per Session: Claude reads your project context automatically
- Auto Session Resume: Every commit captures your work state - new sessions know exactly what you were doing
- Version Controlled: Documentation evolves with your code
- Team Shareable: Context lives in the repository
# 1. Install from marketplace
/plugin marketplace add KevinVitale/context-commit
/plugin install context-commit@context-commit-marketplace
# 2. Initialize in your project
# Claude: "Initialize context workflow"
# 3. Install hooks for automatic session capture
~/.claude/plugins/marketplaces/context-commit-marketplace/hooks/install-hooks.sh
# Done. Work normally - context is captured automatically.Three components:
- CLAUDE.md - Index file that Claude reads automatically
- [CONTEXT] commits - Documentation stored in git commits with
[CONTEXT]prefix - context-progress branch - Mutable progress tracking with auto-captured session state
On every commit, the pre-commit hook automatically:
- Captures what you're working on (commit message, files modified, recent work)
- Updates
context-progresswith a "Current Session" section - Runs tests and keeps branches synchronized
Result: New Claude sessions instantly resume your work. No manual notes needed.
Use these slash commands to manage your project context:
/context-init- Set up the workflow in a repository/context-add- Add documentation (requirements, architecture, workflows)/context-progress- Manually update progress (hooks handle this automatically)/context-read- View all project context and current session
READ THESE COMMIT MESSAGES FOR CONTEXT:
1. [e7b0129] Project requirements and technical specifications
2. [ae291fc] Development workflow and TDD practices
3. [context-progress] Current project progress (branch reference)
SESSION INITIALIZATION:
- Read the context-progress commit message using: `git log context-progress -1 --format=%B`
- Acknowledge that you have read and understood the project context
- Wait for the user's specific task requestClaude reads this automatically and loads all referenced commits.
Default behavior (no action required):
git commit -m "Add JWT authentication"
# Hook automatically captures session state in context-progressDetailed notes (for end-of-day commits):
CONTEXT_SESSION_PROMPT=1 git commit -m "Complete auth system"
# Prompts for accomplishments, next steps, blockersWhat gets captured:
- Latest commit message and modified files
- Recent work (last 3 commits)
- Timestamp
Example captured session:
## Current Session (2026-01-12 17:45)
**Latest Commit:** Add JWT token generation
**Files Modified:**
- src/auth.ts
- src/middleware/auth.ts
**Recent Work:**
- Add JWT token generation (abc1234)
- Update auth middleware (def5678)New sessions read this and know exactly what you were doing.
Install with: ~/.claude/plugins/context-commit/hooks/install-hooks.sh
Included hooks:
pre-commit- Auto-captures session state, runs tests, enforces synccommit-msg- Validates [CONTEXT] commit formatpost-commit- Auto-generates progress.html visualizationpre-push- Ensures context-progress is syncedprepare-commit-msg- Provides templates
See hooks/README.md for details.
Creating [CONTEXT] commits:
git commit --allow-empty -m "[CONTEXT] API Authentication Design
Uses JWT tokens with 15-minute expiry and refresh tokens.
## Implementation
- Access tokens in Authorization header
- Refresh tokens in httpOnly cookies
- Token rotation on refresh
## Security
- bcrypt for password hashing
- Rate limiting on auth endpoints
"Then update CLAUDE.md to reference the commit hash.
What belongs in [CONTEXT] commits:
- Requirements and specifications (immutable)
- Architecture decisions (immutable)
- Workflows and standards (immutable)
What belongs in context-progress:
- Task checklists (mutable)
- Current session state (auto-captured)
- Work-in-progress notes (mutable)
Automatically extract structured progress from git history, inspired by /compact:
# Preview what will be extracted
~/.claude/plugins/context-commit/hooks/update-progress.sh --preview
# Update context-progress with auto-extracted content
~/.claude/plugins/context-commit/hooks/update-progress.sh
# Non-interactive mode (for CI/automation)
CONTEXT_SKIP_EDIT=1 ~/.claude/plugins/context-commit/hooks/update-progress.shWhat gets auto-extracted:
| Category | Description |
|---|---|
| Commits | Categorized by type (feature, fix, test, refactor) |
| File Changes | Added, modified, deleted files |
| Issues Resolved | Commits containing "fix", "resolve", etc. |
| Key References | Functions, classes, structs added |
Merge modes:
smart(default): Preserve your manual "In Progress" and "Planned" editsreplace: Use only auto-extracted contentappend: Add auto-extracted as new section
CONTEXT_MERGE_MODE=replace ./update-progress.shHooks handle this automatically. For manual control:
git checkout context-progress
git rebase master
git commit --amend # Edit checklist
git checkout masterMarketplace (Recommended):
/plugin marketplace add KevinVitale/context-commit
/plugin install context-commit@context-commit-marketplaceGit Clone:
mkdir -p ~/.claude/plugins
git clone https://github.com/KevinVitale/context-commit.git ~/.claude/plugins/context-commit- Push [CONTEXT] commits normally - they're immutable
- Force-push
context-progressbranch - it's safe and expected - Never force-push main/master
- Coordinate CLAUDE.md updates to avoid conflicts
CLAUDE.md not found:
Run /context-init to create it.
Missing commit hash:
git log --oneline --grep="^\[CONTEXT\]"Missing context-progress branch:
git checkout -b context-progress
git commit --allow-empty -m "[CONTEXT] Project Progress
## Completed β
- [x] Initial setup
## In Progress
- [ ] Your tasks
## Planned
- [ ] Future tasks
"
git checkout masterMerge conflicts on rebase:
git status # See conflicts
# Resolve manually
git add .
git rebase --continue
git commit --amendMultiple progress branches:
- [context-progress-backend] Backend progress
- [context-progress-frontend] Frontend progressProgress snapshots:
git commit --allow-empty -m "[PROGRESS-SNAPSHOT] 2026-01-12
Milestone: MVP complete
"Categorized context:
1. [abc123] [REQ] User authentication requirements
2. [def456] [WORKFLOW] TDD practices
3. [ghi789] [ARCH] Database schema decisionsSee templates/ directory:
CLAUDE.md.template- Starting templatecontext-commit-template.md- [CONTEXT] commit templateprogress-template.md- Progress tracking template
MIT License
- GitHub Issues: Report bugs or request features
- Documentation:
hooks/README.md
Made with Claude Code