{"id":"hivemind-graph-25aff9","name":"hivemind-graph","summary":"構造的なコードベースの質問として、何がXを呼び出すのか、Yが何をインポートするのか、Zが定義されているのか、変化の爆発半径など、ローカルのAST由来コードグラフ(関数、クラス、呼び出し、インポート)を検索します。","body":"# Hivemind Code Graph (OpenClaw)\n\nA deterministic, AST-derived map of the current repository — every function,\nclass, method, interface, type, enum, const, and module, plus the edges between\nthem (`calls`, `imports`, `extends`, `implements`, `method_of`).\n\nThe graph **builds and refreshes automatically** after each turn (gated by rate\nlimit + git diff). You never run a build command — just call the graph tools.\n\nSet `plugins.entries.hivemind.config.tuning.HIVEMIND_GRAPH_CWD` in\n`~/.openclaw/openclaw.json` to the git root of the project you want indexed\nwhen the gateway's working directory is not the repo (then restart the gateway).\n\nUse the graph as a fast **INDEX** to locate the few files/symbols that matter,\nthen use the host's read/exec tools on the real source. It is not a substitute\nfor reading source files.\n\n## When to use this skill\n\nActivate when the user asks a *structural / relational* question about the code:\n\n- \"What calls `pushSnapshot`?\" / \"Who uses this function?\"\n- \"What does `deeplake-pull.ts` import?\" / \"What depends on X?\"\n- \"Where is `GraphSnapshot` defined?\" / \"Find the function that handles Y.\"\n- \"What are the main subsystems / the architecture here?\"\n- \"If I change this signature, what's affected?\"\n\n## Tools\n\n- `hivemind_graph_search({ pattern })` — search symbols by substring (or\n  multi-token AND with `+`, e.g. `auth+handler`). Returns matches with 1-hop\n  neighbors (callers, callees, imports). **Start here.**\n- `hivemind_graph_neighborhood({ file })` — every symbol in a repo-relative\n  file path plus its cross-file neighbors.\n\n## Workflow\n\n1. Broad structural question? `hivemind_graph_search({ pattern: \"<symbol>\" })`.\n2. Know the file? `hivemind_graph_neighborhood({ file: \"src/hooks/capture.ts\" })`.\n3. Need the actual code? Open the `source_file:line` from the tool output with\n   the host read tool — don't answer from the graph alone.\n\n## When NOT to use this skill\n\n- Reading the **body** of a symbol you already located → use the host read tool.\n- Code that isn't **committed/built** yet — the graph can lag uncommitted edits.\n- Languages outside **TypeScript, JavaScript, and Python** — fall back to grep.\n\n## Anti-patterns\n\n- **Zero incoming callers does NOT mean dead code.** Instance-method dispatch and\n  dynamic calls are not fully resolved.\n- **The graph can be stale.** Prefer live source for files edited in this session.\n- **`pattern` is lexical, not semantic** — try multiple keywords if the first misses.","author":"@activeloopai","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/activeloopai/hivemind/tree/main/harnesses/openclaw/skills/hivemind-graph","license":"Apache-2.0","category":"coding","lang":"en","tokens":624,"stars":0,"calls30d":1,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[],"requires":{"mcp":[],"tools":["hivemind_graph_search","hivemind_graph_neighborhood"]},"safety":{"flags":[],"scannedAt":"2026-08-22","hasScripts":false,"networkEndpoints":[]}}