Map this codebase into project memory — a code graph of every symbol and how they connect, plus a written profile of stack, layout, conventions and workflows. Re-run any time to refresh both in place. Use when memory is newly installed on an existing project, or when the project has changed enough that the stored map is stale.
npx skills add https://github.com/Avijit07x/claude-db --skill cdb-scan
Everything else in claude-db's memory is testimony: it records what happened,
turn by turn, as it happened. A fresh install knows none of that, and stays
useless for weeks while it fills up.
This fills the gap from the one source available on day one — the code itself,
in two passes.
Run this first, from the project root:
claude-db scan
It parses every supported source file and stores each symbol and each
relationship between them: what calls what, what imports what, what extends
what. It is deterministic, costs no tokens, and takes seconds. Report the
symbol and edge counts it prints.
Once it has run, find_usages answers structural questions from the graph:
mode: "usages" — what references this symbol, with the relation on each linemode: "explain" — that, plus what the symbol itself reachesmode: "path" with target — how two symbols connectPrefer those over reading files when the question is about structure.
The graph records what the code _is_. It cannot say why the project is built
this way, so the sections below capture that in prose. What you write here is
your reading of the codebase, not a record of events, so it is tagged
inferred and must never be phrased as history.
Work through the sections below in order. For each one, look at the actual
files, then call the remember MCP tool once with the given key.
key is what makes this re-runnable: writing the same key again replaces that
note rather than adding a second copy. Use these exact keys, and always pass
tags: ["inferred"] and kind: "context".
Before you start, call search for profile in this project. If notes already
exist, read them first and update what changed rather than restating it — a
second run should be an edit, not a rewrite.
profile:stackLanguages, runtime and version floors, frameworks, package manager, database,
test runner, build tool. Read the manifest (package.json, pyproject.toml,
go.mod, Cargo.toml) and the lockfile rather than guessing. Name versions
where a version constrains what can be written.
profile:layoutThe directory map, one line each, and what lives where. Include the entry
points: the binary, the server, the main export. Skip anything generated.
profile:conventionsHow this codebase is written, taken from the code and not from a style guide:
module system, import style, error handling, naming, comment density, how
tests are structured. Note where the project deviates from the language default,
since that is what someone would otherwise get wrong.
profile:workflowsThe commands that matter — install, build, test, lint, run, release — and
anything non-obvious about running them: a required service, an environment
variable, a step that must come first. Take them from the manifest scripts and
CI config, not from the README's aspirations.
profile:architectureOnly the parts a newcomer could not infer from the layout: the main
abstractions and how a request or a command actually flows through them. Two
paragraphs at most. If the codebase is small enough that the layout says it
all, skip this section rather than padding it.
remember call per section. Five notes, five stable keys.MemoryStore interface withthree adapters, selected by URI scheme" — not "Storage architecture".
inferred profile that is confidently wrong is worse than a short one.
CLAUDE.md. That file is already in the system prompt onevery turn. Memory is for what is not.
contains them.
Take avijit07x/cdb-scan from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.