title: "graphifyでコードベースを知識グラフ化して、AIコーディングエージェントに渡す手順【導入ガイド・未検証】"
tags:
- AI
- LLM
- ClaudeCode
- graphify
- 知識グラフ
private: false
---
はじめに
GitHub Trendingで、Graphify-Labs/graphify が140kスター、当日+2,008スターを記録していた(2026-11-01時点、第三者ダイジェスト経由・※1)。本記事は、READMEの記載に沿って「導入から使い方まで」を整理したガイドである。
graphifyとは
READMEによると、コードベース、ドキュメント、SQLスキーマ、設定、PDFなどを、AIコーディングアシスタントが問い合わせられる知識グラフに変換するツールである(※2)。ポイントは次のとおり。
- コードはtree-sitterでローカル解析する(約40言語)。
- ドキュメント、PDF、画像、動画は、任意でLLMによる意味抽出を通す。
- 各エッジには
EXTRACTED(抽出)かINFERRED(推論)のタグが付く。 - ベクトル検索ではない。埋め込みもベクトルストアも使わない。
対応エージェント
READMEには、Claude Code、Cursor、Codex、Gemini CLI、GitHub Copilot CLI、Aider、Kiro、OpenCodeなど、20以上が挙がっている(※2)。
導入手順(README記載・未検証)
パッケージ名は graphifyy(yが2つ)である。typosquattingを避けるため、名前の綴りは必ずリポジトリのREADMEと照合してほしい。
uv tool install graphifyy # または pipx install graphifyy / pip install graphifyy
graphify install # 使っているアシスタントを検出し、スキルを登録
詳細ログ
tomcat-zhou@Mac xxxx %uv tool install graphifyy
Resolved 31 packages in 790ms
Prepared 31 packages in 773ms
Installed 31 packages in 26ms
+ graphifyy==0.9.100
+ networkx==3.6.1
+ numpy==2.4.6
+ pyyaml==6.0.3
+ rapidfuzz==3.14.6
+ tree-sitter==0.25.2
+ tree-sitter-bash==0.25.1
+ tree-sitter-c==0.24.2
+ tree-sitter-c-sharp==0.23.5
+ tree-sitter-cpp==0.23.4
+ tree-sitter-elixir==0.3.5
+ tree-sitter-fortran==0.6.0
+ tree-sitter-go==0.25.0
+ tree-sitter-groovy==0.1.2
+ tree-sitter-java==0.23.5
+ tree-sitter-javascript==0.25.0
+ tree-sitter-json==0.24.8
+ tree-sitter-julia==0.23.1
+ tree-sitter-kotlin==1.1.0
+ tree-sitter-lua==0.5.0
+ tree-sitter-objc==3.0.2
+ tree-sitter-php==0.24.1
+ tree-sitter-powershell==0.26.4
+ tree-sitter-python==0.25.0
+ tree-sitter-ruby==0.23.1
+ tree-sitter-rust==0.24.2
+ tree-sitter-scala==0.26.4
+ tree-sitter-swift==0.7.4
+ tree-sitter-typescript==0.23.2
+ tree-sitter-verilog==1.0.3
+ tree-sitter-zig==1.1.2
Installed 2 executables: graphify, graphify-mcp
tomcat-zhou@Mac xxxx %
tomcat-zhou@Mac xxxx %
tomcat-zhou@Mac xxxx % graphify
graphify
▄▄▀█▀▄▄
▄▄▀▀ ▄█▄ ▀▀▄▄
██▀▀▀▀▀███▀▀▀▀▀▀▀ ▄█████▄ ██ ██ ▄████
█ ▀▄ ▄▀ ██▀ ▀▀▀ ██▄███ ██████▄ ██▄████▄ ██▄████▄ ▄▄ █████ ██ ██
█ ███ ███▀▀█ ██ █████ ██▀ ▄▄▄▄▄██ ██▀ ▀██ ██▀ ▀██ ██ ██ ▀██ ██▀
█ ▀▀█▄ ▀▀▀▄ █ ██▄ ▄██ ██ ██▀▀▀▀██ ██▄ ▄██ ██ ██ ██ ██ ▀█▄▄█▀
█ ███ ▀█ ▀████▀██ ██ ▀██████▀ ██▀████▀ ██ ██ ██ ██ ▀██▀ 0.9.100
▀██▀▀▀▀▀█▀▀▀▀▀██▀ ██ ▄██
▀▀▄▄ █ ▄▄▀▀ ██ ██▀
▀▀▀
Usage: graphify <command>
Commands:
install [--platform P] copy skill to platform config dir (claude|codex|opencode|kilo|aider|copilot|claw|droid|trae|trae-cn|hermes|kiro|pi|codebuddy|antigravity|antigravity-windows|windows|kimi|amp|agents|devin|gemini|cursor)
uninstall remove graphify from all detected platforms in one shot
--purge also delete graphify-out/ directory
path "A" "B" shortest path between two nodes in graph.json
--graph <path> path to graph.json (default graphify-out/graph.json)
--directed force a directed search (the default;
the JSON 'directed' flag is NOT consulted)
--undirected ignore edge direction
explain "X" plain-language explanation of a node and its neighbors
--all list every connection (default: the 20 most connected)
--graph <path> path to graph.json (default graphify-out/graph.json)
diagnose multigraph report same-endpoint edge collapse risk in graph.json
--graph <path> path to graph/extraction JSON
(default graphify-out/graph.json)
--json emit machine-readable JSON
--max-examples N max same-endpoint examples to print (default 5)
--directed force directed post-build simulation
--undirected force undirected post-build simulation
(default follows JSON directed flag;
raw extraction with no flag defaults directed)
...
...
Skillとして、AI Agent プラットフォーム(例:Claude、GitHub Copilotなど)にインストールする
tomcat-zhou@Mac xxxx % graphify install --platform claude
▄▄▀█▀▄▄
▄▄▀▀ ▄█▄ ▀▀▄▄
██▀▀▀▀▀███▀▀▀▀▀▀▀ ▄█████▄ ██ ██ ▄████
█ ▀▄ ▄▀ ██▀ ▀▀▀ ██▄███ ██████▄ ██▄████▄ ██▄████▄ ▄▄ █████ ██ ██
█ ███ ███▀▀█ ██ █████ ██▀ ▄▄▄▄▄██ ██▀ ▀██ ██▀ ▀██ ██ ██ ▀██ ██▀
█ ▀▀█▄ ▀▀▀▄ █ ██▄ ▄██ ██ ██▀▀▀▀██ ██▄ ▄██ ██ ██ ██ ██ ▀█▄▄█▀
█ ███ ▀█ ▀████▀██ ██ ▀██████▀ ██▀████▀ ██ ██ ██ ██ ▀██▀ 0.9.100
▀██▀▀▀▀▀█▀▀▀▀▀██▀ ██ ▄██
▀▀▄▄ █ ▄▄▀▀ ██ ██▀
▀▀▀
references -> /Users/tomcat-zhou/.claude/skills/graphify/references
skill installed -> /Users/tomcat-zhou/.claude/skills/graphify/SKILL.md
CLAUDE.md -> created at /Users/tomcat-zhou/.claude/CLAUDE.md
Done. Open your AI coding assistant and type:
/graphify .
Prefer a hosted version? Try the graphify platform free for 14 days:
https://app.graphify.com
tomcat-zhou@Mac AS_AI % graphify install --platform copilot
▄▄▀█▀▄▄
▄▄▀▀ ▄█▄ ▀▀▄▄
██▀▀▀▀▀███▀▀▀▀▀▀▀ ▄█████▄ ██ ██ ▄████
█ ▀▄ ▄▀ ██▀ ▀▀▀ ██▄███ ██████▄ ██▄████▄ ██▄████▄ ▄▄ █████ ██ ██
█ ███ ███▀▀█ ██ █████ ██▀ ▄▄▄▄▄██ ██▀ ▀██ ██▀ ▀██ ██ ██ ▀██ ██▀
█ ▀▀█▄ ▀▀▀▄ █ ██▄ ▄██ ██ ██▀▀▀▀██ ██▄ ▄██ ██ ██ ██ ██ ▀█▄▄█▀
█ ███ ▀█ ▀████▀██ ██ ▀██████▀ ██▀████▀ ██ ██ ██ ██ ▀██▀ 0.9.100
▀██▀▀▀▀▀█▀▀▀▀▀██▀ ██ ▄██
▀▀▄▄ █ ▄▄▀▀ ██ ██▀
▀▀▀
references -> /Users/tomcat-zhou/.copilot/skills/graphify/references
skill installed -> /Users/tomcat-zhou/.copilot/skills/graphify/SKILL.md
Done. Open your AI coding assistant and type:
/graphify .
Prefer a hosted version? Try the graphify platform free for 14 days:
https://app.graphify.com
プロジェクト単位で入れる場合は graphify install --project を使う。Cursor向けなどは graphify cursor install のように個別コマンドがある。
基本の使い方(README記載・未検証)
アシスタント(今回claude agent)の中で、次のコマンドを実行する。
/graphify .
出力は graphify-out/ に作られる。
| ファイル | 内容 |
|---|---|
graph.html |
グラフの可視化 |
GRAPH_REPORT.md |
構造の要約レポート |
graph.json |
グラフのデータ |
質問するときは次のようにする。
/graphify query "認証処理はどこから呼ばれる?"
/graphify path "A" "B"
/graphify explain "X"
更新や運用のためのオプションも用意されている。
-
--update:変更のあったファイルだけ再抽出 -
--cluster-only:クラスタリングだけ再実行 -
graphify hook install:コミットやブランチ切り替えのたびに自動で再構築
内部の仕組み(README記載)
- 約40言語のASTをローカルで解析し、
calls、imports、inherits、mixes_inを、ファイルをまたいで解決する。 - コミュニティ検出にはLeiden法を使い、拡張が未導入ならnetworkxのLouvain法で代替する。
- 設計理由のコメントやADR、RFCの引用も、コードにつながるノードになる。
- オプションでMCPのstdioサーバーとして動かせ、Neo4jやFalkorDBへ書き出せる。
運用前に確認したい点
プライバシー
READMEによれば、テレメトリはない。コードはローカルに留まるが、ドキュメントやメディアの意味抽出では、設定したLLMバックエンドへ内容が送られる。クエリのログは、無効にしない限り ~/.cache/graphify-queries.log に書かれる(※2)。社外秘の文書を処理する前に、どのバックエンドに送られるかを必ず確認したい。
ライセンス
リポジトリにはApache-2.0とMITの両方が表示されている(※2)。組み込む場合は、実際のLICENSEファイルを読んで確認してほしい。
成熟度
最新のリリース番号や日付は、取得したページでは確認できなかった。v8 ブランチと2,675コミットが表示されていたのみである(※2)。スター数の多さは、品質を保証しない。
類似ツールとの位置づけ
同じトレンドには、エージェントの記憶を扱うOSSが並んでいた(2026-11-01時点・ダイジェスト値)。
図2:トレンド入りしていた記憶系OSS
| ツール | 方式 | 向いている場面 |
|---|---|---|
| graphify | コードベースの構造をグラフ化 | 大きなリポジトリの構造把握 |
| claude-mem | セッション履歴を圧縮して再注入(※3) | 作業の継続性を保つ |
| mem0 | エージェント向けのメモリ層 | 製品に組み込む記憶 |
構造(graphify)と履歴(claude-mem、mem0)は役割が違うため、競合というより補完関係に近い。
ハマりそうな点(予想)
実行していないので推測にとどまる。
- 大規模リポジトリでは、初回の構築に時間とLLMコストがかかる可能性がある。
-
INFERREDのエッジは、推論に基づくため、誤りを含み得る。重要な判断には、EXTRACTEDを優先して確認する。 - 記憶系ツールと併用すると、コンテキストの二重注入でトークンを消費しやすい。
評価(暫定)
アイデアとしては、ベクトル検索に頼らず、構造を明示するところが魅力的である。一方で、筆者自身は未検証であり、実際の精度や所要時間は、手元のリポジトリで測る必要がある。まずは小さなリポジトリで /graphify . を試し、GRAPH_REPORT.md の内容が実態と合っているかを確かめるのがよいだろう。
試す前のチェックリスト
最後に、試す前に確認しておきたい項目を、手順の形でまとめておく。
- リポジトリの範囲を決める。 最初は、社外秘を含まない、小さめの公開リポジトリで試す。
- LLMバックエンドを確認する。 文書やPDFの意味抽出を使うなら、どのサービスに内容が送られるかを、事前に把握する。コードの解析だけで足りるなら、LLMを使わない範囲に留める。
-
ログの扱いを決める。 クエリのログが
~/.cache/graphify-queries.logに書かれる。共有マシンでは、無効化するか、保存先を確認する。 -
成果物を見直す。
GRAPH_REPORT.mdを読んで、自分が知っている構造と合っているかを確かめる。INFERREDのエッジは、特に疑って見る。 - 効果を測る。 同じ質問を、graphifyありとなしで、エージェントに投げる。回答の正確さ、必要だったやり取りの回数、トークン消費を比べる。
まとめ
graphifyは、コードや文書を知識グラフにして、AIコーディングエージェントに渡すツールである。導入は graphifyy のインストールと graphify install の2手順で、/graphify . で構築する。本記事の手順はREADME記載の整理で、筆者は未検証である。処理内容の送信先とライセンスを確認してから、小さく試すことを勧める。
※本記事の記載内容は筆者個人の見解であり、所属する会社や組織の立場や方針とは一切関係ありません。
筆者情報
【Tomcat-周】|AI/AX/AIセキュリティ専門家
AI戦略洞察、AI駆動開発の方法論設計と現場で回る仕組みづくりをしています。
noteで戦略洞察 / Zenn・Qiitaで技術・方法論を書いています。
AIセキュリティ・AIコンサル・AIエージェント開発・AI活用・AI駆動開発教育、AI人材育成サービスを一体で提供。
X: @ZY20240528
LinkedIn: tomcat-zhou
Facebook: zhou yi
note: tomcat-周
zenn: tomcat-周
参考資料
- AI Open Source Trends 2026-11-01(agents-radar)
- Graphify-Labs/graphify(GitHub)
- thedotmack/claude-mem(GitHub)
タグ
AI LLM ClaudeCode graphify 知識グラフ AIエージェント OSS






