codebase-memory-mcp

codebase-memory-mcp is a skill for Claude Code, Codex from OKHP3/skillz. It costs 77 tokens per session (1,413 once invoked), scanned A, original, MIT.

A codebase knowledge tool for exploring unfamiliar software and tracing symbols, callers, dependencies, and data flow. Its results are checked against the actual source code before strong conclusions are made.

In plain words
What is it for?
Finding definitions and usages, mapping architecture, tracing data flow, assessing impact, and investigating dead or complex code.
Why use it?
It speeds up discovery when you need to understand how parts of a repository relate to each other or what a change might affect.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Finding definitions and usages, mapping architecture, tracing data flow, assessing impact, and investigating dead or complex code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/okhp3/skillz/codebase-memory-mcp
View source ↗ OKHP3/skillz
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 OKHP3/skillz --skill codebase-memory-mcp
Clone the repo
git clone --depth 1 https://github.com/OKHP3/skillz

Made for: Claude Code, Codex.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/okhp3/skillz/codebase-memory-mcp"><img src="https://agentmods.dev/badge/skills/okhp3/skillz/codebase-memory-mcp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,413 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.00077 $0.01413
Opus 5 $0.00039 $0.00707
Sonnet 5 $0.00015 $0.00283
Haiku 4.5 $0.00008 $0.00141

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

Security

Grade A, and why

codebase-memory-mcp 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 6d 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.

community/codebase-memory-mcp/SKILL.md · 53 lines

How it starts

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

Codebase Memory MCP

Use the configured Codebase Memory graph as a discovery accelerator, not as the sole source of truth. Confirm graph-derived conclusions with source snippets or local files before editing code or making strong claims.

Evidence Levels

  • Scout — Provisional positive orientation only. Do not make absence, exhaustive, dead-code, or complete-impact claims.
  • Verify — Default for task-directed work. Check freshness where material, exact source snippets, relevant traces, path coverage, and every result page needed by the claim.
  • Auditor — Use for negative, exhaustive, security, dead-code, architecture-boundary, and complete-impact work. Require the current index generation, a bounded scope, complete result streams, coverage inspection, and source checks for gaps.

Match the evidence level to the claim. If Auditor evidence cannot be completed, state the bounded limitation instead of making an absolute claim.

Workflow

  1. Discover the Codebase Memory tools exposed by the current MCP client; clients may prefix or rename tool namespaces.
  2. Call list_projects first. Select only the entry whose canonical root_path matches the live checkout, and retain both its exact project name and root for later calls. If no entry matches, continue with rooted local exploration or ask before indexing when graph access is important; never substitute a similarly named project.
  3. Before branch-sensitive or edit-sensitive conclusions, use index_status and verify the actual version-control state. Use detect_changes only when its Git base and head are valid for the checkout. If it unexpectedly reports zero changes, or the checkout uses another VCS, inspect that VCS's status or diff before claiming no impact.
  4. Use get_architecture once for unfamiliar structure. Request clusters to discover de-facto module seams. Treat cycles as an opt-in whole-call-graph scan: path does not scope cycle detection, so verify relevant cycles before making module-local claims.
  5. Use search_graph for definitions, implementations, routes, classes, interfaces, and related symbols. Prefer a natural-language query for discovery and a name or qualified-name pattern for known symbols. Narrow by label or path and set a result limit. For exhaustive claims, increase offset by limit while has_more is true.
  6. Use search_code or normal repository search for literal strings, configuration keys, test identifiers, error messages, and non-code files. Do not turn a precise text lookup into a broad graph query.
  7. After graph search, use get_code_snippet with the returned qualified name. If source snippets are unavailable, open the local file before relying on the result.
  8. Use trace_path for callers, callees, dependency paths, data flow, cross-service paths, and impact analysis. Include tests when the claim covers them. While truncated is true, pass next back as cursor with every other argument unchanged.
  9. After identifying candidate files, call check_index_coverage for every cited path. Before negative or exhaustive claims, also check the relevant scopes; advance scope_offset to each next_offset while has_more is true. This metadata is best-effort, not proof of completeness. Inspect local source for partial, skipped, excluded, stale, or otherwise uncovered paths.
  10. Use get_graph_schema before custom query_graph calls. Reserve them for bounded multi-hop or aggregate questions, apply LIMIT or max_rows, and use graph="missed" to audit files the main graph did not fully index.
  11. Complete every relevant result stream before an exhaustive claim. For bounded discovery, stopping early is acceptable when the result states its limit or truncation. When graph and checked-out source disagree, treat source as current and report likely index drift.

Read the full file on GitHub · 53 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. 6d ago First seen · 53 lines · 77 tokens per session scan A 46a39430c65c

Subscribe to this mod's changes

codebase-memory-mcp is a skill published in the GitHub repository OKHP3/skillz (3 stars, last pushed yesterday), licensed MIT. It adds 77 tokens to every session and 1,413 once invoked, about $0.0004 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-09-03.

Related

Other skills, from other repositories

publish-and-reuse

A workflow for keeping an AI setup consistent across multiple computers. It decides whether to download, upload, merge, review, or block changes, while leaving conflicts and unsaved changes for a person.

ooooooooooooooooooop/agent-tools · 125 tokens

find-session

A tool for finding past DSH conversations by title or text and reading their content or usage statistics. DSH is the system referenced by the skill for storing agent sessions.

ooooooooooooooooooop/agent-tools · 53 tokens

docs-context

Super Base Context — project doc loader & synchronizer. Triggers even without explicit "load docs"/"sync docs." READ MODE — load architecture/modules/coding/decision docs when work references project state: code work (write/modify/remove); design (features/APIs/schemas/architecture); review (modules, past solutions)…

lujiafa/houtu-project-skills · 203 tokens

baoyu-diagram

Create professional, dark-themed SVG diagrams of any type — architecture diagrams, flowcharts, sequence diagrams, structural diagrams, mind maps, timelines, illustrative/conceptual diagrams, and more. Use this skill whenever the user asks for any kind of technical or conceptual diagram, visualization of a system…

JimLiu/baoyu-skills · 146 tokens

baoyu-danger-gemini-web

Generates images and text via reverse-engineered Gemini Web API. Supports text generation, image generation from prompts, reference images for vision input, and multi-turn conversations. Use when other skills need image generation backend, or when user requests "generate image with Gemini", "Gemini text generation"…

JimLiu/baoyu-skills · 74 tokens

company-brain

Your team's shared, AI-ready knowledge base — people, companies, meetings, SOPs, and decisions structured so Claude can answer questions on your team's behalf. Team-scope sibling to second-brain (which is personal-scope). Seven modes — capture (drop something into the right structured dir), compile (process into wiki…

coreyhaines31/makerskills · 322 tokens