codebase-memory

codebase-memory is a skill for Claude Code from brain-bootstrap/claude-code-brain-bootstrap. It costs 43 tokens per session (631 once invoked), scanned A, original, MIT.

A map of a codebase that shows how functions and other parts connect. It can answer questions about call paths, architecture, unused code, and which areas a change may affect.

In plain words
What is it for?
Use it to trace what calls a function, find what it calls, inspect the architecture, locate code by name or label, find unused functions, and identify affected execution flows.
Why use it?
It helps you understand a large codebase without opening files one by one. This reduces the effort needed to trace behavior and estimate change impact.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to trace what calls a function, find what it calls, inspect the architecture, locate code by name or label, find unused functions, and identify affected execution flows.

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

Made for: Claude Code.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/brain-bootstrap/claude-code-brain-bootstrap/codebase-memory"><img src="https://agentmods.dev/badge/skills/brain-bootstrap/claude-code-brain-bootstrap/codebase-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 631 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.00043 $0.00631
Opus 5.5 $0.00017 $0.00252
Sonnet 5.5 $0.00009 $0.00126
Haiku 4.5 $0.00004 $0.00063

Measured 1mo ago against content hash 304743b786c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

codebase-memory 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 1mo 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.

.claude/skills/codebase-memory/SKILL.md · 61 lines

How it starts

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

Codebase Memory — Structural Graph

Zero-file-read structural analysis. Always try these tools BEFORE reading files for structural questions.

Quick Decision Matrix

Question Tool
What calls foo()? trace_path(function_name="foo", direction="inbound")
What does foo() call? trace_path(function_name="foo", direction="outbound")
Full call chain trace_path(direction="both", depth=3)
Impact of my change detect_changes(base_branch="main")
Architecture overview get_architecture
Find by name/pattern search_graph(name_pattern="Auth.*")
Find by label search_graph(label="Class")
Dead code search_graph(max_degree=0, label="Function")
Custom query query_graph(query="MATCH (n:Function)-[:CALLS]->(m) RETURN n.name, m.name LIMIT 20")
Execution flows list_flows → get_affected_flows
ADR management manage_adr(mode="get")

Workflow — First Use

  1. index_repository(repo_path=".") — first run only (~6s for 500 files)
  2. list_projects — verify indexed
  3. get_architecture — architecture map

Workflow — Before Reviewing Changes

  1. detect_changes(base_branch="main") → risk score + blast radius
  2. get_affected_flows → which execution paths break
  3. trace_path on highest-risk functions

Workflow — Exploration

  1. get_architecture → community map, entry points
  2. search_graph(name_pattern="<keyword>") → find relevant nodes
  3. trace_path → traverse from found nodes
  4. get_code_snippet(qualified_name="<name>") → source with context

Known Gotchas

  1. search_graph(relationship="HTTP_CALLS") filters by degree — use query_graph for actual edge inspection
  2. query_graph has a 200-row cap — use search_graph with degree filters for counts
  3. trace_path requires exact qualified names — use search_graph(name_pattern=...) first
  4. direction="outbound" misses cross-service callers — use direction="both"
  5. Results default to 10 per page — check has_more and paginate with offset

Read the full file on GitHub · 61 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. 1mo ago First seen · 61 lines · 43 tokens per session scan A 304743b786c8

Subscribe to this mod's changes

codebase-memory is a skill published in the GitHub repository brain-bootstrap/claude-code-brain-bootstrap (11 stars, last pushed 5mo ago), licensed MIT. It adds 43 tokens to every session and 631 once invoked, about $0.0002 per session on Opus 5.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.

Related

Other skills, from other repositories

inspector-workbench

Runs Inspector UI work on the standalone Threads state lab so the agent can see the overlay. Use when a CopilotKit employee asks an agent to fix, polish, add, or debug Inspector UI, chrome, panes, overlay actions, launcher, Home, Threads, Playground, Memory, or any visual behavior in @copilotkit/web-inspector. Don't…

CopilotKit/CopilotKit · 112 tokens

potpie-debug-memory

Use while debugging or troubleshooting failures, flaky tests, incidents, production alerts, CI failures, local dev setup issues, repeated bugs, prior fixes, failed attempts, and verification history.

potpie-ai/potpie · 41 tokens

md-audit

Read-only code quality audit — scan the current working directory for common issues (bugs, dead code, security hotspots, missing error handling) and return a prioritised findings report. No files are edited. Use when asked to "audit the code", "quick audit", "find issues", "code scan", or "what's wrong with this…

chaitanyagiri/munder-difflin · 85 tokens

browserwing-admin

Manage and operate BrowserWing — an intelligent browser automation platform. Install dependencies, configure LLM, create/manage/execute automation scripts, use AI-driven exploration to generate scripts, browse the script marketplace, and troubleshoot issues.

MemTensor/MemOS · 47 tokens

code-refactoring-context-restore

Restore saved project context, architectural decisions, and work state. Use when resuming interrupted work, retrieving prior context, or merging context across sessions.

rmyndharis/antigravity-skills · 36 tokens

exploiting-format-string-vulnerabilities

Methodology for exploiting format string bugs where attacker-controlled data reaches the format argument of printf-family functions, enabling stack/memory disclosure (info leaks for ASLR/PIE/canary defeat) and arbitrary write primitives (%n) to hijack control flow via GOT/.finiarray overwrites.

xalgorix/xalgorix · 69 tokens