mcpbeat Sign in

Hivemind Graph Agent Skill

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

1k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
1529
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/activeloopai/hivemind --skill hivemind-graph

The instruction itself

6 sections, as written by the author

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

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.md to see subsystems and the biggest files.
  • Looking for a symbol? find/<name> (or query/<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:line and Read it — don't answer from the graph alone.

Anti-patterns (read these)

  • "Incoming (0)" does NOT mean dead code. Cross-file calls are 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/auth won't surface login/credentials unless those strings appear in

the id/label. Try multiple keywords if the first misses.

Other skills for the same job

different authors, same section of the catalogue
MCP Builder
by anthropics
vendor ×13

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

30k tokens scripts
Changelog Generator
by frostant
×9

Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

774 tokens
Finishing A Development Branch
by ZhanlinCui
×7

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup

1k tokens
MCP Builder
by JayZeeDesign
×7

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

37k tokens scripts
Vercel React Native Skills
by vercel-labs
vendor ×6

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

39k tokens
Vercel React Best Practices
by ratacat
×5

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

34k tokens
Next Best Practices
by vercel-labs
vendor ×4

Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling

20k tokens
Using Git Worktrees
by ZhanlinCui
×4

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification

1k tokens

How to use it

Copy the folder

Take activeloopai/hivemind-hivemind-graph from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.