本文へ移動
cccskills
無料GitHub で公開日本語紹介

context-sync

コード変更が各階層のAGENTS.mdに反映されているかを確認し、差分に応じた更新内容の作成と同期状態の管理を支援します。

原文原文の説明を見る

Sync AGENTS.md context files with the current codebase. Use whenever you want to check if context is stale, update context after code changes, or regenerate a specific layer's AGENTS.md. Triggers on: 'sync context', 'update context', 'is context stale', 'refresh AGENTS.md', 'context out of date', 'update the context files', or any time code has changed and you want the AGENTS.md files to reflect it.

flexprice/flexpriceスター 6,876(GitHub 6,876 + cccskills 0)

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • AGENTS.mdの同期状態を確認したいとき
  • コード変更後に説明ファイルを更新したいとき
  • 特定の階層だけ同期したいとき
  • 変更差分に沿った更新材料を作りたいとき

日本語での紹介

できること

リポジトリ内の各階層にあるAGENTS.mdが、現在のコードと同期しているか確認する手順を案内します。.context/manifest.yamlに登録された同期済みGit SHAと、各ノードが担当するファイル範囲を照合し、担当範囲に変更がないノードはSHAを進めます。変更があるノードについては、現在のAGENTS.mdと対象差分をまとめた更新用の材料を出力します。LLMが必要な箇所だけを最小限更新した後、対象ファイル単位でマニフェストを進め、再確認する流れです。

こんなときに便利

コードを変更した後、エージェント向けのリポジトリ説明が古くなっていないか確かめたいときに使えます。特定の階層だけを更新したい場合や、追加・変更したファイルに合わせて「Key files」や設計上の注意点を見直したい場合にも役立ちます。

使い方の例

  • 「AGENTS.mdのコンテキストが古くなっていないか確認して」
  • 「コード変更を踏まえて、該当するAGENTS.mdを更新して」
  • 「この階層のコンテキストだけ同期して」

注意点

実行にはPython 3とpyyamlが必要です。同期スクリプトは.context/sync/sync.pyで、確認・同期材料の生成・更新後のSHA反映を別々の手順で行います。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(3)

  • SKILL.md3.6 KB
  • ci-job.yml1.1 KB
  • sync.py8.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Context Sync Skill

Keeps all Plane-2 AGENTS.md files in sync with the codebase using git-SHA watermarks. Run this any time after code changes to check for and fix stale context.

What this skill does

  1. Reads .context/manifest.yaml — the registry of all context nodes and their synced_sha.
  2. For each node: diffs synced_sha..HEAD and intersects with that node's owns globs.
  3. Nodes with no owned changes → SHA bumped automatically (no LLM work needed).
  4. Nodes with owned changes → prints the current AGENTS.md + scoped diff as a prompt bundle for the LLM to update minimally.
  5. After updates, advances synced_sha in the manifest.

How to run

Step 1 — Check what's stale

cd /path/to/flexprice  # repo root
pip install pyyaml --break-system-packages -q
python3 .context/sync/sync.py --check

Exits 0 if all current. Exits 1 and lists stale nodes if any are behind HEAD.

Step 2 — Sync (generate update bundles)

python3 .context/sync/sync.py --sync
  • Nodes with no owned changes: SHA bumped automatically, no output.
  • Nodes with changes: prints a prompt bundle (current AGENTS.md + scoped diff + instructions).

Step 3 — Update each stale AGENTS.md

For each printed bundle, the LLM (this session) reads the bundle and produces an updated AGENTS.md. Rules for the update:

  • Update "Key files" table if files were added, removed, or renamed.
  • Update "Patterns" or "Common pitfalls" if the diff reveals new patterns.
  • Do NOT rewrite sections that haven't changed.
  • Do NOT add improvement suggestions — those go in .context/findings/<layer>.md.
  • Bump synced_sha to current HEAD and synced_at to now in frontmatter.

Step 4 — Advance the manifest

After saving each updated file:

python3 .context/sync/sync.py --advance --file internal/service/AGENTS.md
# repeat for each updated file

Step 5 — Verify

python3 .context/sync/sync.py --check
# Should print: All context nodes are current.

Sync a single node only

python3 .context/sync/sync.py --sync --file internal/service/AGENTS.md
python3 .context/sync/sync.py --advance --file internal/service/AGENTS.md

Adding a new layer to the registry

When you create a new AGENTS.md for a directory, register it:

# .context/manifest.yaml — add a new node:
- file: internal/repository/AGENTS.md
  owns:
    - "internal/repository/**"
  synced_sha: <current HEAD SHA from: git rev-parse HEAD>
  synced_at: <ISO 8601 now>

What NOT to do

  • Do not rewrite the entire AGENTS.md on every sync — minimal diffs only.
  • Do not add critique, TODOs, or "areas to improve" inside AGENTS.md — put those in .context/findings/.
  • Do not run --sync and skip --advance — the manifest won't update and the node stays stale.

Full example session

You: sync context
Claude:
  → runs python3 .context/sync/sync.py --check
  → finds internal/service/AGENTS.md is stale (3 files changed)
  → runs --sync, reads the prompt bundle
  → produces updated internal/service/AGENTS.md (minimal changes only)
  → runs --advance --file internal/service/AGENTS.md
  → runs --check again → "All context nodes are current."

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

apitest

無料概要あり

ローカルAPIに認証情報付きのHTTPリクエストを送り、疎通確認からエンドポイント別の結果整理まで進めるQAスキルです。

  • ローカルAPIの疎通を確認したいとき
  • 認証付きエンドポイントを調べたいとき
  • 多数のAPIテストを分担したいとき
flexprice/flexprice6,8762026年10月29日 更新

arch

無料概要あり

FlexPriceのディレクトリ構成や依存関係、主要な処理フローを資料に沿って把握し、変更の影響範囲や設計上の注意点を調べるスキルです。

  • FlexPriceの構成を把握したいとき
  • 機能の呼び出し経路を追いたいとき
  • リファクタリングの影響を調べたいとき
flexprice/flexprice6,8762026年10月29日 更新

compose

無料概要あり

Docker ComposeやMakefileを使ったFlexPriceの開発環境の起動・停止、Kafka UIの追加、サービスログの確認を案内します。

  • 開発環境を初回セットアップしたいとき
  • 必要な基盤サービスだけ起動したいとき
  • Kafka UIを開発中に使いたいとき
flexprice/flexprice6,8762026年10月29日 更新

devenv

無料概要あり

環境変数とDocker Composeを確認し、ローカル実行とRDSなどの共有サービスを組み合わせた開発環境の準備や起動方法を案内します。

  • ローカルとRDSを組み合わせたいとき
  • APIやconsumerをローカル起動したいとき
  • マイグレーション前に接続先を確認したいとき
flexprice/flexprice6,8762026年10月29日 更新

gh

無料概要あり

GitHub CLIでプルリクエストやIssueを確認し、チェックの失敗ログを調べるほか、変更内容を整理してプルリクエストを作成します。

  • CLIからIssueやPRを確認したいとき
  • CIチェックの失敗原因を調べたいとき
  • 変更を整理してPRを作成したいとき
flexprice/flexprice6,8762026年10月29日 更新

godev

無料概要あり

Goのコード整形、静的チェック、競合状態を調べるテスト、プロジェクトのテスト実行を順に進め、変更したコードの確認を支援します。

  • Goの変更後にチェックしたいとき
  • 特定パッケージをrace付きでテストしたいとき
  • 全テストを実行したいとき
flexprice/flexprice6,8762026年10月29日 更新

flexprice のスキルをすべて見る

このスキルの問題を報告する