← ClaudeAtlas

sync-codebaselisted

Build or update the reviewer base index (vector store + code graph) from a local repo clone. Use when the user asks to "index the codebase", "build the index", "sync the code", "rebuild the graph", "просиндексируй код", "построй индекс".
mimfort/rag_for_git · ★ 21 · AI & Automation · score 78
Install: claude install-skill mimfort/rag_for_git
# Sync Codebase Builds or updates the reviewer base index — vector embeddings (Postgres/pgvector) and code graph (Neo4j) — from a local repo clone using `reviewer index`. This is a one-time setup operation; subsequent runs are incremental (only changed files are re-embedded). ## Inputs Parse from $ARGUMENTS (all optional): - `--path <path>`: path to the local repo clone. Default: current working directory. - `--ref <branch>`: git ref to index. Default: `main`. - `--repo <owner/name>`: repo identifier for multi-repo setups. If omitted, derived automatically from `git remote get-url origin`. - `--backend <auto|scip|treesitter>`: graph backend override. Default: `auto` (SCIP if in PATH, else tree-sitter). ## Pipeline 1. **Resolve inputs.** If `--path` not given, use the current working directory. If `--ref` not given, use `main`. If `--repo` not given, run: ```bash git -C <path> remote get-url origin ``` Strip `.git` suffix, extract the last two path segments (`owner/name`). 2. **Check prerequisites.** Verify: - `uvx` is available: `uvx --version` succeeds. - The path is a git repo: `git -C <path> rev-parse --git-dir` succeeds. - The reviewer MCP server is reachable (run `reviewer check` or confirm the user has `.env` configured with `PG_DSN`, `NEO4J_URI`, `VOYAGE_API_KEY`). - Docker services are up if using the default stack: `docker compose ps` shows `paradedb` and `neo4j` running. - Stop and tell the user what is missing if an