SKILL·D4569C

hivemind-graph

activeloopai
Updated Yesterday
1,530
97
1,530
View on GitHub
Metaautomationdesign

About

This skill provides automated AST-based code graph analysis for answering structural questions about your codebase, such as finding callers, imports, definitions, or change impact. The graph rebuilds automatically after each agent interaction using git diffs, requiring no manual build steps. Developers can query it using the hivemind_graph_search and hivemind_graph_neighborhood tools to understand dependencies and relationships.

Quick Install

Claude Code

Recommended
Primary
npx skills add activeloopai/hivemind -a claude-code
Plugin CommandAlternative
/plugin add https://github.com/activeloopai/hivemind
Git CloneAlternative
git clone https://github.com/activeloopai/hivemind.git ~/.claude/skills/hivemind-graph

Copy and paste this command in Claude Code to install this skill

Documentation

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.

GitHub Repository

activeloopai/hivemind
Path: harnesses/openclaw/skills/hivemind-graph
0
aiai-agentsai-memoryanthropicartificial-intelligenceclaude
FAQ

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

content-collections
Meta

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.

View skill
polymarket
Meta

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.

View skill
creating-opencode-plugins
Meta

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.

View skill
sglang
Meta

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.

View skill