Joseph Sagiv

Project Context Sync

開発v1.0.0
作者:Joseph Sagiv更新日 2026-05-11project-context-sync@clawhub_joe3112/project-context-sync
スクリプトツールGit 補助#Sync#Document

AlphaMoatによると、2026-09時点でProject Context Syncのダウンロード数は4,066、スター数は3で、AIスキル全体5,078件中2,494位、開発では577件中321位です。

インストール数
205
ダウンロード数
4066
スター数
3
総合順位
#2,494
全体の上位 50% · 開発の上位 56%
プラットフォームインストール数ダウンロード数スター数コメント
ClawHub ↗12637543-
SkillHub ↗20540663—

プラットフォームごとに集計方法と集計時点が異なります。

このスキルでできること

仕組みは、Git コミット → post-commit フック → リポジトリルートの PROJECT_STATE.md 自動更新です。フックは直近コミット、履歴、ブランチ、変更ファイルを収集し、任意で LLM にスマート要約を生成させて文書に書き込みます。導入は scripts/install.sh(または project-context-sync install)で、.git/hooks/ 配下に post-commit フックを置き、既定設定の .project-context.yml を作成し、初期 PROJECT_STATE.md を生成して .gitignore に追加します。アンインストールとコミットなしの手動更新には専用スクリプトがあります。設定項目は ai_summary(既定 true)、recent_commits(既定5件)、include_diff_stats、セクション選択(last_commit、recent_changes、current_focus、suggested_next。後ろの2つは AI 生成)です。AI モードは Clawdbot の OpenAI 互換エンドポイント /v1/chat/completions を使います。セキュリティのため既定では無効で、~/.clawdbot/clawdbot.json で有効化します。エンドポイントはゲートウェイ認証(Bearer token)を引き継ぎ、既定の bind: loopback ではローカルプロセスのみ接続でき、スクリプトが token を自動読み取りします。出力は直近コミット(ハッシュ、メッセージ、ブランチ、時刻、変更ファイル数)、最近の変更、現在の焦点、提案される次の一手を含み、PROJECT_STATE.md は gitignore されローカルで再生成され、Clawdbot が動作していない場合は生の git 情報モードにフォールバックします。本スキルは MIT ライセンスで公開されています。

資料公開日 2026-10-27

できること

  • コミットごとにプロジェクト状態文書を自動保守する
  • 次のセッションやエージェントに最新のプロジェクト文脈を与える
  • コミットせずにプロジェクト状態を手動更新する

使う場面

  • Git リポジトリで、エージェントが読める常設のプロジェクト状態文書を維持したいとき

プロンプト例

スキルのドキュメントをもとに生成した例であり、実際の実行結果ではありません。

このリポジトリにコミット後の状態フックを導入して
PROJECT_STATE.md を手動で更新して
AI 要約をオフにして生の git 情報だけ記録して

月次の推移

ダウンロード数4066
2784347341612026-03 · ダウンロード数 28792026-05 · ダウンロード数 32232026-06 · ダウンロード数 33482026-07 · ダウンロード数 36232026-08 · ダウンロード数 37602026-09 · ダウンロード数 406626-0326-09
スター数3
2342026-03 · スター数 32026-05 · スター数 32026-06 · スター数 32026-07 · スター数 32026-08 · スター数 32026-09 · スター数 326-0326-09

2026-09 から集計方法を変更し、同名スキルを作者ごとに分けて集計し、全スキルを対象にしました。破線は変更前の月で、変更後のデータとは直接比較せず、変更をまたぐ増減も計算していません。

月ダウンロード数前月比スター数
2026-094066—3
2026-083760+3.8%3
2026-073623+8.2%3
2026-063348+3.9%3
2026-053223—3
2026-032879—3

SKILL.md 原文

作者が公開した元のファイルをテキストのまま表示しています。AlphaMoat による編集や審査はしていません。リンクはクリックできません。コマンドは内容を確認してから実行してください。取得日 2026-10-23。

3.7 KB・ClawHub v1.0.0
# 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)      │
すべて表示(全 146 行)
└─────────────┘     └──────────────────┘     └─────────────────────┘
```

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

```bash
# 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:
```bash
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

```bash
cd /path/to/your/repo
/path/to/skills/project-context-sync/scripts/uninstall.sh
```

## Manual Update

Trigger an update without committing:

```bash
cd /path/to/your/repo
/path/to/skills/project-context-sync/scripts/update-context.sh
```

## Configuration

Edit `.project-context.yml` in your repo root:

```yaml
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:

```json5
// ~/.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.json` automatically
- Risk is minimal for local development setups

## Output

`PROJECT_STATE.md` will contain:

```markdown
# 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)
- The hook requires Clawdbot to be running for AI summaries
- Without Clawdbot, falls back to raw git info mode

開発の人気スキル

データ月:2026-09 · ダウンロード数、スター数、インストール数は公開スキルレジストリ(ClawHub、SkillHub)から月単位で集計しています。詳しくはデータの方法論をご覧ください。