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/d3x293/code-crew/codebase-indexnpx skills add d3x293/code-crew --skill codebase-indexgit clone --depth 1 https://github.com/d3x293/code-crewWhat 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.00042 | $0.01517 |
| Opus 5 | $0.00021 | $0.00758 |
| Sonnet 5 | $0.00008 | $0.00303 |
| Haiku 4.5 | $0.00004 | $0.00152 |
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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Codebase Index - 3-Layer Memory Optimizer
Build and maintain a progressive disclosure index that prevents agents from reading entire files when they only need a function signature or a specific line range.
When to Activate
- During
/crew init(full build) - During
/crew reindex(full rebuild) - When an agent needs to find code but the index exists (consult mode)
- After file edits (incremental update mode via index-updater skill)
Three-Layer Architecture
Layer 1 - Compact Index (.claude/crew-index.json, ~2-5KB)
The cheapest layer. Costs ~50 tokens to read. Contains just enough to route queries to the right file:
Per-file entry:
hash: SHA-256 of file content (for change detection)size: file size in bytestype: language (javascript, python, typescript, etc.)exports: exported functions/classes/constantsimports: external dependenciesfunctions: all function/method namesclasses: all class nameslines: total line countcategory: core | test | config | docs | utilsummary: 1-line description of what this file does
Global metadata:
version: schema versiongenerated: ISO timestampcontentHash: hash of all file hashes combineddependencies: package dependencies with versionsarchitecture.entryPoint: main entry filearchitecture.pipeline: data flow descriptionarchitecture.patterns: detected patterns (MVC, pipeline, event-driven, etc.)stats: totalFiles, totalLines, languages, lastIndexed
Layer 2 - Symbol Map (.claude/crew-symbols.json, ~5-15KB)
Mid-detail layer. Costs ~100-200 tokens for relevant section. Contains function signatures and relationships:
Per-symbol entry (keyed as filepath::symbolName):
type: function | class | method | constant | typesignature: full signature stringparams: parameter list with types if availablereturns: return type if availablecalls: what this symbol callscalledBy: what calls this symbollineRange: [startLine, endLine]description: 1-line description
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.
- 2d ago First seen · 153 lines · 42 tokens per session scan A 50f243c25b82
codebase-index is a skill published in the GitHub repository d3x293/code-crew (13 stars, last pushed 4mo ago), licensed MIT. It adds 42 tokens to every session and 1,517 once invoked, about $0.0002 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-30.
Other skills, from other repositories
agile-product-owner
../../../product-team/agile-product-owner/skills/agile-product-owner/SKILL.md.
apple-hig-expert
../../../product-team/apple-hig-expert/skills/apple-hig-expert/SKILL.md.
autoresearch-agent
../../../engineering/autoresearch-agent/skills/autoresearch-agent/SKILL.md.
board-prep
../../../c-level-advisor/executive-mentor/skills/board-prep/SKILL.md.
browserstack
../../../engineering-team/playwright-pro/skills/browserstack/SKILL.md.
business-investment-advisor
../../../finance/business-investment-advisor/skills/business-investment-advisor/SKILL.md.