Skip to content
Back to search

claude-db

SkillWorks with Claude CodeGitHub

Persistent memory for Claude Code. Bring your own database.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/avijit07x--claude-db/badge.svg)](/listings/avijit07x--claude-db)

HTML

<a href="/listings/avijit07x--claude-db"><img src="/api/listings/avijit07x--claude-db/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

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.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 101 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <img src="./assets/wordmark.svg" alt="claude-db" width="330">
  2. **Free, open-source memory for Claude Code. Your own database, no cloud, no subscription.**
  3. [![npm](https://img.shields.io/npm/v/claude-db.svg)](https://www.npmjs.com/package/claude-db)
  4. [![CI](https://github.com/Avijit07x/claude-db/actions/workflows/ci.yml/badge.svg)](https://github.com/Avijit07x/claude-db/actions/workflows/ci.yml)
  5. [![license](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](./LICENSE)
  6. [Documentation](https://claude-db.vercel.app/docs) ·
  7. [Quick start](https://claude-db.vercel.app/docs/quick-start) ·
  8. [CLI reference](https://claude-db.vercel.app/docs/cli)
  9. ---
  10. ## Why
  11. Every Claude Code chat starts from zero. You explain the same decisions, dead
  12. ends and rules again, and Claude works out what calls what from scratch.
  13. claude-db fixes that. It keeps what you decided and a map of your code, and
  14. gives Claude the right part of it at the right time.
  15. ## What it does
  16. - **Remembers across chats.** Decisions, dead ends and rules are saved when a
  17. chat ends, and the next chat starts by seeing them.
  18. - **Recalls what fits.** Each prompt gets the one or two earlier memories that
  19. match it, and nothing when none fit.
  20. - **Maps your code.** Who defines, calls or imports a symbol is answered in one
  21. call, instead of grep and reading files. It follows imports in TypeScript,
  22. JavaScript, Python, Go, Rust, Java and Kotlin.
  23. - **Keeps it yours.** SQLite on your machine by default, or Postgres or MongoDB
  24. to share across machines. No cloud, no subscription.
  25. ## Install
  26. You need Node 22.16 or newer and a git repository.
  27. ```bash
  28. npm install -g claude-db
  29. cd your-project
  30. claude-db install --project
  31. ```
  32. Restart Claude Code. There is nothing else to run, because capture and recall
  33. are hooks.
  34. Then load what already exists with `claude-db flush` and `claude-db scan`. The
  35. [setup guide](./docs/setup-guide.md) has the rest.
  36. ## Everyday use
  37. | Where | What it does |
  38. | --------------------- | ------------------------------------------------- |
  39. | `/catchup` | Answers "where did I stop?" when you come back |
  40. | `/handoff` | Leaves a short note for the next chat or a mate |
  41. | `/cdb-scan` | Maps an existing codebase into memory |
  42. | `claude-db status` | Shows whether it is wired up and what it recorded |
  43. | `claude-db doctor` | Checks the setup, and finds what is wrong |
  44. | `claude-db use <url>` | Switches to Postgres or MongoDB (`pg`/`mongodb`) |
  45. `cdb` is a shorter alias. Every command is in the
  46. [CLI reference](https://claude-db.vercel.app/docs/cli).
  47. ## Privacy
  48. Memory stays in your own database. Two features call Claude Haiku through your
  49. own login, and each has an off switch: `claude-db distill off` for making facts
  50. from finished chats, and `claude-db pick off` for choosing memory per prompt.
  51. Once a day it asks npm for the latest version (`"updates": "off"` stops that).
  52. `.env`, `secrets/`, `node_modules` and `.git/` are never stored. Text inside
  53. `<private>...</private>` is stripped, and API keys and tokens are redacted
  54. before anything is written or sent.
  55. ## Documentation
  56. - [Setup guide](./docs/setup-guide.md): install, head start and habits
  57. - [Documentation site](https://claude-db.vercel.app/docs): CLI, MCP tools,
  58. databases and troubleshooting
  59. - [With and without](./docs/with-and-without.md) and
  60. [benchmarks](https://claude-db.vercel.app/docs/benchmarks): the numbers,
  61. including where plain grep wins
  62. - [Changelog](./CHANGELOG.md)
  63. ## Contributing
  64. ```bash
  65. npm install
  66. npm run build
  67. npm test
  68. npm run lint
  69. ```
  70. [CONTRIBUTING.md](./CONTRIBUTING.md) has the setup, the rules and the pull request
  71. checklist, with links to adding a language and to releasing. Security reports go
  72. through [SECURITY.md](./SECURITY.md), privately.
  73. ## License
  74. Apache-2.0

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.