codebase-memory

codebase-memory is a skill for Claude Code from LucasSantana-Dev/sharekit. It costs 98 tokens per session (933 once invoked), scanned A, original, MIT.

A codebase knowledge graph that maps code structure, functions, calls, dependencies, and related relationships.

In plain words
What is it for?
Exploring architecture, finding callers and dependencies, tracing call chains, assessing change impact, and locating unused code.
Why use it?
It answers structural questions about a codebase without requiring you to inspect large amounts of source manually.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Exploring architecture, finding callers and dependencies, tracing call chains, assessing change impact, and locating unused code.

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

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/lucassantana-dev/sharekit/codebase-memory/github.svg)](https://agentmods.dev/skills/lucassantana-dev/sharekit/codebase-memory)
Your own site
<a href="https://agentmods.dev/skills/lucassantana-dev/sharekit/codebase-memory"><img src="https://agentmods.dev/badge/skills/lucassantana-dev/sharekit/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/lucassantana-dev/sharekit/codebase-memory"><img src="https://agentmods.dev/badge/skills/lucassantana-dev/sharekit/codebase-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 933 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.00098 $0.00933
Opus 5.5 $0.00039 $0.00373
Sonnet 5.5 $0.00020 $0.00187
Haiku 4.5 $0.00010 $0.00093

Measured 1mo ago against content hash e23868ccc441, 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.

sharekit-profile/.claude/skills/codebase-memory/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 Memory — Knowledge Graph Tools

Backed by the codebase-memory MCP server (~/.local/bin/codebase-memory-mcp, stdio). The server indexes codebases into a persistent tree-sitter AST knowledge graph (158 languages, sub-ms queries). Index a project before querying — see Workflow below.

Graph tools return precise structural results in ~500 tokens vs ~80K for grep.

Quick Decision Matrix

Question Tool call
Who calls X? trace_path(direction="inbound")
What does X call? trace_path(direction="outbound")
Full call context trace_path(direction="both")
Find by name pattern search_graph(name_pattern="...")
Dead code search_graph(max_degree=0, exclude_entry_points=true)
Cross-service edges query_graph with Cypher
Impact of local changes detect_changes()
Risk-classified trace trace_path(risk_labels=true)
Text search search_code or Grep

Exploration Workflow

  1. list_projects — check if project is indexed
  2. If not indexed: index_repository(path="<repo>") then index_status — one-time, milliseconds for average repos
  3. get_graph_schema — understand node/edge types
  4. search_graph(label="Function", name_pattern=".*Pattern.*") — find code
  5. get_code_snippet(qualified_name="project.path.FuncName") — read source

Tracing Workflow

  1. search_graph(name_pattern=".*FuncName.*") — discover exact name
  2. trace_path(function_name="FuncName", direction="both", depth=3) — trace
  3. detect_changes() — map git diff to affected symbols

Quality Analysis

  • Dead code: search_graph(max_degree=0, exclude_entry_points=true)
  • High fan-out: search_graph(min_degree=10, relationship="CALLS", direction="outbound")
  • High fan-in: search_graph(min_degree=10, relationship="CALLS", direction="inbound")

14 MCP Tools

index_repository, index_status, list_projects, delete_project, search_graph, search_code, trace_path, detect_changes, query_graph, get_graph_schema, get_code_snippet, get_architecture, manage_adr, ingest_traces

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. 1mo ago First seen · 73 lines · 98 tokens per session scan A e23868ccc441

Subscribe to this mod's changes

codebase-memory is a skill published in the GitHub repository LucasSantana-Dev/sharekit (1 stars, last pushed 3d ago), licensed MIT. It adds 98 tokens to every session and 933 once invoked, about $0.0004 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-31.

Related

Other skills, from other repositories

mnemon

Persistent memory CLI for LLM agents. Store facts, recall past knowledge, link related memories, manage lifecycle.

mnemon-dev/mnemon · 25 tokens

brain-ingest

The process for digesting a conversation, document, or research result, classifying it, and writing it down as brain content (a root-page update or a new/updated page) through the brain CLI.

mindmuxai/brain.md · 48 tokens

durable-session-state

Persist plans, scope decisions, evidence, and reviewer/critic verdicts to durable files during long or multi-phase tasks so work survives context compaction, session resumes, and handoffs. Use for swarm-mode tasks, before context grows large, when recording approval gates, and when resuming after compaction or a…

ZaxbyHub/opencode-swarm · 70 tokens

save-learning

Saves user instructions as persistent learnings for future sessions. Use when the user says 'remember this', 'always do X', 'from now on', 'never do Y', or gives any instruction they want persisted across sessions. Proactively suggest when the user states a preference, convention, or rule they clearly want followed in…

caliber-ai-org/ai-setup · 71 tokens

sivtr-memory

Retrieve shared local work memory: terminal activity, AI conversation history, prior decisions, validation evidence, debugging trails, recaps, and handoff context. Use before asking the user to repeat local work context.

Ariestar/sivtr · 46 tokens

getnote-kb

A skill for reading and managing GetNote Brain, a knowledge-base service for books, customer records, team information, folders, notes, and subscribed creators or livestreams.

iswalle/getnote-cli · 58 tokens