project-context-sync
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
02 资源文件 9
- 参考文档_meta.json293 B
- 参考文档README.md3.3 KB
- 脚本scripts/install.sh2.5 KB
- 脚本scripts/post-commit-hook.sh250 B
- 脚本scripts/uninstall.sh1.1 KB
- 脚本scripts/update-context.sh8.0 KB
- 参考文档skill.json400 B
- 参考文档templates/PROJECT_STATE.md413 B
- 参考文档templates/project-context.yml700 B
03 SKILL.md 正文
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:
- Gathers git info (last commit, recent history, branch, changed files)
- Optionally calls an LLM to generate a smart summary
- Updates
PROJECT_STATE.mdin 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:
- Install a post-commit hook in
.git/hooks/ - Create
.project-context.ymlwith default config - Create initial
PROJECT_STATE.md - Add
PROJECT_STATE.mdto.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):
- Generates intelligent summaries of what changed
- Infers current focus from recent commit patterns
- Suggests next steps
- Costs tokens but provides rich context
- Requires: Gateway HTTP API enabled (see below)
With ai_summary: false:
- Just logs raw git info
- Fast and free
- Less intelligent but still useful
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:
- The endpoint inherits gateway auth (requires bearer token)
- With
bind: "loopback"(default), only local processes can connect - The script reads the token from
~/.clawdbot/clawdbot.jsonautomatically - Risk is minimal for local development setups
Output
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.mdis gitignored by default (regenerated locally)- The hook requires Clawdbot to be running for AI summaries
- Without Clawdbot, falls back to raw git info mode
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.