/gephi-network-analysis:counterfactual <plain-language what-if question>, e.g. "what if I removed the top 3 hubs?"from Gephi AI
Tests a hypothetical graph edit (e.g., remove a node) by duplicating the Gephi workspace, applying the change to the copy, comparing structural profiles, then discarding the copy — safe to run repeatedly.
Ships in Gephi AI. Installing the plugin adds it to Claude Code.
Answer $ARGUMENTS by running it as a real measurement against the graph currently
loaded in Gephi, using gephi_whatif. It duplicates the current workspace, applies
the edit to the copy, compares the structural profile before and after, then deletes
the copy. The real graph is never touched, so this is safe to run repeatedly.
Read ${CLAUDE_PLUGIN_ROOT}/skills/gephi/references/claim-verification.md for
removal tests and their comparison node.
gephi_health_check. Then check which workspace is open (gephi_list_workspaces) and whether a filter is active (filter_active in replies): a filter from an earlier conversation stays on, and exports and checks then see only what it shows.gephi_query_nodes with sort_by set to the metric, columns set to the few columns you need, and limit about 10: nodes are ordered before paging, so the first page is the top of the whole graph. Without columns, every attribute of every node comes back and a long listing can overflow.Load the gephi skill first. Before any Gephi call, load the gephi-network-analysis:gephi skill. Its rules apply to every step below; this command repeats only the ones it is most likely to break.
Session start: gephi_health_check. If it fails, tell the user to start Gephi
and stop. Call gephi_list_workspaces; if filter_active is true, say the test
runs on the visible nodes only.
Get the question. If $ARGUMENTS is empty, ask what edit they want to test
(one sentence is enough: "what if we removed the top hub?", "what if these two
accounts stopped talking?"). Default: remove the single highest-degree node.
Resolve the edit. Turn the plain-language question into gephi_whatif's edit
list ({"op": "remove_node", "id": ...}, remove_nodes, add_edge,
remove_edge). If the person names nodes by label rather than id ("the top
hub", "Alice"), resolve the id first: gephi_query_nodes with column and
value or contains for a name, or with the ranking rule for "top hub"
(gephi_compute_degree first if the degree column is missing). If the name
matches more than one node, ask which one. Default: the match with the highest
degree, named in the report.
Run gephi_whatif with the resolved edits. Only pass include_slow: true
(which also compares average path length and diameter) if the graph is roughly
under 3,000 nodes, the same cost gate as gephi_profile_graph.
Report the difference, not a verdict. gephi_whatif returns measurements, and
the framing matters:
Remind them nothing changed. The scratch copy is already deleted and they are
back on their real graph. If they want to make the edit for real, point them at
the direct tool (gephi_remove_node, gephi_add_edge, and so on), which
gephi_snapshot and gephi_undo protect.
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
11 commands in this plugin
/analyze-networkComprehensive Network AnalysisRun comprehensive structural analysis and report network properties/centralityCentrality Analysis WorkflowRun centrality analysis and identify the most important nodes/community-detectionCommunity Detection WorkflowRun full community detection workflow on the current graph/exploreExplore the graph already open in Gephi (no file path needed): intake, profile, style, layout, overview/export-mapExport MapExport the current map as clean and labeled PNG plus SVG/import-and-exploreImport & ExploreImport a graph file and run an initial exploration with layout and stylingnpx claudepluginhub mattartzanthro/gephi-ai --plugin gephi-network-analysisOther plugins' commands for the same job