From 390d51d13d8ce10fd8431fb0fc2492615936d543 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Tue, 3 Nov 2026 23:24:36 +0100 Subject: [PATCH] feat(kvb-agent-optimize): index every repository a session opens Once codebase-memory-mcp is installed, the global install switches its auto_index on (codebase-memory-mcp config set auto_index true), so every repository a session opens is indexed and watched without a per-repository step; without the binary, install warns and points at kvb-agent-optimize. The skill's index step now checks index_status and indexes by hand only where the graph is missing, then check_index_coverage. Co-Authored-By: Claude Opus 5.5 --- scripts/install.sh | 6 ++++++ skills/kvb-agent-optimize/SKILL.md | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 8ba0a6a..3a758c7 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -64,6 +64,12 @@ if [[ "${TARGET}" == "${HOME}" ]]; then else warn "skills: no systemd user session; skipped the kvb-dream notification timer." fi + if command -v codebase-memory-mcp &>/dev/null; then + log "skills: auto-indexing every repository a session opens into the code graph" + codebase-memory-mcp config set auto_index true + else + warn "skills: codebase-memory-mcp not installed; the code graph stays off (see kvb-agent-optimize)." + fi fi log "skills: done. Restart your agent to load the skills." diff --git a/skills/kvb-agent-optimize/SKILL.md b/skills/kvb-agent-optimize/SKILL.md index 3a53e4c..360d2ab 100644 --- a/skills/kvb-agent-optimize/SKILL.md +++ b/skills/kvb-agent-optimize/SKILL.md @@ -33,8 +33,12 @@ installed, and the state of the shared snapshot claude plugin install codebase-memory@codebase-memory ``` -- **Index** with the MCP tool `index_repository` on the repository path, then - `check_index_coverage`; every file kind it leaves out is a finding. +- **Index**: once installed, the skills repository's `make install` switches + `auto_index` on, so every repository a session opens is indexed and + watched; every skill that explores code asks the graph first. Check it with + `index_status`, index by hand with `index_repository` only where it is + missing, then `check_index_coverage`; every file kind it leaves out is a + finding. - **Snapshot**: ask whether the repository shares its graph. Shared: run `index_repository` with `persistence: true` and commit `.codebase-memory/graph.db.zst` at a fixed cadence (every commit of it adds