sync-codebase

sync-codebase is a skill for Claude Code from mimfort/rag_for_git. It costs 66 tokens per session (907 once invoked), scanned A, original, MIT.

A codebase indexing tool that builds searchable representations of a local Git repository, including code embeddings and a code relationship graph. Later runs update only changed files.

In plain words
What is it for?
Use it to index or refresh a repository, choosing its path, branch, repository identifier, and optional graph-building method.
Why use it?
It gives code-review and search systems current knowledge of the repository instead of relying on stale or incomplete context.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Part of the rag-reviewer plugin — 14 skills, 2 hooks shipped together

Good fit Use it to index or refresh a repository, choosing its path, branch, repository identifier, and optional graph-building method.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mimfort/rag_for_git/sync-codebase
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mimfort/rag_for_git --skill sync-codebase
Clone the repo
git clone --depth 1 https://github.com/mimfort/rag_for_git

Made for: Claude Code.

Or install rag-reviewer, the plugin that ships this one along with the rest of its 14 skills, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sync-codebase

README.md
[![agentmods](https://agentmods.dev/badge/skills/mimfort/rag_for_git/sync-codebase/github.svg)](https://agentmods.dev/skills/mimfort/rag_for_git/sync-codebase)
Your own site
<a href="https://agentmods.dev/skills/mimfort/rag_for_git/sync-codebase"><img src="https://agentmods.dev/badge/skills/mimfort/rag_for_git/sync-codebase/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sync-codebase

Your own site · 80×15
<a href="https://agentmods.dev/skills/mimfort/rag_for_git/sync-codebase"><img src="https://agentmods.dev/badge/skills/mimfort/rag_for_git/sync-codebase.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 907 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 42
    uvx/uv tool run commands without ==version create a rug-pull risk.
    Fix: Pin the version: uvx package-name==1.2.3
  • medium MCP Rug Pull · line 52
    uvx/uv tool run commands without ==version create a rug-pull risk.
    Fix: Pin the version: uvx package-name==1.2.3
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00066 $0.00907
Opus 5.5 $0.00026 $0.00363
Sonnet 5.5 $0.00013 $0.00181
Haiku 4.5 $0.00007 $0.00091

Measured 1mo ago against content hash 884a04898822, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sync-codebase scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugin/skills/sync-codebase/SKILL.md · 74 lines

How it starts

The opening of the file, as written. The whole thing — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

    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 any check fails.
  3. Run indexing.

    uvx --from rag-reviewer reviewer index <path> --ref <ref>
    

    Add --repo <owner/name> if resolved or provided. Stream the output to the user.

    Expected duration: seconds for small repos, minutes for large ones — Voyage free tier (3 RPM / 10K TPM) causes throttling with automatic retry/backoff. That is normal, not an error. Use --limit N (if supported) for a quick smoke run.

  4. Verify. After indexing completes, optionally run a diagnostic search to confirm the corpus:

    uvx --from rag-reviewer reviewer search "your query here"
    

    Or call search_code via the reviewer MCP tools directly.

Read the full file on GitHub · 74 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 74 lines · 66 tokens per session scan A 884a04898822

Subscribe to this mod's changes

sync-codebase is a skill published in the GitHub repository mimfort/rag_for_git (20 stars, last pushed 6d ago), licensed MIT. It adds 66 tokens to every session and 907 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

advisor-orchestrator-worker

Use when a task is too large for one model pass, needs parallel research or generation across many subtasks (like researching a dozen competitors at once), or the user asks to orchestrate multiple models, split work across a model team, run an advisor-worker loop, have a stronger model review the plan while cheap…

Shubhamsaboo/awesome-llm-apps · 100 tokens

rag-code-review

When performing code review on a PR, diff, snippet, or "look at this change" request, first consult the corpus for related ADRs, coding standards, prior patterns, and similar files. Grounds review comments in the team's actual decisions instead of generic best practices. Trigger on any review-style request — "review"…

lyonzin/knowledge-rag · 83 tokens

rag-techniques-contribution-guidelines

Checks a RAGTechniques pull request against the repository's contribution guidelines (CONTRIBUTING.md): where new technique notebooks go, the README list entry and table row every new technique needs, the required notebook structure, and notebook hygiene. Use on any PR that adds or changes a notebook under…

NirDiamant/RAG_Techniques · 111 tokens

world-model-diagnostic

Twenty-minute diagnostic mapping a team to a world-model paradigm (vector DB, structured ontology, signal-fidelity). Use when you say "run the world model diagnostic", "audit our world model", "which world model architecture fits us", or "audit where we automate judgment". Use for AI readiness assessments and…

rjmurillo/ai-agents · 94 tokens

answer-audit

Adversarially audit a RAG answer against the corpus it claims to cite. Use when asked to review, critique, sanity-check, or "give skeptical feedback on" an answer produced by Canon (or any retrieval-grounded system) — especially when the answer looks good. Assumes the answer is wrong until each claim is proven…

olehsvyrydov/AI-development-team · 78 tokens

x-bug2rag

A knowledge-capture tool that turns reusable bug explanations into a local RAG collection, meaning a searchable store of text that an agent can retrieve later. It records the trigger, incorrect implementation, correct implementation, and observable difference.

KtKID/x-dev-pipeline · 255 tokens