codebase-indexing

codebase-indexing is a skill for Claude Code from cdeust/ai-architect-mcp. It costs 4 tokens per session (576 once invoked), scanned A, original, MIT.

A repository-indexing process that scans and analyses a codebase to build a map of its files, code elements, and relationships. A codebase is the complete collection of source files for a software project.

In plain words
What is it for?
Use it when analysing a repository for the first time, after significant code changes, or when codebase searches return stale or empty results.
Why use it?
It helps coding tools understand an unfamiliar repository and refresh that understanding after major changes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the ai-codebase-intelligence plugin — 8 skills shipped together

Good fit Use it when analysing a repository for the first time, after significant code changes, or when codebase searches return stale or empty results.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cdeust/ai-architect-mcp/indexing
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 cdeust/ai-architect-mcp --skill indexing
Clone the repo
git clone --depth 1 https://github.com/cdeust/ai-architect-mcp

Made for: Claude Code.

Or install ai-codebase-intelligence, the plugin that ships this one along with the rest of its 8 skills.

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-indexing

README.md
[![agentmods](https://agentmods.dev/badge/skills/cdeust/ai-architect-mcp/indexing/github.svg)](https://agentmods.dev/skills/cdeust/ai-architect-mcp/indexing)
Your own site
<a href="https://agentmods.dev/skills/cdeust/ai-architect-mcp/indexing"><img src="https://agentmods.dev/badge/skills/cdeust/ai-architect-mcp/indexing/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-indexing

Your own site · 80×15
<a href="https://agentmods.dev/skills/cdeust/ai-architect-mcp/indexing"><img src="https://agentmods.dev/badge/skills/cdeust/ai-architect-mcp/indexing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 576 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.00004 $0.00576
Opus 5 $0.00002 $0.00288
Sonnet 5 $0.00001 $0.00115
Haiku 4.5 $0.00000 $0.00058

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

Security

Grade A, and why

codebase-indexing 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 9d 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.

ai-codebase-intelligence/skills/indexing/SKILL.md · 73 lines

How it starts

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

Codebase Indexing

Purpose

Index a repository to build the knowledge graph. Each phase is a separate tool call — if one fails, diagnose, fix, and continue without losing prior work.

When to Use

  • First time analyzing a repository
  • After significant code changes
  • When codebase tools return stale or empty results

Tools (call in order)

Phase 1: Scan

ai_architect_codebase_scan(repo_path="/path/to/repo")

Returns: file count, language breakdown, total bytes.

If this fails: Check repo_path exists and is a git repository.

Phase 2: Parse + Resolve + Community + Process

ai_architect_codebase_parse(repo_path="/path/to/repo")

Returns: node count, relationship count, communities, processes.

If this fails: The scan succeeded so files exist. Check:

  • tree-sitter grammar available for the language? Check language breakdown from scan.
  • File too large? Default limit is 512KB — skip oversized files.
  • Memory pressure? The 20MB chunk budget bounds per-chunk memory.

If community detection fails: Pipeline continues — communities are optional. Query/context/impact still work without communities.

If process detection returns 0: CALLS edges may have low confidence (< 0.5). This is expected for repos where most calls are cross-file fuzzy matches.

Phase 3: Store

ai_architect_codebase_store(repo_path="/path/to/repo")

Returns: db_path, db_size_mb, node/edge counts.

If this fails: SQLite write error — check disk space and permissions on .codebase-intelligence/ directory.

Convenience: Full Pipeline

ai_architect_codebase_analyze(repo_path="/path/to/repo")

Runs all 3 phases in sequence. Use when you don't need per-phase control.

After Indexing

Verify with:

ai_architect_codebase_query(query="main entry point")

If results are empty, the FTS index may not have built. Call store again.

Recovery Patterns

Error Action
"No files scanned" Wrong repo_path. Check it's absolute and exists.
Parse returns 0 nodes Language not supported or all files too large. Check scan language breakdown.
Store fails Disk full or permissions. Check .codebase-intelligence/ is writable.
Query returns empty after index FTS index didn't build. Re-run store.
Community count is 0 leidenalg/igraph not installed. Install: pip install leidenalg python-igraph

Read the full file on GitHub · 73 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. 9d ago First seen · 73 lines · 4 tokens per session scan A 9ec261b74312

Subscribe to this mod's changes

codebase-indexing is a skill published in the GitHub repository cdeust/ai-architect-mcp (1 stars, last pushed 4mo ago), licensed MIT. It adds 4 tokens to every session and 576 once invoked, about $0.0000 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

hive.slack-notifications-setup

Set up a Slack notification channel (Sentinel) for a colony by driving the browser — reuse or create the "Hive Sentinel" Slack app from a JSON manifest, install it, capture the bot + app tokens, create/select the channel via the Slack API, and turn Sentinel on so the colony can ping the user on Slack and accept…

aden-hive/hive · 136 tokens

hive.chart-creation-foundations

Required reading whenever any chart tool is available. Teaches the one-tool embedding contract (call chartrender → live chart appears in chat AND a downloadable PNG lands in the queen session dir), the ECharts (data viz) vs Mermaid (structural diagrams) decision, the BI/financial-grade aesthetic baseline (no…

aden-hive/hive · 133 tokens

browser-edge-cases

SOP for debugging browser automation failures on complex websites. Use when browser tools fail on specific sites like LinkedIn, Twitter/X, SPAs, or sites with Shadow DOM.

aden-hive/hive · 40 tokens

hive.pdf

Read, write, merge, split, rotate, watermark, encrypt, and OCR PDF files using Python (pypdf, pdfplumber, reportlab, pypdfium2) and command-line tools (poppler-utils, qpdf). Use when the user asks to extract text/tables/images from a PDF, create or modify a PDF, combine or split PDFs, OCR a scanned PDF…

aden-hive/hive · 98 tokens

hive.note-taking

Maintain a free-form scratchpad of decisions, extracted values, and open questions so context pruning doesn't lose anything you still need.

aden-hive/hive · 30 tokens

sdlc-accelerate

End-to-end SDLC ramp-up from idea to construction-ready with automated phase transitions.

jmagly/aiwg · 23 tokens