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.
npx agentmods add skills/denfry/codebase-index/skill_templatenpx skills add denfry/codebase-index --skill skill_templategit clone --depth 1 https://github.com/denfry/codebase-indexWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00053 | $0.00981 |
| Opus 5 | $0.00026 | $0.00491 |
| Sonnet 5 | $0.00011 | $0.00196 |
| Haiku 4.5 | $0.00005 | $0.00098 |
Grade A, and why
codebase-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 yesterday.
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.
This is a copy
100% identical to codebase-index — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Codebase Index
Use the local index before reading repository files.
The operating principle is Find → Trace → Predict:
- Find the implementation with ranked retrieval.
- Trace behavior through definitions, callers, dependencies, and paths.
- Predict change impact while preserving an explicit evidence trail.
Route the question
| Intent | Command |
|---|---|
| Where is X implemented? | codebase-index search "X" --json |
| How does X work? | codebase-index explain "X" --json |
| What is this codebase? | codebase-index architecture --json |
| Find a named symbol | codebase-index symbol "X" --json |
| Who calls or references X? | codebase-index refs "X" --json |
| What changes if X changes? | codebase-index impact "X" --json |
| What does my current diff affect? | codebase-index diff-impact --json |
| How are X and Y connected? | codebase-index path "X" "Y" --json |
| Describe X and its neighborhood | codebase-index describe "X" --json |
| Produce a human graph | codebase-index graph "X" --output <path> |
Use search --mode symbol for exact symbol work, --mode fts for text and
error messages, and the default hybrid mode for mixed questions. Use pure
vector mode only when embeddings are enabled and exact vocabulary is unknown.
Read references/commands.md only when command options or routing remain unclear.
Evidence protocol
- Run the best-matching command with
--json. - Check
indexbefore trusting the payload:- missing → run
codebase-index index, then repeat; - stale with fewer than 20 changed files → run
codebase-index update; - stale with 20 or more changed files → run
codebase-index index; - fresh → continue.
- missing → run
- Start with ranks 1–3. Read only
recommended_readsline ranges. - Trace one additional hop only when the question requires behavior, ownership, or impact.
- Answer with
file:lineevidence and state uncertainty explicitly.
Do not open whole files when a line range is available. A snippet may already
be sufficient. skeletonized: true means the response intentionally folded
unrelated body lines; read the supplied range when the missing body matters.
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- yesterday First seen · 90 lines · 53 tokens per session scan A 1f55dbaa9733
codebase-index is a skill published in the GitHub repository denfry/codebase-index (7 stars, last pushed 1mo ago), licensed MIT. It adds 53 tokens to every session and 981 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to codebase-index, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
optimize-accuracy-first
Diagnose, design, implement, and validate system optimizations while treating correctness, retrieval quality, bounded behavior, and avoided downstream work as primary outcomes. Use for performance, latency, CPU, memory, storage, indexing, search, retrieval, caching, batching, concurrency, tokenizer, database, or…
codebase-search
Semantic code and documentation search by meaning. Use codebasepeek to find WHERE code is (saves tokens), codebasesearch to see actual code. For exact identifiers, use grep instead. Search local codebase before using websearch for code/library/API/example questions.
codebase-search
Preferred local codebase-understanding workflow for Pi and Codex. Start with codebasecontext before shell search or broad reads, then use specialized semantic and graph tools.
wiki
Rebuild a flow-first project wiki using the mimirs wiki MCP tool. Use when the user asks to generate, rebuild, refresh, or write the wiki for a codebase.
review-pr-comments
Fetch PR review comments via gh CLI, classify them (valid & fix / valid & skip / invalid), fix the valid ones, reply and resolve the threads, and fix any CI failures. Invoke only when the user types /review-pr-comments — never auto-trigger.
extract-terminology
Walk a project's documentation and code, extract the domain terminology (abbreviations, service names, product names, domain concepts), and record each term into the paparats glossary via the termrecord MCP tool. Deduplicates against existing terms through the built-in similarity gate. Invoke only when the user types…