codebase-index

codebase-index is a skill for Claude Code from denfry/codebase-index. It costs 63 tokens per session (964 once invoked), scanned A, a copy of codebase-index, MIT.

A local repository-analysis guide that searches an indexed codebase before inspecting source files.

In plain words
What is it for?
Use it to locate code, explain behavior, map references and data paths, review architecture, investigate bugs, and assess refactoring risks.
Why use it?
It makes repository questions more focused by tracing evidence about implementations, callers, dependencies, and change impact.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the codebase-index plugin — 3 skills, 1 command, 1 agent, 2 hooks shipped together

Good fit Use it to locate code, explain behavior, map references and data paths, review architecture, investigate bugs, and assess refactoring risks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/denfry/codebase-index/skill_template
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 denfry/codebase-index --skill skill_template
Clone the repo
git clone --depth 1 https://github.com/denfry/codebase-index

Made for: Claude Code.

Or install codebase-index, the plugin that ships this one along with the rest of its 3 skills, 1 command, 1 agent, 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 codebase-index

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/denfry/codebase-index/skill_template"><img src="https://agentmods.dev/badge/skills/denfry/codebase-index/skill_template.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 964 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 100% copy Near-identical to another mod 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.00063 $0.00964
Opus 5.5 $0.00025 $0.00386
Sonnet 5.5 $0.00013 $0.00193
Haiku 4.5 $0.00006 $0.00096

Measured 27d ago against content hash 46e3f89d234c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 27d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/cbx.ps1), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Origin

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.

src/codebase_index/skill_template/SKILL.md · 66 lines

How it starts

The opening of the file, as written. The whole thing — 66 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. It answers with ranked, numbered lines, so most answers need no Read and no Grep at all.

Route the question — always --compact

Intent Command
Where / how does X work? codebase-index search "X" --compact --session <tag>
Overview of a feature codebase-index explain "X" --compact --session <tag>
Every caller / call site of X codebase-index refs "Owner.member" --compact
What breaks if X changes (incl. other modules) codebase-index impact "Owner.member" --compact
Find a definition codebase-index symbol "X"
A class: members, who uses it codebase-index describe "Class" --json
What does my diff affect? codebase-index diff-impact --json
Is what I read earlier still true? codebase-index verify --session <tag> --json

--compact prints path:start-end symbol per result with the matching lines numbered underneath ( 24| public static final String FILE_ID = ...). Cite those lines as path:24 directly. Read a range only when the lines shown do not answer the question — and then only that range, never the whole file.

Name members as Owner.member (TownService.refresh, activation::place, CoreError::ObjectDamaged) so same-named methods of other types are excluded. refs --compact lines are path:line kind caller -> target: the list of call sites with the calling function is usually the whole answer. Add --exclude-tests for production-only lists and --path <prefix> for one module. kind reference is a non-call use, e.g. an enum variant matched in a match arm.

impact --compact starts with # module <m>: build files depending on it: ... — the answer to "does another module depend on this", with no build-file grep.

Protocol

  1. Pick one session tag per conversation (e.g. auth-fix-1); pass it to search/explain. Results already sent in this session print as (already sent) — use your earlier copy.
  2. A header saying index stale → run codebase-index update once; NO INDEX → codebase-index index.
  3. Batch independent questions into one Bash call (cmd1; echo ---; cmd2).
  4. # partial: on refs/impact means the list may be incomplete. For Owner.member it lists possible_call sites (calls on a variable the index cannot type), nearest first: check those few lines, do not grep the repo.
  5. Before relying on evidence from earlier in a long task, run codebase-index verify --session <tag> --json.
  6. Grep only when the index returns nothing relevant or for non-code text.

Read the full file on GitHub · 66 lines

Files

What ships with it

6 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.

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. 27d ago Changed · -46 lines 46e3f89d234c
  2. 1mo ago Changed · +22 lines · +10 tokens per session 7d06e59150c3
  3. 1mo ago First seen · 90 lines · 53 tokens per session scan A 1f55dbaa9733

Subscribe to this mod's changes

codebase-index is a skill published in the GitHub repository denfry/codebase-index (10 stars, last pushed 16d ago), licensed MIT. It adds 63 tokens to every session and 964 once invoked, about $0.0003 per session on Opus 5.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.

Related

Other skills, from other repositories

codegraph

Analyze indexed codebases via graph database (neug) and vector index (zvec). Covers call graphs, dependencies, dead code, hotspots, module coupling, architecture reports, semantic search, impact analysis, bug root cause from GitHub issues, class diagrams (UML), and PR review (risk scoring, conflict detection…

QwenLM/qwen-code · 0 tokens

stuck

Diagnose frozen, stuck, or slow Qwen Code sessions on this machine. Scans for problematic processes, high CPU/memory usage, hung subprocesses, and debug logs. Use /stuck or /stuck to focus on a specific process.

QwenLM/qwen-code · 57 tokens

structured-debugging

Hypothesis-driven debugging methodology for hard bugs. Use this skill whenever you're investigating non-trivial bugs, unexpected behavior, flaky tests, or tracing issues through complex systems. Activate proactively when debugging requires more than a quick glance — especially when the first attempt at a fix didn't…

QwenLM/qwen-code · 85 tokens

memory-leak-debug

Diagnose memory leaks in the Qwen Code CLI using heap snapshots and the chrome-devtools CLI. Use when investigating high memory usage, unbounded growth, or suspected object retention issues.

QwenLM/qwen-code · 42 tokens

bugfix

Fix a bug from a GitHub issue, following the reproduce-first workflow. Use when the user asks to fix a bug, investigate a GitHub issue, or debug a user-reported problem. Takes a GitHub issue URL or number as input.

QwenLM/qwen-code · 53 tokens

test-failure-explorer

Import and query an existing Vitest 3.2 JSON report to explore test failures, file-level errors and original diagnostic evidence.

QwenLM/qwen-code · 32 tokens