claude-db

by Avijit07xVerified

Persistent memory for Claude Code. Bring your own database.

183
Stars
17
Forks
TypeScript
Language
8/23/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/Avijit07x/claude-db

Getting Started

Guides for using skills like claude-db.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

claude-db

Persistent memory for Claude Code. Bring your own database.

npm CI license

Documentation · Quick start · CLI reference


Every session starts from zero

You spent an hour yesterday explaining why the store uses three adapters, which approach you already tried and abandoned, and why that one function must not be touched. Today Claude knows none of it. So you explain it again.

claude-db fixes that, and the other half too. Claude re-derives your codebase every time, grepping a name and opening files to work out what calls what.

$ claude-db search "why does capture read the transcript"

83cf1246-eb14  decision  2026-08-19  Tested and written up.
    …the old defaults prompt was now cut why does capture read the transcript…
88fab24f-5e59  decision  2026-08-19  Finding 4's other half needs checking…
    …cannot work: 0.029483 "why does capture read…" <- highly relevant…

You never run that command. Claude gets the same context injected on every prompt, so it walks in already knowing. Nothing leaves your machine.

Install

npm install -g claude-db

cd your-project
claude-db install --project

Restart Claude Code. That's it: capture and recall are hooks, so they run without being asked.

--project scopes to one repo instead of every project on the machine. It writes .claude/settings.local.json and .mcp.json. Add .mcp.json to your .gitignore, since it holds a machine-specific path.

Map your code

Memory fills itself as you work. The code graph needs one command:

claude-db scan

Claude then gets four modes through MCP: text (a live grep, works with no scan at all), usages, explain and path. Re-running scan is cheap: it hashes files and re-parses only what changed.

TypeScript, TSX, JavaScript, Python, Go, Rust and Ruby are parsed properly, and every other language — Java, C, C++, C#, Swift, Kotlin, PHP, Elixir, shell and twenty more — is read by pattern, which finds declarations and name-matched references tagged INFERRED. Nothing else to install either way.

Use another database

SQLite by default, at ~/.claude-memory/memory.db. No setup, no network. Point it elsewhere to share memory across machines:

claude-db use "mongodb+srv://user:pass@cluster.mongodb.net/memory"
claude-db use "postgres://user:pass@host:5432/memory"

Install the driver you need (npm install mongodb or pg); neither ships by default.

With it, and without it

Asking who defines and calls closeObservations by hand means a grep, then opening three store adapters to see which hits are definitions. One explain call answers it already classified: 2.1x cheaper, measured across eight real symbols in this repo.

Recall is the standing cost of ~180 tokens a prompt, skipped entirely on 28% of prompts because the answer is already in context:

  every prompt costs      180 tokens of recall
  every lookup refunds    597 tokens   (1,115 by hand - 518 with)

  so one lookup pays for 3.3 prompts of recall

Check it on your own repo with npm run bench:ab and npm run bench:tokens from a clone. With and without has every number, including the symbols where plain grep wins.

Commands

cdb is a shorter alias for all of them. These are the ones you actually type:

CommandWhat it does
claude-db install [--project]Register hooks and the MCP server
claude-db statusIs it wired up, and when did it last record anything
claude-db doctor [--deep]Resolved config; --deep proves a full round trip
claude-db scan [--force]Build the code graph for this repo
claude-db usages [--mode <m>] <symbol>What uses a symbol: live git grep, or the code graph
claude-db use <url>Switch database and verify it
claude-db viewSee this project's memory live in the browser

Every other command, including search, remember, seed, sync, export, prune and reset, is in the CLI reference.

Install also adds a /cdb-scan skill: run it once on an existing project and Claude maps the codebase into memory, so search has something to find before you have any history.

Requirements

Node 22.5 or newer. That's the only hard requirement: SQLite comes from Node's builtin node:sqlite, so nothing compiles at install time.

Embeddings run locally with a zero-dependency embedder. For real semantic search, npm install @xenova/transformers and it upgrades itself.

Privacy

Nothing leaves your machine unless you point it at a remote database. .env, secrets/, node_modules and .git/ are never stored, text wrapped in <private>...</private> is stripped, and API keys and tokens are redacted before anything is written.

Documentation

claude-db.vercel.app/docs has the rest: the CLI reference, MCP tools, how it works, databases and troubleshooting.

Benchmarks has every number, including the symbols where plain grep wins. Releases are in the changelog.

Development

npm install
npm run build
npm test      # 415 checks
npm run lint  # house rules: no comments, no any, import extensions
npm run try   # simulate a session, touches nothing
npm run format

Releases publish from CI on a version tag:

npm version patch
git push --follow-tags

CONTRIBUTING.md has the conventions, the test setup, and how to add a language to the code graph. Security reports go through SECURITY.md, privately.

License

Apache-2.0

Frequently Asked Questions

What is claude-db?

claude-db is an open-source data processing skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by Avijit07x. Persistent memory for Claude Code. Bring your own database. It has 183 GitHub stars.

Is claude-db safe to use?

Yes. claude-db passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install claude-db?

Clone the repository with "git clone https://github.com/Avijit07x/claude-db" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is claude-db written in?

claude-db is primarily written in TypeScript. It is open-source under Avijit07x on GitHub, so you can review or fork the full source.

Are there alternatives to claude-db?

Yes. SkillsLLM lists many other Data Processing skills you can browse and compare side by side. Open the Data Processing category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh claude-db against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

gtm-engineer-skills

by onvoyage-ai

Claude Code skill for improving website AEO (AI Engine Optimization) and GEO (Generative Engine Optimization) scores — 16 foundational checks, 6 intelligence dimensions, framework-specific fixes

1,28045HTML
Data Processing
View details

sprite-gen

by aldegad

Generate clean 2D game sprites & animation atlases — component-row pipeline: state rows, alpha cleanup, frame extraction, runtime atlases. Codex/Claude skill.

73573Python
Data Processing
View details

Research pipelines as semantic execution units: each skill declares inputs/outputs, acceptance criteria, and guardrails. Evidence-first methodology prevents hollow writing through structured intermediate artifacts.

49839Python
Data Processing
View details

Claude AI skill for cinematic Higgsfield AI prompts — 32 sub-skills covering Seedance 2.5 (omni-reference, video edit + extend) and 2.0, the Hell Grind feature-film pipeline, an acting system, Cinema Studio 2.5/3.0/3.5, MCSLA, Soul ID consistency, Kling 3.0 Motion Control, the DISCIPLINE framework, and 18 templates.

38579Python
Data Processing
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details