Project Context Sync
by @joe3112
Automatically updates PROJECT_STATE.md after each commit with recent git info and optional AI-generated summaries to track project status and next steps.
clawhub install project-context-syncπ About This Skill
project-context-sync
Keep a living project state document updated after each commit, so any agent (or future session) can instantly understand where things stand.
What It Does
βββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββββββ
β Git Commit β βββΆ β Post-commit Hook β βββΆ β PROJECT_STATE.md β
β β β β β (auto-updated) β
βββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββββββ
After each commit, the hook:
1. Gathers git info (last commit, recent history, branch, changed files)
2. Optionally calls an LLM to generate a smart summary
3. Updates PROJECT_STATE.md in the repo root
Installation
# From the repo you want to enable:
cd /path/to/your/repo
/path/to/skills/project-context-sync/scripts/install.sh
Or if you have the skill in your path:
project-context-sync install
This will:
1. Install a post-commit hook in .git/hooks/
2. Create .project-context.yml with default config
3. Create initial PROJECT_STATE.md
4. Add PROJECT_STATE.md to .gitignore
Uninstall
cd /path/to/your/repo
/path/to/skills/project-context-sync/scripts/uninstall.sh
Manual Update
Trigger an update without committing:
cd /path/to/your/repo
/path/to/skills/project-context-sync/scripts/update-context.sh
Configuration
Edit .project-context.yml in your repo root:
project_context:
# Use AI to generate smart summaries (default: true)
ai_summary: true
# How many recent commits to include
recent_commits: 5
# Include diff stats in context
include_diff_stats: true
# Sections to include
sections:
- last_commit
- recent_changes
- current_focus # AI-generated
- suggested_next # AI-generated
AI Summary Mode
With ai_summary: true (default):
With ai_summary: false:
Enabling the Gateway HTTP API
AI mode uses Clawdbot's OpenAI-compatible endpoint (/v1/chat/completions). This is disabled by default for security. To enable:
// ~/.clawdbot/clawdbot.json
{
"gateway": {
"http": {
"endpoints": {
"chatCompletions": { "enabled": true }
}
}
}
}
Security notes:
bind: "loopback" (default), only local processes can connect~/.clawdbot/clawdbot.json automaticallyOutput
PROJECT_STATE.md will contain:
# Project State
*Auto-updated by project-context-sync*Last Commit
Hash: abc123
Message: Implement isPro check for app blocking
Branch: feature/subscription-gating
When: 2026-01-29 12:34
Files changed: 3 Recent Changes
abc123: Implement isPro check for app blocking
def456: Add PaywallPrompt component
... Current Focus
[AI-generated summary of what's being worked on]Suggested Next Steps
[AI-suggested based on commit patterns]
Notes
PROJECT_STATE.md is gitignored by default (regenerated locally)βοΈ Configuration
Edit .project-context.yml in your repo root:
project_context:
# Use AI to generate smart summaries (default: true)
ai_summary: true
# How many recent commits to include
recent_commits: 5
# Include diff stats in context
include_diff_stats: true
# Sections to include
sections:
- last_commit
- recent_changes
- current_focus # AI-generated
- suggested_next # AI-generated
AI Summary Mode
With ai_summary: true (default):
With ai_summary: false:
Enabling the Gateway HTTP API
AI mode uses Clawdbot's OpenAI-compatible endpoint (/v1/chat/completions). This is disabled by default for security. To enable:
// ~/.clawdbot/clawdbot.json
{
"gateway": {
"http": {
"endpoints": {
"chatCompletions": { "enabled": true }
}
}
}
}
Security notes:
bind: "loopback" (default), only local processes can connect~/.clawdbot/clawdbot.json automaticallyπ Tips & Best Practices
PROJECT_STATE.md is gitignored by default (regenerated locally)