/ 目錄 / 演練場 / Graphify
● 社群 safishamsi ⚡ 即開即用

Graphify

作者 safishamsi · safishamsi/graphify

Graphify indexes any folder (code, docs, PDFs, images, video) into a knowledge graph with Leiden-clustered communities — so your agent queries concepts, not filenames.

Graphify is a multimodal knowledge-graph skill. Install via uv tool install graphifyy, run graphify install, and every Claude Code / Codex / Cursor session after that can query your graph with /graphify query, /graphify path, /graphify explain. Code parsing is local via tree-sitter (25 languages); concept extraction uses Claude; visual output is an interactive HTML + structured JSON. --watch keeps it in sync with your repo.

為什麼要用

核心特性

即時演示

實際使用效果

graphify-skill.replay ▶ 就緒
0/0

安裝

選擇你的客戶端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "graphify-skill": {
      "command": "uv",
      "args": [
        "tool",
        "install",
        "graphifyy"
      ],
      "_inferred": true
    }
  }
}

開啟 Claude Desktop → Settings → Developer → Edit Config。儲存後重啟應用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "graphify-skill": {
      "command": "uv",
      "args": [
        "tool",
        "install",
        "graphifyy"
      ],
      "_inferred": true
    }
  }
}

Cursor 使用與 Claude Desktop 相同的 mcpServers 格式。專案級設定優先於全域。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "graphify-skill": {
      "command": "uv",
      "args": [
        "tool",
        "install",
        "graphifyy"
      ],
      "_inferred": true
    }
  }
}

點擊 Cline 側欄中的 MCP Servers 圖示,然後選 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "graphify-skill": {
      "command": "uv",
      "args": [
        "tool",
        "install",
        "graphifyy"
      ],
      "_inferred": true
    }
  }
}

格式與 Claude Desktop 相同。重啟 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "graphify-skill",
      "command": "uv",
      "args": [
        "tool",
        "install",
        "graphifyy"
      ]
    }
  ]
}

Continue 使用伺服器物件陣列,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "graphify-skill": {
      "command": {
        "path": "uv",
        "args": [
          "tool",
          "install",
          "graphifyy"
        ]
      }
    }
  }
}

加入 context_servers。Zed 儲存後熱重載。

claude mcp add graphify-skill -- uv tool install graphifyy

一行命令搞定。用 claude mcp list 驗證,claude mcp remove 移除。

使用場景

實戰用法: Graphify

Onboard to a 5-year-old legacy codebase in hours, not weeks

👤 New hires, contractors inheriting code ⏱ ~60 min intermediate

何時使用: You've joined a project with 10k+ files, dozens of internal services, and tribal knowledge spread across PRs and Confluence.

前置條件
  • uv installed — curl -LsSf https://astral.sh/uv/install.sh | sh
  • Graphify installed globally — uv tool install graphifyy && graphify install
步驟
  1. Index the repo
    /graphify index /workspace/monolith --include '**/*.{ts,py,md}'✓ 已複製
    → Graph builds; report tells you cluster count and dominant concepts
  2. Ask the graph
    /graphify query 'how does payment processing connect to audit logging?'✓ 已複製
    → Path through concepts with file references — not just a grep
  3. Open the visual
    /graphify explain 'user-account cluster' and open the HTML viewer✓ 已複製
    → Interactive graph opens; cluster is highlighted with its bridges

結果: You know the conceptual shape of the codebase — where the hot paths live, which clusters are isolated, what depends on what.

注意事項
  • Graph becomes stale as the repo changes — graphify --watch to auto-update; or re-index before a big review session
  • Noise from vendored deps — Configure --exclude 'node_modules/,vendor/' on initial indexing
搭配使用: filesystem · context7

Build a research graph over 200 papers and ask cross-paper questions

👤 Researchers, policy analysts, lit-review writers ⏱ ~90 min intermediate

何時使用: You have a folder of 200 PDFs and need to find cross-paper threads no single paper exposes.

步驟
  1. Index the corpus
    /graphify index /research/climate-pdfs✓ 已複製
    → Concept clusters emerge (e.g. 'carbon pricing', 'adaptation finance')
  2. Bridge-finding query
    /graphify path 'adaptation finance' → 'sovereign debt'✓ 已複製
    → Ordered chain of concepts + papers that connect the two
  3. Generate a literature review
    Summarize the 'adaptation finance → sovereign debt' bridge as a 400-word section with paper citations.✓ 已複製
    → Draft paragraph with correct citations from the graph

結果: Insights that come from the structure of the corpus, not just keyword grep.

注意事項
  • Scanned PDFs don't OCR — Run OCR (ocrmypdf) before indexing; Graphify won't magic-text images
搭配使用: filesystem

Merge graphs from multiple repos into one searchable view

👤 Platform teams owning microservice fleets ⏱ ~120 min advanced

何時使用: You run 15 services. You want one graph that spans them so an agent can follow a request end-to-end.

步驟
  1. Index each service
    For each repo under /services/, run graphify index with --out graph-<name>.json✓ 已複製
    → 15 graph.json files on disk
  2. Merge
    graphify merge-graphs graph-*.json --out fleet.json✓ 已複製
    → One unified graph with cross-repo edges
  3. Ask end-to-end
    /graphify query 'trace a POST /checkout through the fleet'✓ 已複製
    → Path through multiple services, each node annotated with its repo

結果: Cross-service traceability without a service mesh or OTEL rollout.

注意事項
  • Same concept named differently across repos — Graphify's similarity merge handles most; for the rest, define aliases in the config
搭配使用: filesystem · github

組合

與其他 MCP 搭配,撬動十倍槓桿

graphify-skill + filesystem

Graphify points at files; filesystem lets the agent actually read/edit them

/graphify query 'retry logic' → list files, then filesystem read_text_file each one to draft a refactor.✓ 已複製
graphify-skill + github

Turn graph queries into PR plans

Use the graph to find everywhere we do ad-hoc retries; open a GitHub issue listing each file with a proposed consolidation.✓ 已複製
graphify-skill + sequential-thinking

Multi-step reasoning that uses the graph as an oracle

Plan the refactor step-by-step; at each step, consult /graphify query for impact.✓ 已複製

工具

此 MCP 暴露的能力

工具輸入參數何時呼叫成本
/graphify index path, include, exclude, --watch First — build the graph Claude calls for concept extraction (use prompt caching)
/graphify query natural-language question The primary query interface free (local) + small model call
/graphify path concept A → concept B When you want to see how two ideas connect free
/graphify explain node/cluster id Deep-dive on a single cluster free + small model call
graphify merge-graphs graph-*.json Cross-repo / cross-folder views free

成本與限制

運行它的成本

API 配額
Local indexing is free; concept extraction uses Claude API (your key)
每次呼叫 Token 數
Indexing a 10k-file repo ≈ tens of dollars with caching; queries are cheap
費用
Free software; pay for the extraction calls only
提示
Cache aggressively — Graphify already does prompt caching for extraction; index once, query 1000x

安全

權限、密鑰、影響範圍

憑證儲存: Uses your Claude API key for extraction; graph.json stored locally
資料出站: Concept extraction calls go to Anthropic (your account). No telemetry from Graphify itself.
切勿授予: Sharing graph.json publicly when indexed from a private repo — it embeds code snippets and filenames

故障排查

常見錯誤與修復

graphify: command not found after install

uv tool install graphifyy puts the binary in ~/.local/bin; ensure that's on PATH, or run with uv tool run graphify.

驗證: uv tool list | grep graphify
Indexing takes forever on a large repo

Scope with --include '**/*.{py,ts,md}' and --exclude 'node_modules/,dist/'. Concept extraction, not parsing, is the bottleneck.

驗證: Watch the progress log; parsing should be seconds, extraction takes the time
Queries return irrelevant clusters

Graph quality depends on the index — add README/docs files to the input set so Claude has project context for naming clusters

驗證: Rebuild including /docs/**/*.md; queries should sharpen
Merge-graphs produces duplicate nodes

Lower --similarity-threshold (default ~0.8) to 0.7 to merge near-duplicates more aggressively; tune per-repo

替代方案

Graphify 對比其他方案

替代方案何時用它替代權衡
SerenaYou want LSP-precise symbol navigation and refactor tools, not conceptual clustersNo multi-modal input; no clustering
Memory MCPYou want Claude to remember session facts, not index a corpusNo graph; no query-by-concept
Raw embedding + vector DBYou need custom retrieval logic and don't care about community detectionYou build the whole pipeline — graphify is opinionated and faster to ship

更多

資源

📖 閱讀 GitHub 上的官方 README

🐙 查看未解決的 issue

🔍 瀏覽全部 400+ MCP 伺服器和 Skills