understand-codebase

A codebase-mapping workflow that builds an evidence-based picture of an unfamiliar repository, including its files, symbols, dependencies, and gaps in analysis.

In plain words
What is it for?
Use it to understand architecture, locate relevant code, investigate unfamiliar areas, explain dependencies, and check structural claims about a repository.
Why use it?
It reduces guesswork before changing or debugging code and makes clear when the map is incomplete.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/cdeust/ai-architect-mcp-codebase/understand-codebase
Any agent
npx skills add cdeust/ai-architect-mcp-codebase --skill understand-codebase
Clone the repo
git clone --depth 1 https://github.com/cdeust/ai-architect-mcp-codebase

Made for: Claude Code, Codex.

Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 373 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00045 $0.00373
Opus 5 $0.00023 $0.00187
Sonnet 5 $0.00009 $0.00075
Haiku 4.5 $0.00005 $0.00037

Measured 2d ago against content hash 5efece92fcee, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

understand-codebase 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.

plugins/ai-architect-mcp-codebase/skills/understand-codebase/SKILL.md · 24 lines

What it actually says

Understand Codebase

Use the eight-tool core profile. Do not assume that pipeline-only tools are available.

Workflow

  1. Call health_check and record the active profile and tool count. Stop with an installation or configuration instruction if the server is unavailable.
  2. Resolve the repository root to an absolute path. Choose a task-scoped, absolute, writable output_dir for graph artifacts; never use the source root or a broad system directory as that output.
  3. Call analyze_codebase with the repository path and output directory. Reuse the exact graph_path returned by the tool in every later call.
  4. Immediately call query_graph with graph="missed". Treat parse-incomplete, skipped, and quarantined files as explicit coverage gaps. Absence from this report is not proof of complete indexing.
  5. Use search_codebase to discover qualified symbol names. Drill into relevant hits with get_context or get_symbol; do not guess qualified names.
  6. Use read-only query_graph queries for structural questions the typed tools do not answer. Add ORDER BY before paging with next_offset.
  7. For any important negative result, inspect the coverage report and use ordinary file search on the flagged files or ranges before concluding that a symbol or edge does not exist.

Deliverable

Return a compact map of entry points, components, important symbols, dependencies, and execution flows. Tie every structural claim to a tool result. Label interpretations as inferences and list uncovered files or unresolved references as limitations.

Files

What ships with it

1 file 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. 2d ago First seen · 24 lines · 45 tokens per session scan A 5efece92fcee

Subscribe to this mod's changes

understand-codebase is a skill published in the GitHub repository cdeust/ai-architect-mcp-codebase (4 stars, last pushed 2d ago), licensed MIT. It adds 45 tokens to every session and 373 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-31.

Related

Other skills, from other repositories

roam

Codebase comprehension via roam-code CLI. Use when exploring codebases, planning modifications, debugging failures, assessing PR risk, or checking architecture health. Triggers on: understanding project structure, pre-change safety checks, finding symbols/files, blast radius analysis, affected tests, health scoring…

Cranot/roam-code · 86 tokens

m1nd-operator

Use when the user mentions m1nd or when repo investigation, search, review, docs/spec work, or risky change prep should go through m1nd first before grep, glob, or manual file reads. Covers m1nd-first routing, L1GHT and universal document ingestion, risky edit preparation, document-to-code binding, the served owner +…

maxkle1nz/m1nd · 111 tokens

m1nd-first

Use when investigating a repository, searching for implementation, reviewing changes, working from specs/docs, or preparing a risky code change in an environment where m1nd is available. This doctrine makes m1nd the first investigative layer before grep, glob, or manual file reads, except when the task is pure…

maxkle1nz/m1nd · 78 tokens

m1nd-guardian

Use when continuing, coordinating, reviewing, or handing off the M1ND-10 program; protecting its candidate tree; advancing G0-G10; freezing or releasing a candidate; activating autonomy; or when the user asks an agent to act as M1ND guardian. Enforces one-active-front execution, proof-state separation, same-candidate…

maxkle1nz/m1nd · 99 tokens

adding-a-language

How a new language enters Kivgraph's graph - the two routes and why one of them is almost always wrong, the four decisions that cannot be migrated later, the branches that decide what your language is without asking, and the gates that fail closed. Use when adding or extending language support, when touching…

Luqueee/kivgraph · 90 tokens

codestory-grounding

Use when an agent should ground a local repository with CodeStory before making source claims, planning edits, choosing tests, reviewing changes, or using broad retrieval evidence through the CodeStory plugin MCP.

TheGreenCedar/CodeStory · 44 tokens