gh skill for repository memory

Repo Knowledge Compiler

PR レビュー、ADR、障害メモ、調査ログを .repo-kb/ に集め、 LLM が読みやすいリポジトリ知識として育てるための skill です。

Install gh skill install
Store .repo-kb/ に運用知を蓄積
Compile agent guidance の材料を生成

CLAUDE.md を wiki にしない

すべての知識を起動時コンテキストへ詰め込まず、raw evidence から synthesized pages、 generated references、必要な guidance へ段階的に昇格します。

1

Raw notes

レビューコメント、事故メモ、ADR、デバッグログをまず証拠として保存します。

2

Wiki pages

繰り返し使える知識だけを、LLM と一緒にページや review aspects へ整理します。

3

Compile

lintcompile で短い参照出力を生成し、drift を検出します。

4

Promote

月次や明示的な依頼時だけ、安定した知識を agent rules や docs へ反映します。

gh コマンドで入れる

GitHub CLI 2.90.0 以降の gh skill を使います。 まず preview してから、対象リポジトリへ project scope で入れるのがおすすめです。

確認とプレビュー
gh --version
gh skill --help
gh skill preview makikub/repo-knowledge-compiler repo-kb
Codex 用に project scope でインストール
cd /path/to/target-repo
gh skill install makikub/repo-knowledge-compiler repo-kb \
  --agent codex \
  --scope project
Claude Code 用に project scope でインストール
cd /path/to/target-repo
gh skill install makikub/repo-knowledge-compiler repo-kb \
  --agent claude-code \
  --scope project

使い方は、意図をそのまま伝える

ユーザーが Python パスを覚える必要はありません。 agent にやりたいことを伝え、必要な場面で skill の helper が決定的な処理を担当します。

$repo-kb を使って、このリポジトリを初期化して
/repo-kb ingest DBトランザクション境界の教訓: 外部API呼び出しを中に入れない
/repo-kb ask DBトランザクション境界の注意点は?
/repo-kb promote 今月の安定した知識だけ CLAUDE.md / REVIEW.md / rules に反映して

CLI helper も同梱

repo-local に vendoring した場合は、対象リポジトリの中で構造チェックや compile を直接実行できます。

Initialize

.repo-kb/ の初期構造を作成します。

Ingest

人間のメモ、ディレクトリ snapshot、PR コメントを raw source として取り込みます。

Lint and compile

frontmatter、リンク、sources、generated drift を確認し、参照出力を更新します。

Repo-local helper examples
.agents/skills/repo-kb/scripts/repo-kb init
.agents/skills/repo-kb/scripts/repo-kb ingest --kind human-note --title "Review lesson" --note "Sanitized note."
.agents/skills/repo-kb/scripts/repo-kb lint
.agents/skills/repo-kb/scripts/repo-kb compile --check
.agents/skills/repo-kb/scripts/repo-kb ask "What should I know before changing src/api?"

リポジトリの記憶を、次の作業で使える形にする。

README を読む