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 skills add denfry/codebase-index --skill skill_templategit clone --depth 1 https://github.com/denfry/codebase-indexWrote 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.
[](https://agentmods.dev/skills/denfry/codebase-index/skill_template)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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 — 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
- Pick one session tag per conversation (e.g.
auth-fix-1); pass it tosearch/explain. Results already sent in this session print as(already sent)— use your earlier copy. - A header saying
index stale→ runcodebase-index updateonce;NO INDEX→codebase-index index. - Batch independent questions into one Bash call (
cmd1; echo ---; cmd2). # partial:on refs/impact means the list may be incomplete. ForOwner.memberit listspossible_callsites (calls on a variable the index cannot type), nearest first: check those few lines, do not grep the repo.- Before relying on evidence from earlier in a long task, run
codebase-index verify --session <tag> --json. - Grep only when the index returns nothing relevant or for non-code text.
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.
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.
- 27d ago Changed · -46 lines 46e3f89d234c
- 1mo ago Changed · +22 lines · +10 tokens per session 7d06e59150c3
- 1mo ago First seen · 90 lines · 53 tokens per session scan A 1f55dbaa9733
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.
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…
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.
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…
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.
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.
test-failure-explorer
Import and query an existing Vitest 3.2 JSON report to explore test failures, file-level errors and original diagnostic evidence.