hivemind-graph

hivemind-graph is a skill for Claude Code from activeloopai/hivemind. It costs 105 tokens per session (1,248 once invoked), scanned A, original, Apache-2.0.

A map of a codebase that lists its functions, classes, files, and the relationships between them, such as which code calls or imports other code.

In plain words
What is it for?
Use it to find where code is defined, what depends on it, how parts of a repository connect, and what may be affected by a change.
Why use it?
It helps answer structural questions without searching through every file by hand. It points you to the relevant source files, but does not replace reading the source itself.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the hivemind plugin — 3 skills, 2 commands, 7 hooks shipped together

Good fit Use it to find where code is defined, what depends on it, how parts of a repository connect, and what may be affected by a change.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/activeloopai/hivemind/hivemind-graph
About the project

Hivemind is a shared memory system for coding agents that records their sessions and turns recurring solutions into reusable skills. Teams use it to let agents search past traces, share learned procedures across tools and machines, and keep the resulting knowledge in their own cloud or on-premises storage. The catalogue entries are Hivemind's own skills, hooks, plugins, and commands for connecting agents to that shared memory.

activeloopai/hivemind · 1,629 stars · on GitHub · deeplake.ai

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add activeloopai/hivemind --skill hivemind-graph
Clone the repo
git clone --depth 1 https://github.com/activeloopai/hivemind

Made for: Claude Code.

Or install hivemind, the plugin that ships this one along with the rest of its 3 skills, 2 commands, 7 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hivemind-graph

README.md
[![agentmods](https://agentmods.dev/badge/skills/activeloopai/hivemind/hivemind-graph/github.svg)](https://agentmods.dev/skills/activeloopai/hivemind/hivemind-graph)
Your own site
<a href="https://agentmods.dev/skills/activeloopai/hivemind/hivemind-graph"><img src="https://agentmods.dev/badge/skills/activeloopai/hivemind/hivemind-graph/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hivemind-graph

Your own site · 80×15
<a href="https://agentmods.dev/skills/activeloopai/hivemind/hivemind-graph"><img src="https://agentmods.dev/badge/skills/activeloopai/hivemind/hivemind-graph.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,248 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00105 $0.01248
Opus 5.5 $0.00042 $0.00499
Sonnet 5.5 $0.00021 $0.00250
Haiku 4.5 $0.00011 $0.00125

Measured 1mo ago against content hash 13c13a44e901, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

hivemind-graph scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

harnesses/claude-code/skills/hivemind-graph/SKILL.md · 95 lines

How it starts

The opening of the file, as written. The whole thing — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

Read the full file on GitHub · 95 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 95 lines · 105 tokens per session scan A 13c13a44e901

Subscribe to this mod's changes

hivemind-graph is a skill published in the GitHub repository activeloopai/hivemind (1,629 stars, last pushed yesterday), licensed Apache-2.0. It adds 105 tokens to every session and 1,248 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

smart-explore

Token-optimized structural code search using tree-sitter AST parsing. Use instead of reading full files when you need to understand code structure, find functions, or explore a codebase efficiently.

thedotmack/claude-mem · 41 tokens

dejavu-scan

Trigger a manual scan for antipatterns. Use when user asks "scan for patterns", "dejavu scan", "check for mistakes".

cmg8431/claude-dejavu · 33 tokens

dejavu-status

Quick status check for dejavu. Use when user asks "dejavu status", "how's dejavu doing".

cmg8431/claude-dejavu · 27 tokens

ccs-align

Run the CCS Align seat's hourly breathing cycle — prove the local claude-mem worker is healthy, pull needle observations through search → timeline → getobservations, land them in a seat-owned middle cache via atomic grab → append → filter exclude-marks → replace, manage exclude marks, and walk house → project → seat…

thedotmack/claude-mem · 136 tokens

design-is

Audit a design against Dieter Rams' ten "Good design is..." principles, then hand off a /make-plan prompt for one of three outcomes — new design, refine design, or redesign. Use when the user says "audit this design", "design review", "check this UI against Rams", "is this UI good", "critique this design", "design…

thedotmack/claude-mem · 91 tokens

Agent Cost Report

Believable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json…

thedotmack/claude-mem · 75 tokens