/Catalogue/Prompt/activeloopai/activeloopai-hivemind-hivemind-graph-4

Origin: github

hivemind-graph

Query the local AST-derived code graph (functions, classes, calls, imports) for structural codebase questions — what calls X, what does Y import, where is Z defined, blast radius of a change. The graph rebuilds automatically after each agent turn; use hivemind_graph_search and hivemind_graph_neighborhood tools (no manual build step).

by activeloopai · updated 7d ago · imported from GitHub

Installs0+0/7d
Security score0/100
Retention 14d0%
GitHub stars1.6K

Skill logic

Execution graph
User message
Prompt rewrites behaviour
Response

SKILL.md

View on GitHub ↗

Hivemind Code Graph (OpenClaw)

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

The graph builds and refreshes automatically after each turn (gated by rate limit + git diff). You never run a build command — just call the graph tools.

Set plugins.entries.hivemind.config.tuning.HIVEMIND_GRAPH_CWD in ~/.openclaw/openclaw.json to the git root of the project you want indexed when the gateway's working directory is not the repo (then restart the gateway).

Use the graph as a fast INDEX to locate the few files/symbols that matter, then use the host's read/exec tools on the real source. It is not a substitute for reading source files.

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?"

Tools

  • hivemind_graph_search({ pattern }) — search symbols by substring (or multi-token AND with +, e.g. auth+handler). Returns matches with 1-hop neighbors (callers, callees, imports). Start here.
  • hivemind_graph_neighborhood({ file }) — every symbol in a repo-relative file path plus its cross-file neighbors.

Workflow

  1. Broad structural question? hivemind_graph_search({ pattern: "<symbol>" }).
  2. Know the file? hivemind_graph_neighborhood({ file: "src/hooks/capture.ts" }).
  3. Need the actual code? Open the source_file:line from the tool output with the host read tool — don't answer from the graph alone.

When NOT to use this skill

  • Reading the body of a symbol you already located → use the host read tool.
  • Code that isn't committed/built yet — the graph can lag uncommitted edits.
  • Languages outside TypeScript, JavaScript, and Python — fall back to grep.

Anti-patterns

  • Zero incoming callers does NOT mean dead code. Instance-method dispatch and dynamic calls are not fully resolved.
  • The graph can be stale. Prefer live source for files edited in this session.
  • pattern is lexical, not semantic — try multiple keywords if the first misses.

Discussion

No comments yet — start the thread.

Sign in to join the discussion.

/More from activeloopai/hivemind

activeloopai· 7d agoSandbox
hivemind-memory

Prompts · TypeScript · v0.1.0

Global team and org memory powered by Activeloop. ALWAYS check BOTH built-in memory AND Hivemind memory when recalling information.

#ai#ai-agents#ai-memory

0 1.6K
activeloopai· 7d agoSandbox
hivemind-memory

Prompts · TypeScript · v0.1.0

Global team and org memory powered by Activeloop. ALWAYS check BOTH built-in memory AND Hivemind memory when recalling information.

#ai#ai-agents#ai-memory

0 1.6K
activeloopai· 7d agoSandbox
hivemind-goals

Prompts · TypeScript · v0.1.0

Create, track and update team goals via the Deeplake virtual filesystem at memory/goal/. Use whenever the user mentions a goal, objective, target, milestone, or asks to track progress on something measurable. ALSO use when the user says "task", "todo", "work item", "remind me to", "fix X", or any actionable work item — the goal system replaced the legacy `hivemind tasks` CLI and now covers both objectives and tasks.

#ai#ai-agents#ai-memory

0 1.6K
activeloopai· 7d agoSandbox
hivemind-graph

Prompts · TypeScript · v0.1.0

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 is the architecture / which subsystems exist?". The graph is an AST-derived map of the repo, queried as files (no build needed — it rebuilds automatically).

#ai#ai-agents#ai-memory

0 1.6K