hivemind-graph
About
This skill lets developers query an AST-derived code graph to answer structural questions about their codebase, like finding callers, imports, or definitions. It automatically rebuilds from the repository and is accessed via a local Deeplake mount, requiring no build process. Use it for impact analysis, understanding architecture, or navigating dependencies.
Quick Install
Claude Code
Recommendednpx skills add activeloopai/hivemind -a claude-code/plugin add https://github.com/activeloopai/hivemindgit clone https://github.com/activeloopai/hivemind.git ~/.claude/skills/hivemind-graphCopy and paste this command in Claude Code to install this skill
Documentation
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.tsimport?" / "What depends on X?" - "Where is
GraphSnapshotdefined?" / "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
Readon 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/importsresolved for named imports. For anything else, fall back to grep/read.
Path cheat sheet
cat ~/.deeplake/memory/graph/index.md
# Overview: node/edge counts, kind breakdown, top files by node count.
cat ~/.deeplake/memory/graph/query/<pattern> # START HERE (the 2-in-1)
# Search + expand the top matches with their 1-hop neighbors (callers,
# callees, imports, heritage). Multi-token AND: query/<a>+<b>.
cat ~/.deeplake/memory/graph/find/<pattern>
# Case-insensitive substring search on node id + label (max 50 hits).
# Prints numbered handles [1] [2] ... saved for this worktree.
cat ~/.deeplake/memory/graph/show/<handle-or-pattern>
# <handle>: a digit from a prior find/ (e.g. 3).
# <pattern>: a substring → unique node detail, or a candidate list.
# Output: the node + its 1-hop neighbors grouped by edge relation.
cat ~/.deeplake/memory/graph/neighborhood/<file>
# Every symbol in a file + its cross-file neighbors (callers/callees/imports).
cat ~/.deeplake/memory/graph/impact/<pattern>
# Transitive dependents — the blast radius of changing a symbol.
cat ~/.deeplake/memory/graph/path/<from>/<to>
# Shortest dependency path between two symbol patterns (trace a flow across files).
cat ~/.deeplake/memory/graph/layers # architectural layers / subsystems
cat ~/.deeplake/memory/graph/tour # deterministic guided walkthrough
Workflow
- Broad? Start at
index.mdto see subsystems and the biggest files. - Looking for a symbol?
find/<name>(orquery/<name>) → pick the handle. - Want relationships?
show/<handle>/neighborhood/<file>→ callers/callees, imports. - Tracing a flow?
path/<from>/<to>. Change impact?impact/<symbol>. - Need the actual code? Take the
source_file:lineandReadit — don't answer from the graph alone.
Anti-patterns (read these)
- "Incoming (0)" does NOT mean dead code. Cross-file
callsare resolved for named imports (TS/JS/Python), but instance-method dispatch (obj.method()), dynamic calls, and nested/inner functions are NOT — a zero-incoming symbol may still be reached via one of those. Confirm in the source before calling it unused. - The graph can be stale. It rebuilds at most once per rate-limit window. The SessionStart inject prints the build age; if it's old or you've just edited a file, prefer the live source for that file.
- Don't try to build it. There is no user-facing build step in normal use; the hooks handle it. Just read the mount.
find/is lexical, not semantic. It matches substrings, not meaning —find/authwon't surfacelogin/credentialsunless those strings appear in the id/label. Try multiple keywords if the first misses.
GitHub Repository
Frequently asked questions
What is the hivemind-graph skill?
hivemind-graph is a Claude Skill by activeloopai. Skills package instructions and resources that Claude loads on demand, so Claude can perform hivemind-graph-related tasks without extra prompting.
How do I install hivemind-graph?
Use the install commands on this page: add hivemind-graph to Claude Code as a plugin, or clone its repository into your skills directory, then restart Claude so it picks up the skill.
What category does hivemind-graph belong to?
hivemind-graph is in the Meta category, tagged automation and design.
Is hivemind-graph free to use?
Yes. hivemind-graph is listed on AIMCP and free to install.
Related Skills
This skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.
This skill enables developers to build applications with the Polymarket prediction markets platform, including API integration for trading and market data. It also provides real-time data streaming via WebSocket to monitor live trades and market activity. Use it for implementing trading strategies or creating tools that process live market updates.
This skill helps developers create OpenCode plugins that hook into 25+ event types like commands, files, and LSP operations. It provides the plugin structure, event API specifications, and implementation patterns for JavaScript/TypeScript modules. Use it when you need to intercept, monitor, or extend the OpenCode AI assistant's lifecycle with custom event-driven logic.
SGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.
