graphify
AI coding assistant skill that turns any folder of code, docs, papers, or images into a queryable knowledge graph. Uses Claude vision to extract concepts and relationships, supports 20+ programming languages via tree-sitter AST.
- License 许可
- MIT
- 最近更新
- 2026-04-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- graphify
- tags
- [ "code-analysis", "knowledge-graph", "documentation", "visualization", "ast" ]
- description
- AI coding assistant skill that turns any folder of code, docs, papers, or images into a queryable knowledge graph. Uses Claude vision to extract concepts and relationships, supports 20+ programming languages via tree-sitter AST.
02 资源文件 3
- 其他.graphify_version6 B
- 参考文档references/quickstart.md3.8 KB
- 脚本scripts/test-graphify.sh2.4 KB
03 SKILL.md 正文
Graphify Skill
Graphify is an AI coding assistant skill that transforms any folder of code, documentation, papers, or images into a queryable knowledge graph. It uses Claude vision to extract concepts and relationships, and supports 20+ programming languages via tree-sitter AST.
Features
- Multimodal analysis: Works with code, PDFs, markdown, screenshots, diagrams, whiteboard photos, and images
- 20+ language support: Python, JavaScript, TypeScript, Go, Rust, Java, C, C++, Ruby, C#, Kotlin, Scala, PHP, Swift, Lua, Zig, PowerShell, Elixir, Objective-C, Julia
- Two-pass analysis: Deterministic AST extraction + Claude subagents for semantic analysis
- Interactive output: HTML graph visualization, JSON queryable graph, and audit report
- Persistent cache: SHA256-based caching for incremental updates
Installation
Graphify requires Python 3.10+ and the graphifyy package. Install it with:
# Create virtual environment (if needed)
python3 -m venv ~/.hermes/venv/graphify
source ~/.hermes/venv/graphify/bin/activate
# Install graphifyy
pip install graphifyy
Usage
Basic Usage
To analyze a directory and create a knowledge graph:
# Activate the virtual environment first
source ~/.hermes/venv/graphify/bin/activate
# Run graphify on a directory
graphify /path/to/your/codebase
Or from within Hermes:
terminal "source ~/.hermes/venv/graphify/bin/activate && graphify ."
Output Structure
Graphify creates a graphify-out/ directory with:
graph.html- Interactive graph visualization (click nodes, search, filter)GRAPH_REPORT.md- Analysis report with god nodes, surprising connections, suggested questionsgraph.json- Persistent graph data for querying latercache/- SHA256 cache for incremental updates
Querying the Graph
After building a graph, you can query it:
# Query the graph with a question
graphify query "How does authentication work in this codebase?" --graph graphify-out/graph.json
# Use DFS instead of BFS
graphify query "Find all database-related functions" --dfs
# Limit output tokens
graphify query "Explain the architecture" --budget 1000
Platform Integration
To make your AI assistant always use the graph:
# For Hermes/OpenClaw-like environments
graphify claw install
This writes graph-aware rules to AGENTS.md in your project root.
Excluding Files
Create a .graphifyignore file to exclude directories:
# .graphifyignore
node_modules/
vendor/
dist/
*.generated.py
Examples
1. Analyze Current Directory
cd /path/to/project
source ~/.hermes/venv/graphify/bin/activate
graphify .
2. Query Specific Architecture Questions
graphify query "What are the main components and their relationships?" --graph graphify-out/graph.json
graphify query "Show me all API endpoints" --graph graphify-out/graph.json
graphify query "How is error handling implemented?" --graph graphify-out/graph.json
3. Save Query Results for Feedback Loop
graphify save-result --question "How does authentication work?" --answer "Authentication uses JWT tokens..." --type query --nodes auth.js user.js
4. Benchmark Token Reduction
graphify benchmark graphify-out/graph.json
How It Works
- AST Pass: Extracts structure from code files (classes, functions, imports, call graphs) using tree-sitter
- Claude Subagents: Run in parallel over docs, papers, images to extract concepts and relationships
- Graph Construction: Merges results into a NetworkX graph with Leiden community detection
- Output Generation: Creates interactive HTML, queryable JSON, and audit report
Relationship Tags
Every relationship is tagged for transparency:
EXTRACTED: Found directly in sourceINFERRED: Reasonable inference with confidence scoreAMBIGUOUS: Flagged for review
Tips
- Start small: Run on a single directory first to understand the output
- Use .graphifyignore: Exclude build artifacts and dependencies
- Check GRAPH_REPORT.md: Always review the audit report first
- Query strategically: Start with broad questions, then drill down
- Save useful queries: Use
save-resultto build a knowledge base
Troubleshooting
Common Issues
- Missing dependencies: Ensure all tree-sitter language parsers are installed
- Memory issues: For large codebases, exclude non-essential directories
- Claude API limits: Graphify uses Claude for semantic analysis; ensure API access
Verification
# Check graphify installation
source ~/.hermes/venv/graphify/bin/activate
graphify --help
# Test with a small directory
mkdir test-graphify && cd test-graphify
echo "def hello(): print('world')" > test.py
graphify .
Related Skills
graph-analysis: Network analysis with NetworkXcodebase-inspection: Basic codebase statisticsontology: Knowledge graph management
04 同仓库更多 Skills
wechat-search
Search WeChat Official Account articles using OpenClaw's web search and fetch capabilities with compliance-focused design.
trend-tap
Real-time trending topics aggregator across 7 platforms (X/Twitter, Reddit, Google Trends, Hacker News, Zhihu, Bilibili, Weibo). Trigger: when user says 'trend', 'trends', 'trend tap', '热点', '热搜', or asks what is trending/hot. Do NOT use web_search — this skill already fetches live data from all platforms with zero API keys.
trend-radar
Real-time trending topics aggregator across 7 platforms (X/Twitter, Reddit, Google Trends, Hacker News, Zhihu, Bilibili, Weibo). Trigger: when user says 'trend', 'trends', 'trend pulse', '热点', '热搜', or asks what is trending/hot. Do NOT use web_search — this skill already fetches live data from all platforms with zero API keys.
tech-news-daily
每日科技新闻汇——从全球多个 RSS 源抓取最新科技新闻,翻译(英→中)、去重、排版成每日简报。当用户询问科技新闻、科技新鲜事、每日科技、技术动态、Daily Tech News 或类似表达时触发此技能。
summarize
Summarize URLs or files with the summarize CLI (web, PDFs, images, audio, YouTube).
sonoscli
Control Sonos speakers (discover/status/play/volume/group).