CodeGraph transforms codebases into a semantically searchable knowledge graph, enabling AI agents to reason about code. It benefits developers and operations teams by improving code search and analysis. The tool connects to semantic search engines and AI coding agents, enhancing codebase understanding and agentic code analysis.
git clone https://github.com/Jakedismo/codegraph-rust.gitCodeGraph transforms codebases into a semantically searchable knowledge graph, enabling AI agents to reason about code. It benefits developers and operations teams by improving code search and analysis. The tool connects to semantic search engines and AI coding agents, enhancing codebase understanding and agentic code analysis.
[{"step":"Install CodeGraph-Rust and its dependencies (requires Rust 1.70+, Graphviz for visualization). Run `cargo install codegraph-rust` and verify with `codegraph --version`.","tip":"Ensure your project compiles without warnings before analysis to avoid skewing the results."},{"step":"Navigate to your project root and run `codegraph generate --output graph.dot --format dot`. For Rust-specific analysis, use `codegraph rust --output rust_graph.json`.","tip":"Use `--include-tests` to include test files in the analysis if needed."},{"step":"Load the generated graph into your preferred tool: import the DOT file into Graphviz for visualization, or use the JSON output with an AI agent (e.g., LangGraph) for automated code reasoning.","tip":"For AI agents, pre-process the JSON to focus on specific areas (e.g., 'only include functions with complexity > 8')."},{"step":"Query the knowledge graph using semantic search. Example: `codegraph query \"Find all async functions that modify database state\"` or integrate with your IDE's AI assistant.","tip":"Use natural language queries for non-technical team members reviewing the codebase."},{"step":"Iterate by refining queries or regenerating the graph after code changes. Set up a CI pipeline to auto-generate graphs on pull requests.","tip":"Store generated graphs in version control (e.g., `/docs/codegraph`) for historical comparison."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/Jakedismo/codegraph-rustCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use CodeGraph-Rust to analyze the [PROJECT_NAME] codebase. Generate a semantically searchable knowledge graph of the code structure, focusing on [SPECIFIC_AREA: e.g., error handling, API endpoints, or data models]. Identify all functions, classes, and their relationships, then highlight [KEY_METRIC: e.g., cyclomatic complexity, dependency chains, or unused code]. Provide a summary of findings in a structured format suitable for integration with [TOOL_NAME: e.g., GitHub Copilot, LangGraph, or a custom AI agent].
After analyzing the `inventory-service` Rust project (version 2.4.1), CodeGraph-Rust generated a knowledge graph with 1,247 nodes and 2,893 edges. The graph revealed a critical dependency chain in the `order_processing` module where the `validate_order` function (cyclomatic complexity: 12) calls `check_inventory` (complexity: 8), which in turn depends on `fetch_product_details` (complexity: 5). This chain was flagged as a potential bottleneck during high-load scenarios. Additionally, the tool identified 47 unused imports across 12 files and 3 circular dependencies in the `data_models` crate. The semantic search index now enables precise queries like 'Find all functions that modify OrderStatus without proper validation'—returning 8 matches in under 200ms. The output includes a DOT file for visualization in Graphviz and a JSON report for the AI agent, formatted as:
```json
{
"summary": {
"total_nodes": 1247,
"total_edges": 2893,
"high_complexity_functions": [
{"name": "validate_order", "complexity": 12, "file": "src/order_processing.rs"}
],
"unused_imports": 47,
"circular_dependencies": 3
},
"recommendations": [
"Refactor validate_order to reduce complexity below 10",
"Audit circular dependencies in data_models crate",
"Remove unused imports in src/lib.rs"
]
}
```Cloud ETL platform for non-technical data integration
IronCalc is a spreadsheet engine and ecosystem
Get more done every day with Microsoft Teams – powered by AI
Customer feedback management made simple
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan