# Hivemind Graph

Query the local code graph (functions, classes, calls, imports) through the Deeplake...

- Repository: https://github.com/activeloopai/hivemind (1640 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-10-24
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add activeloopai/hivemind --skill hivemind-graph -g -a claude-code -y`
Codex: `npx skills add activeloopai/hivemind --skill hivemind-graph -g -a codex -y`
Cursor: `npx skills add activeloopai/hivemind --skill hivemind-graph -g -a cursor -y`
Gemini CLI: `npx skills add activeloopai/hivemind --skill hivemind-graph -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add activeloopai/hivemind`

## Description

Query the local code graph (functions, classes, calls, imports) through the Deeplake mount at memory/graph/. Use when the user asks structural questions about the codebase, "what calls X?", "what does Y import?", "where is Z defined?", "what's the architecture / which subsystems exist?", "what's the impact of changing this?". The graph is an AST-derived map of the repo, queried as files (no build needed, it rebuilds automatically).

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Hivemind Code Graph

A deterministic, AST-derived map of the current repository, every function,
class, method, interface, type, enum, const, and module, plus the edges between
them (`calls`, `imports`, `extends`, `implements`, `method_of`). It is queried as
synthesized files under the Deeplake mount; there are no real files on disk and
no network call in the read path.

The graph **builds and refreshes automatically** (on Stop / SessionEnd, gated by
a rate limit + git diff). You never run a build command, just read it.

Use it as a fast **INDEX** to locate the few files/symbols that matter, then open
them with `Read` to answer. It is not a substitute for the source.

## When to use this skill

Activate when the user asks a *structural / relational* question about the code:

- "What calls `pushSnapshot`?" / "Who uses this function?"
- "What does `deeplake-pull.ts` import?" / "What depends on X?"
- "Where is `GraphSnapshot` defined?" / "Find the function that handles Y."
- "What are the main subsystems / the architecture here?"
- "If I change this signature, what's affected?" → use `impact/<symbol>` (transitive blast radius)

## When NOT to use this skill

- Reading the **body** of a symbol you already located → use `Read` on the real
  source file. The graph gives location + relationships, not full source.
- Code that isn't **committed/built** yet, the graph can lag uncommitted edits.
  If a file's mtime is newer than the build timestamp, read the live source.
- Languages outside **TypeScript, JavaScript, and Python** (Go, Rust, …), the
  extractor covers those three, with cross-file `calls`/`imports` resolved for
  named imports. For anything else, fall back to grep/read.

## Path cheat sheet

```bash
cat ~/.deeplake/memory/graph/index.md
#   Overview: node/edge counts, kind breakdown, top files by node count.

The rest: https://github.com/activeloopai/hivemind/blob/HEAD/harnesses/claude-code/skills/hivemind-graph/SKILL.md
