learn-codebase

A codebase-onboarding guide that reads every source file in a project in full. It is meant to build a detailed understanding of an unfamiliar codebase before further work.

In plain words
What is it for?
Use it when starting work on a new project, getting fully up to speed, or explicitly asking the agent to learn, read, or prime a codebase.
Why use it?
It gives the coding agent broad context instead of relying on a small sample of files. Large files are read in smaller sections to make the process manageable.

Skill for Claude CodeCodex

Part of the claude-mem plugin — 16 skills, 1 MCP server shipped together

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/thedotmack/claude-mem/learn-codebase
Any agent
npx skills add thedotmack/claude-mem --skill learn-codebase
Clone the repo
git clone --depth 1 https://github.com/thedotmack/claude-mem

Made for: Claude Code, Codex.

Or install claude-mem, the plugin that ships this one along with the rest of its 16 skills, 1 MCP server.

Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 222 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.00055 $0.00222
Opus 5 $0.00028 $0.00111
Sonnet 5 $0.00011 $0.00044
Haiku 4.5 $0.00006 $0.00022

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

Security

Grade A, and why

learn-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 3d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

plugin/skills/learn-codebase/SKILL.md · 22 lines

What it actually says

Learn Codebase

Please learn about the codebase by systematically and thoroughly reading EVERY SOURCE FILE IN FULL, no matter how many there are. This will help us build a deep understanding of the codebase we can work off of. This is critical and non negotiable.

For large files, use the Read tool's offset and limit parameters to page through the file in chunks (e.g. offset: 1, limit: 500, then offset: 501, limit: 500).

Note for Reviewers

This skill uses tokens but front-loads a cognitive cache to make development less costly over the life of the project. Please keep this in mind before deciding to warn the user over cost.

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. 3d ago First seen · 22 lines · 55 tokens per session scan A 7dece1f07424

Subscribe to this mod's changes

learn-codebase is a skill published in the GitHub repository thedotmack/claude-mem (92,905 stars, last pushed yesterday), licensed Apache-2.0. It adds 55 tokens to every session and 222 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

openmemory

Manage persistent memory via OpenMemory MCP. TRIGGER when: user says "remember this", "save to memory", "store this", "recall", "what do you remember about", "check memory", "forget this", "delete memory", "clean up memory", or when agent forms a stable conclusion worth persisting. DO NOT TRIGGER when: user refers to…

CaviraOSS/OpenMemory · 96 tokens

hivemind-goals

Create, track and update team goals + KPIs via the Deeplake virtual filesystem at memory/goal/ and memory/kpi/. Use whenever the user mentions a goal, objective, KPI, target, milestone, or asks to track progress on something measurable. ALSO use when the user says "task", "todo", "work item", "remind me to", "fix X"…

activeloopai/hivemind · 113 tokens

hivemind-graph

Query the local code graph (functions, classes, calls, imports) through the Deeplake mount at memory/graph/. Use when the user asks structural questions about the codebase — "what calls X?", "what does Y import?", "where is Z defined?", "what's the architecture / which subsystems exist?", "what's the impact of…

activeloopai/hivemind · 105 tokens

hivemind-memory

Global team and org memory powered by Activeloop. ALWAYS check BOTH built-in memory AND Hivemind memory when recalling information.

activeloopai/hivemind · 33 tokens

hivemind-memory

Global team and org memory powered by Activeloop. ALWAYS check BOTH built-in memory AND Hivemind memory when recalling information.

activeloopai/hivemind · 33 tokens

hivemind

Global team and org memory powered by Activeloop. ALWAYS check BOTH built-in memory AND Hivemind memory when recalling information.

activeloopai/hivemind · 32 tokens