MCP HubMCP Hub
SKILL·124A8F

hivemind-graph

activeloopai
更新日 27 days ago
3 閲覧
1,591
103
1,591
GitHubで表示
メタautomationdesign

について

このスキルは、開発者がASTから派生したコードグラフをクエリし、呼び出し元、インポート、定義の検索など、コードベースに関する構造的な質問に答えることを可能にします。リポジトリから自動的に再構築され、ビルドプロセスを必要とせず、ローカルのDeeplakeマウントを介してアクセスされます。影響分析、アーキテクチャの理解、依存関係のナビゲーションにご利用ください。

クイックインストール

Claude Code

推奨
メイン
npx skills add activeloopai/hivemind -a claude-code
プラグインコマンド代替
/plugin add https://github.com/activeloopai/hivemind
Git クローン代替
git clone https://github.com/activeloopai/hivemind.git ~/.claude/skills/hivemind-graph

このコマンドをClaude Codeにコピー&ペーストしてスキルをインストールします

ドキュメント

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

  1. Broad? Start at index.md to see subsystems and the biggest files.
  2. Looking for a symbol? find/<name> (or query/<name>) → pick the handle.
  3. Want relationships? show/<handle> / neighborhood/<file> → callers/callees, imports.
  4. Tracing a flow? path/<from>/<to>. Change impact? impact/<symbol>.
  5. 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.

GitHub リポジトリ

activeloopai/hivemind
パス: harnesses/claude-code/skills/hivemind-graph
0
aiai-agentsai-memoryanthropicartificial-intelligenceclaude
FAQ

よくある質問

hivemind-graph Skillとは何ですか?

hivemind-graph はactiveloopai が作成した Claude Skillです。Skillは、Claudeが必要に応じて読み込む指示とリソースをまとめ、追加の指示なしで hivemind-graph に関連するタスクを実行できるようにします。

hivemind-graph をインストールするには?

このページのインストールコマンドを使用してください。hivemind-graph をプラグインとして Claude Code に追加するか、リポジトリを skills ディレクトリにクローンし、Claudeを再起動してSkillを読み込みます。

hivemind-graph はどのカテゴリに属しますか?

hivemind-graph は メタ カテゴリに属します。

hivemind-graph は無料で利用できますか?

はい。hivemind-graph は AIMCP に掲載されており、無料でインストールできます。

関連スキル

content-collections
メタ

このスキルは、Content Collections(Markdown/MDXファイルを型安全なデータコレクションに変換するTypeScriptファーストのツール)の本番環境でテストされた設定を提供します。Zodバリデーションによる型安全性を実現し、ブログ、ドキュメントサイト、コンテンツ重視のVite + Reactアプリケーション構築時にご利用ください。Viteプラグインの設定、MDXコンパイルから、デプロイ最適化、スキーマバリデーションまで、すべてを網羅しています。

スキルを見る
polymarket
メタ

このスキルは、開発者がPolymarket予測市場プラットフォームを活用したアプリケーション構築を可能にします。API統合による取引や市場データの取得に加え、WebSocketを介したリアルタイムデータストリーミングにより、ライブ取引や市場活動を監視できます。取引戦略の実装や、ライブ市場更新を処理するツールの作成にご利用ください。

スキルを見る
creating-opencode-plugins
メタ

このスキルは、開発者がコマンド、ファイル、LSP操作など25種類以上のイベントタイプにフックするOpenCodeプラグインを作成することを支援します。JavaScript/TypeScriptモジュール向けに、プラグイン構造、イベントAPI仕様、および実装パターンを提供します。カスタムイベント駆動ロジックでOpenCode AIアシスタントのライフサイクルをインターセプト、監視、または拡張する必要がある場合にご利用ください。

スキルを見る
sglang
メタ

SGLangは、高性能なLLMサービングフレームワークであり、RadixAttentionプレフィックスキャッシュを活用したJSON、正規表現、エージェントワークフロー向けの高速で構造化された生成を特長とします。特にプレフィックスが繰り返されるタスクにおいて、大幅に高速な推論を実現し、複雑な構造化出力やマルチターン対話に最適です。制約付きデコードが必要な場合や、広範なプレフィックス共有を伴うアプリケーションを構築する場合は、vLLMなどの代替案ではなくSGLangを選択してください。

スキルを見る