DEDUPED Hot AI repos, turned into use cases Get 5 a day

How to map a codebase so Claude finds callers in one call with Claude DB

Index an existing project so Claude can see what defines, calls or imports a symbol.

Who it is forA developer or reviewer who inherits a TypeScript, Python, Go, Rust, Java, Kotlin or JavaScript codebase and needs to trace where a function is used.

The problemWithout a map, Claude runs grep and reads many files to work out what calls what, which is slow and often incomplete.

The outcomeClaude answers who defines, calls or imports a symbol in a single lookup, with the map built from your existing code.

What you need first

  • Node 22.16 or newer
  • A git repository for your project
  • Claude Code installed and able to run hooks
  • Optional: a Postgres or MongoDB database if you want to share memory across machines

Steps

  1. npm install -g claude-db
  2. cd your-project
  3. claude-db install --project
  4. Run claude-db scan to map the existing code into memory.
  5. In Claude Code, run /cdb-scan if you want to map the codebase from inside a chat, then ask who calls a function you choose.

Prompt for your agent

In the repo <repo-path>, after running claude-db scan, ask Claude Code who defines, calls and imports the symbol <symbol-name>. Expected output is a list of definition and call sites. Verify at least one listed site with grep before trusting the result.

Caveat. The README notes that plain grep wins in some cases, so check Claude DB results against grep when precision matters.

Share: X LinkedIn Hacker News Email Copy link

Disclaimer

Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page