SkillAgentSearch skills...

claude-db

Persistent memory for Claude Code. Bring your own database.

Install / Use

npx skills add Avijit07x/claude-db

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

82/100

Supported Platforms

Claude Code

Our assessment of claude-db

claude-db scores 82/100 on our quality scale, 323rd of 444 Data & Analytics skills we index.

Its SKILL.md is 6.5 KB long, well organised into 8 sections with 6 code examples: a thorough specification that gives an agent plenty to work with.

It has 228 GitHub stars, a meaningful sign that others use it.

Substance
29/30
Structure
20/20
Description
8/15
Adoption
10/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated 32 days ago, so claude-db is actively maintained.
  • Our last check on 2026-09-25 found the source still online.
  • It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 95/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.

AI review by kimi-k2.7-code on 2026-09-24. Automated pattern scan on 2026-09-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

claude-db compared with similar skills

All 4 of these similar skills score higher than claude-db; compare them before choosing.

SkillScoreStarsUpdatedFormat
claude-db (this skill)by Avijit07x8222832d agoSKILL.md
Agent-Reachby Panniantong10087.2k16d agoCLAUDE.md
headroomby headroomlabs-ai10074.2ktodayCLAUDE.md
Scraplingby D4Vinci10085.0ktodayMCP Server
crawl4aiby unclecode10084.6k6d agoMCP Server

Frequently asked questions

How do I install claude-db?
Run npx skills add Avijit07x/claude-db. The install tabs above show the steps for each supported agent.
Which AI agents does claude-db work with?
It is written for Claude Code, as a SKILL.md file. Other agents that read the same format can often use it too.
Is claude-db safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is Apache-2.0-licensed and scores 95/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is claude-db still maintained?
The repository was last updated 32 days ago, so claude-db is actively maintained.
<img src="./assets/wordmark.svg" alt="claude-db" width="330">

Persistent memory for Claude Code. Bring your own database.

npm CI license


What it is

Claude Code forgets everything when a session ends. Next time you open it, you re-explain the architecture, why you chose X over Y, and what already failed.

claude-db records those decisions as you work and gives them back automatically. Local by default, no account, no subscription.

npm install -g claude-db

cd your-project
claude-db install --project

Restart Claude Code. That's it.

How it works

Claude Code already writes every session to disk as JSONL — your prompts, its replies, every tool call. claude-db reads that file, so it captures why you did something, not just which files changed.

you send a prompt
      │
      ├─ 1. save the previous turn
      │     read new lines from the session transcript
      │     keep turns that changed something
      │     store title + reasoning + files, with an embedding
      │
      └─ 2. search memory using your prompt
            inject the best match above your message

Both steps are hooks, so they always run. Nothing depends on Claude deciding to look something up.

Install also writes a short standing instruction into CLAUDE.local.md (or ~/.claude/CLAUDE.md for a machine-wide install), telling Claude to search memory before asking you to re-explain something. Hook output is context the agent may or may not act on; a memory file is a rule for the whole session, which is what makes recall the default rather than something you have to ask for. claude-db uninstall takes the block back out.

What gets saved. One observation per turn, and only if that turn edited a file or ran a real command. Questions, grep, and "ok" are skipped. A busy day produces 10 to 20 rows, not hundreds.

What gets injected. Recent session summaries at startup, plus the single best match in full on each prompt. Roughly 350 tokens when something relevant exists, zero when it doesn't.

What search returns. An id, kind, date, title and one line of the matching body — enough to tell two similarly-titled rows apart without expanding either. Full bodies come only from get_observations, for ids you picked.

An example of one stored memory:

[decision] Chose WebSocket over polling for live order updates

Asked: the order feed keeps dropping

Polling at 3s hammered the API and still lagged behind. Switched to a
WebSocket subscription with exponential backoff and a replay flag, so no
order is missed during a drop.

Files: src/ws/client.ts, src/ws/reconnect.ts
Ran: Test run: pnpm test

Commands

cdb is a shorter alias for all of them.

| Command | What it does | | --- | --- | | claude-db install [--project] | Register hooks and the MCP server | | claude-db uninstall [--project] | Remove them, keeping your memory | | claude-db status | Is it wired up, and when did it last record anything | | claude-db doctor [--deep] | Resolved config; --deep proves a full round trip | | claude-db search [--all] [--tag <name>] <query> | Search this project's memory, or every project | | claude-db remember [--key <name>] <text> | Record a rule outright, e.g. "always use pnpm here" | | claude-db forget <id> | Delete specific observations by id | | claude-db seed --from-git | Fill a cold memory from this repo's history | | claude-db usages [--regex] <symbol> | Find real usages via git grep, live — not a stored index | | claude-db stats | What this project's memory is made of | | claude-db projects | Every project with memory stored | | claude-db merge [<path>] | Move memory from an old project path onto this one | | claude-db use <url> | Switch database and verify it | | claude-db sync <url> | Two-way merge with another database | | claude-db flush | Re-ingest every transcript for this project | | claude-db export [--all] | Dump memory as JSONL, for backup or migration | | claude-db import <file> | Load a dump back in; safe to repeat | | claude-db reembed | Re-embed everything with the current model | | claude-db prune --older-than <days> | Delete old memory (dry run without --yes) | | claude-db reset [--project] --yes | Delete memory (dry run without --yes) |

Install also adds a /cdb-scan skill: run it once on an existing project and Claude surveys the codebase into memory — stack, layout, conventions, workflows — so search has something to find before you have any history. Those notes are tagged inferred, because they are a reading of the code rather than a record of what happened.

--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.

Bring your own database

SQLite by default, at ~/.claude-memory/memory.db. No setup, no network.

Only needed if you want memory shared across machines:

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

The connection string picks the backend. Install the driver you need (npm install mongodb or pg); neither ships by default. CLAUDE_DB_URL overrides the config file if you prefer an env var.

Search is hybrid — keyword plus vector — on all three. Memory is partitioned by project path, so one database serves every repo you work in.

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.

Development

npm install
npm run build
npm test      # 87 checks
npm run try   # simulate a session, touches nothing

Releases publish from CI on a version tag:

npm version patch
git push --follow-tags

License

Apache-2.0

Related Skills

View on GitHub
GitHub Stars228
CategoryData
Updated1mo ago
Forks24

Languages

TypeScript

Trust signals

95/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 low