repo-index

repo-index is a skill for Claude Code from WangChangxin0809/repo-agent-harness. It costs 108 tokens per session (2,667 once invoked), scanned A, original, MIT.

A skill for building a searchable graph of a repository's code and documentation. The graph links files, symbols, imports, function calls, and documents, then ranks the parts most related to a task.

In plain words
What is it for?
Use it to index a large repository, find relevant symbols and nearby code, connect documentation to implementation, and give another agent better starting points for investigation.
Why use it?
Basic text search can return too many results or miss the connections that explain how a change will affect the code.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: mentions subagents; built for aider.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the repo-agent-harness plugin — 6 skills, 1 agent, 4 hooks shipped together

Good fit Use it to index a large repository, find relevant symbols and nearby code, connect documentation to implementation, and give another agent better starting points for investigation.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add WangChangxin0809/repo-agent-harness
Claude Code
/plugin install repo-agent-harness

Made for: Claude Code.

Or install repo-agent-harness, the plugin that ships this one along with the rest of its 6 skills, 1 agent, 4 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 repo-index

README.md
[![agentmods](https://agentmods.dev/badge/skills/wangchangxin0809/repo-agent-harness/repo-index/github.svg)](https://agentmods.dev/skills/wangchangxin0809/repo-agent-harness/repo-index)
Your own site
<a href="https://agentmods.dev/skills/wangchangxin0809/repo-agent-harness/repo-index"><img src="https://agentmods.dev/badge/skills/wangchangxin0809/repo-agent-harness/repo-index/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 repo-index

Your own site · 80×15
<a href="https://agentmods.dev/skills/wangchangxin0809/repo-agent-harness/repo-index"><img src="https://agentmods.dev/badge/skills/wangchangxin0809/repo-agent-harness/repo-index.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,667 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.
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.00108 $0.02667
Opus 5 $0.00054 $0.01333
Sonnet 5 $0.00022 $0.00533
Haiku 4.5 $0.00011 $0.00267

Measured 12d ago against content hash cb4c36b71874, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

repo-index 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 12d 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.

skills/repo-index/SKILL.md · 216 lines

How it starts

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

One graph, two tiers

Governs: shared/scripts/index/

Retrieval fails in repositories for a specific reason: the useful unit is not a paragraph, it is a symbol and its neighbourhood. A chunk-and-embed pipeline returns files that talk about authentication; what the task needs is the four functions that would break.

So: one graph, built from source, queried two ways. Not a stack of retrievers — an extra retriever whose results have to be merged is a second ranking problem on top of the one you had.

The graph

Nodes are file:<path>, sym:<path>:<name>, and doc:<path>. Edges:

Edge From Weight
defines file → symbol tree-sitter tags
references file → symbol tree-sitter tags, split across definers
imports file → file resolved import statements
calls symbol → symbol call sites inside a definition's span
governs doc → path a Governs: src/billing/ line in the doc's head
supersedes doc → doc Supersedes: 0004

A symbol node is keyed by the file that defines it. Keying by bare name merges every definition sharing it, and the merged node then dominates the graph: in this plugin's own repository sym:main — sixteen unrelated def main() — had a higher degree than any real file, and seeding on one guard ranked an empty template second because five guards define check. Bare names are still how a reference resolves and how --seed matches; they are just no longer the node. A reference to an ambiguous name contributes 1/N to each candidate, and --report lists which names are ambiguous.

Governs: is the edge that makes documents reachable from code. Without it, docs and code are two disconnected components and no amount of ranking bridges them. It is a plain line in the document's first 60 lines — no --- fence needed. Targets are matched by path segment, so Governs: src/bill covers src/bill and src/bill/… and does not reach src/billing_old/; a trailing slash is allowed and changes nothing. See writing-docs for the convention.

Read the full file on GitHub · 216 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. 12d ago First seen · 216 lines · 108 tokens per session scan A cb4c36b71874

Subscribe to this mod's changes

repo-index is a skill published in the GitHub repository WangChangxin0809/repo-agent-harness (2 stars, last pushed 13d ago), licensed MIT. It adds 108 tokens to every session and 2,667 once invoked, about $0.0005 per session on Opus 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-31.

Related

Other skills, from other repositories

root-cause-first

A debugging discipline that requires finding the underlying cause of a bug before changing the code. It also sets rules for handling errors, fallbacks, retries, and temporary diagnostics.

jx-hxxx/hi-vibe · 88 tokens

self-audit

Use when checking an existing contextualizer for drift — stale dates, broken URLs, catalog/content disagreement, and more — every two to four weeks; read-only unless the user opts into fixing the deterministic checks.

nick-railsback/skill-engine · 45 tokens

debug

Systematic 4-phase debugging with escalation protocol. Use when saying "debug", "investigate bug", "find root cause", "why is this failing", or "fix this bug".

anton-abyzov/specweave · 38 tokens

dead-code-cleanup

Use when the user asks about cleanup, removing unused code, refactoring, reducing bundle size, or identifying dead code in a Repowise-indexed codebase (.repowise/ directory exists). Also activates when discussing technical debt, code hygiene, or repository maintenance.

repowise-dev/repowise · 59 tokens

status

Verify gnosis-mcp server connectivity, schema integrity, and corpus health. Use when MCP calls fail, return empty, or return unexpected data.

nicholasglazer/gnosis-mcp · 31 tokens

root-cause

Find the mechanism behind a failure instead of patching its symptom - reproduce first, one variable per experiment with the prediction written before the run, exit by naming the mechanism and pinning it with a failing test. Use for a bug, an unexplained red test, or a failure that will not reproduce.

jjanczur/tyran · 61 tokens