Graph explore
Reference for code-review-graph MCP queries. Calling skills run the graph tools inline via ToolSearch in the main conversation — no dedicated agents. Covers graph freshness, embedding setup, semantic search, and targeted queries.From its SKILL.md
npx -y skills add alexiolan/craft-skills --skill graph-exploreAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 17 stars17 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
6.4 KB, as published. Nobody here has run it
Graph Explore
Reference for code-review-graph MCP tool operations. Other skills call graph MCP tools directly in the main conversation — no dedicated agents.
How Other Skills Use This
Calling skills load graph tools via ToolSearch (search for "code-review-graph") and call them directly. The typical pattern:
build_or_update_graph_tool— ensure graph is freshsemantic_search_nodes_tool— search with feature keywords (2-3 variations)query_graph_toolwithfile_summary— for relevant domain directoriesquery_graph_toolwithimports_of/importers_of— for key files
Each calling skill has the tool sequences inline. This skill serves as the detailed reference for available modes and safety rules.
Task types:
explore "<feature keywords>" <repo-root>— Full feature discovery: semantic search, file summaries, dependency mappingimpact "<file1> <file2> ..."— Blast radius analysis for changed filesreview— Post-develop review context (auto-detects changed files from git)
Input
The user input is: $ARGUMENTS
- Task type + arguments: As described above
- Empty: Ask the caller what to explore
Process
Step 1: Load Graph Tools
Load these tools via ToolSearch at the start:
mcp__plugin_code-review-graph_code-review-graph__build_or_update_graph_toolmcp__plugin_code-review-graph_code-review-graph__semantic_search_nodes_toolmcp__plugin_code-review-graph_code-review-graph__query_graph_toolmcp__plugin_code-review-graph_code-review-graph__embed_graph_toolmcp__plugin_code-review-graph_code-review-graph__get_impact_radius_toolmcp__plugin_code-review-graph_code-review-graph__get_review_context_tool
If tools are not available (MCP server not connected), return: "GRAPH_UNAVAILABLE: code-review-graph MCP server not connected."
Step 2: Ensure Graph is Fresh
Run build_or_update_graph_tool (incremental — fast if already up-to-date).
Step 3: Ensure Embeddings Exist
Run a test search with semantic_search_nodes_tool using a common keyword (e.g., "service").
If search_mode in the response is "keyword" (not "semantic"), embeddings are missing. Run embed_graph_tool to compute them. This is a one-time operation (~30s for ~1000 nodes).
If search_mode is "semantic", embeddings are ready.
Step 4: Execute Task
Mode: explore
Goal: Map existing code related to a feature, so the caller can design without reading files.
- Semantic search — Run
semantic_search_nodes_toolwith the feature keywords. Try 2-3 keyword variations if first returns few results (e.g., "referral invite" then "email send notification" then "discount credit"). - Map structure — For each relevant domain directory found, run
query_graph_toolwithfile_summaryto list all files and their contents. - Trace dependencies — For the most relevant files, run
query_graph_toolwithimports_ofandimporters_ofto understand how they connect. - Consolidate — Return a structured summary organized by domain.
Output format:
## Graph Exploration: [keywords]
### Relevant Code Found
- [file path] — [what it contains, key exports]
- ...
### Domain Structure
- domain/X/ — [summary of what's in this domain]
- ...
### Key Dependencies
- [file A] imports [file B] (for [purpose])
- ...
### Suggested Starting Points
- [file] — [why it's relevant to the feature]
Safety rules:
- Do NOT use
get_architecture_overview_tool,list_communities_tool, ordetect_changes_tool— they can return 90-300K+ chars and overflow context. - Limit
file_summaryqueries to specific domain directories, not the entiresrc/. - Cap at 5-6
query_graph_toolcalls to avoid excessive output.
Mode: impact
Goal: Analyze blast radius of changed files for plan review or risk assessment.
- Run
get_impact_radius_toolwith the provided file list. - Identify high-risk files (many dependents, critical paths).
- Return structured summary of what's affected.
Output format:
## Impact Analysis
### Changed Files
- [file] — [direct impact count] dependents
### High-Risk Areas
- [file] is imported by [N] files — changes here affect [list]
### Recommended Review Focus
- [file] — [reason it's risky]
Mode: review
Goal: Generate token-efficient review context for post-develop review.
- Run
build_or_update_graph_toolto capture new files. - Run
get_review_context_tool(auto-detects changed files from git). - Extract the high-risk files and review guidance.
- Return the review context summary (not full source — the LLM agent reads files).
Output format:
## Review Context
### Changed Files
- [file] — [change summary]
### High-Risk Files (review these first)
- [file] — [reason: N importers, critical path, etc.]
### Review Guidance
- [specific things to check based on graph analysis]
Step 5: Return
Return the structured summary to the caller. Be concise — the caller will use this to inform design decisions, not as exhaustive documentation.
Prerequisites
Embeddings require sentence-transformers in the MCP server environment. The code-review-graph plugin's .mcp.json must include it:
{
"mcpServers": {
"code-review-graph": {
"command": "uvx",
"args": ["--with", "sentence-transformers", "code-review-graph", "serve"]
}
}
}
Without this, embed_graph_tool will fail and semantic search falls back to keyword matching. The skill still works — it uses file_summary and query_graph_tool as alternatives — but results are less accurate.
This is a one-time global setup. After adding --with sentence-transformers, restart Claude Code for the MCP server to pick it up.
Notes
- Graph queries are fast (~10-50ms each) — the main cost is token consumption, not time
- Embeddings use
all-MiniLM-L6-v2by default (~80MB model, downloaded once per project) - After embedding, semantic search finds conceptually related code, not just keyword matches
- The agent typically makes 8-12 tool calls and returns a ~500-word summary
- If
embed_graph_toolfails (missing dependency), the agent should log a warning and continue with keyword search — do not block the pipeline