Compact Memory Implementation
simbajigege/book2skills
A developer guide to adding compact memory to an agent: when to trigger compaction, how to fork a compactor sub-agent, what the summary holds, and how to restore it.
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.
$ npx skills add Avijit07x/claude-db --skill cdb-scan -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Avijit07x/claude-db cdb-scan --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/Avijit07x/claude-db.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cdb-scan .claude/skills/cdb-scan && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "cdb-scan" agent skill from https://github.com/Avijit07x/claude-db/tree/main/skills/cdb-scan into .claude/skills/cdb-scan/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cdb-scan", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/Avijit07x/claude-db/tree/main/skills/cdb-scanType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add Avijit07x/claude-db --skill cdb-scan -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Avijit07x/claude-db cdb-scan --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Avijit07x/claude-db.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/cdb-scan .agents/skills/cdb-scan && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "cdb-scan" agent skill from https://github.com/Avijit07x/claude-db/tree/main/skills/cdb-scan into .agents/skills/cdb-scan/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cdb-scan", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Avijit07x/claude-db --skill cdb-scan -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Avijit07x/claude-db cdb-scan --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Avijit07x/claude-db.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/cdb-scan .cursor/skills/cdb-scan && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "cdb-scan" agent skill from https://github.com/Avijit07x/claude-db/tree/main/skills/cdb-scan into .cursor/skills/cdb-scan/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cdb-scan", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/Avijit07x/claude-db.git --path skills/cdb-scan--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add Avijit07x/claude-db --skill cdb-scan -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Avijit07x/claude-db cdb-scan --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Avijit07x/claude-db.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/cdb-scan .gemini/skills/cdb-scan && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "cdb-scan" agent skill from https://github.com/Avijit07x/claude-db/tree/main/skills/cdb-scan into .gemini/skills/cdb-scan/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cdb-scan", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install Avijit07x/claude-db cdb-scanInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add Avijit07x/claude-db --skill cdb-scan -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Avijit07x/claude-db.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/cdb-scan .github/skills/cdb-scan && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "cdb-scan" agent skill from https://github.com/Avijit07x/claude-db/tree/main/skills/cdb-scan into .github/skills/cdb-scan/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cdb-scan", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Avijit07x/claude-db --skill cdb-scan -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Avijit07x/claude-db cdb-scan --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Avijit07x/claude-db.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/cdb-scan .opencode/skills/cdb-scan && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "cdb-scan" agent skill from https://github.com/Avijit07x/claude-db/tree/main/skills/cdb-scan into .opencode/skills/cdb-scan/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cdb-scan", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
cdb-scanMap 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.
Cdb Scan is an agent skill from Avijit07x/claude-db. 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.
Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Agent Workflows, covering Agent memory. It works with Anthropic API. The repository describes itself as: Free, open-source memory for Claude Code. Your own database, no cloud, no subscription. The licence is Apache-2.0.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 746205c. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Cdb Scan loads about 1.1k tokens when it runs. Until then it costs about 84 tokens; SKILL.md has 605 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from Avijit07x/claude-db at commit 746205c, republished under its Apache-2.0 licence (© Avijit07x). 605 words, ~1,059 tokens.
.claude/skills/cdb-scan/SKILL.md (or your agent's skills folder).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 scanIt 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 with
three adapters, selected by URI scheme" — not "Storage architecture".CLAUDE.md. That file is already in the system prompt on
every turn. Memory is for what is not.© Avijit07x, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/cdb-scan of Avijit07x/claude-db.
Open the folder on GitHubat commit 746205c
Cdb Scan next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Cdb Scan this skillAvijit07x/claude-db | 231 | — | ~1.1k | Automated safety check: Pass | Apache-2.0 | |
| Compact Memory Implementationsimbajigege/book2skills | 184 | — | ~2.5k | Automated safety check: Pass | MIT | |
| Mem0 CLI Memory Commandsmem0ai/mem0 | 67k | — | ~2k | Automated safety check: Notes | Apache-2.0 | |
| Install and Run Cogneetopoteretes/cognee | 32k | 1 repos | ~1k | Automated safety check: Notes | Apache-2.0 | |
| Create Agentvectorize-io/hindsight | 47k | — | ~1.1k | Automated safety check: Pass | MIT | |
| Memori Long-Term MemoryMemoriLabs/Memori | 17k | — | ~2k | Automated safety check: Pass | Apache-2.0 |
simbajigege/book2skills
A developer guide to adding compact memory to an agent: when to trigger compaction, how to fork a compactor sub-agent, what the summary holds, and how to restore it.
mem0ai/mem0
Adds, searches, lists, updates and deletes memories on the Mem0 platform from the terminal with the mem0 command, including a JSON mode built for agents.
topoteretes/cognee
Installs the cognee AI memory library in a Python environment, sets the LLM key and gets a first remember and recall script running with the Python SDK.
vectorize-io/hindsight
Create a new Hindsight-powered subagent with long-term memory.
MemoriLabs/Memori
Adds structured long-term memory to OpenClaw agents, built automatically from sessions, with tools the agent calls to recall facts, summaries and decisions.
dohooo/helmor
Bump or upgrade the pinned versions of Helmor's bundled agent CLIs, SDKs, and supporting binaries — Claude Code + claude-agent-sdk (lockstep), Codex, Cursor SDK, OpenCode, Kimi, Pi, and gh / glab /…
Works with
Categories
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. Cdb Scan is an agent skill from Avijit07x/claude-db. 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.
Cdb Scan fits situations like: memory is newly installed on an existing project; the project has changed enough that the stored map is stale.
Run `npx skills add Avijit07x/claude-db --skill cdb-scan -a claude-code`. Or copy the skill folder (skills/cdb-scan in Avijit07x/claude-db) into .claude/skills/cdb-scan in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Avijit07x/claude-db --skill cdb-scan -a codex`. Or copy the skill folder (skills/cdb-scan in Avijit07x/claude-db) into .agents/skills/cdb-scan in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Avijit07x/claude-db --skill cdb-scan -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cdb-scan, .gemini/skills/cdb-scan, .github/skills/cdb-scan and .opencode/skills/cdb-scan in your project.
SKILL.md names no scripts, command-line tools or credentials: Cdb Scan is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Cdb Scan is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Cdb Scan: Compact Memory Implementation (simbajigege/book2skills, 184 stars), Mem0 CLI Memory Commands (mem0ai/mem0, 67k stars), Install and Run Cognee (topoteretes/cognee, 32k stars) and Create Agent (vectorize-io/hindsight, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Avijit07x (a GitHub user) maintains it in Avijit07x/claude-db, which has 231 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 7, 2026.
Source: Avijit07x/claude-db on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.