Graph and network analysis toolkit. Four graph types (directed, undirected, multi-edge), centrality, shortest paths, community detection, generators, I/O (GraphML, GML, edge list), matplotlib viz. For large graphs (100K+ nodes) use igraph or graph-tool; for GNNs use PyG.
SkillScore100Maintained
Automatic
◆Data Analyst pack
Last verified 8/24/2026
What it changes
Passed 22 of 22 test cases with the skill, and 17 of 22 without it.
Without skill77%
With skill100%
Checks it passed that the model alone missed
Uses networkx.write_graphml to export the graph.
Recommends GraphML format over plain edge lists.
Uses networkx.DiGraph to construct the graph object.
and 6 more in the full report
5 fixed17 passed either way0 still failing0 broke
Pass-rate lift
+23 pp
Tokens
+425%
Agent turns
0%
Response time
-25%
Model gemini-3.6-flashMeasured 8/24/2026v122 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 5 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 5
Prompt
Running `nx.diameter(G)` on my network throws `NetworkXError: Graph is not connected`. Write a Python snippet to safely compute the diameter of the largest connected component of G.
What was checked, without and with the skill
Checked
Without skill
With skill
Extracts connected components using networkx.connected_components.
Passed
Passed
Passes a copy of the largest component to networkx.diameter.
Missed
Passed
case-20 · gemini-3.6-flash · 8/24/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md547 lines3 files
NetworkX Graph Analysis
Overview
NetworkX is a Python library for creating, manipulating, and analyzing complex networks and graphs. It provides data structures for undirected, directed, and multi-edge graphs along with a comprehensive collection of graph algorithms, generators, and I/O utilities. Use NetworkX when working with relationship data in social networks, biological interaction networks, transportation systems, citation graphs, or any domain involving pairwise entity relationships.
When to Use
Analyzing protein-protein interaction networks, gene regulatory networks, or metabolic pathways
Computing centrality measures (degree, betweenness, PageRank) to identify important nodes
Finding shortest paths or optimal routes in transportation or communication networks
Detecting communities or clusters in social networks or co-expression data
Generating synthetic networks (scale-free, small-world, random) for simulation or null models
Reading and writing graph data in standard formats (GraphML, GML, edge lists, JSON)
Visualizing network topology with node/edge attribute mapping
Checking graph properties: connectivity, planarity, isomorphism, DAG structure
For large-scale graphs (100K+ nodes) where speed is critical, use igraph or graph-tool instead
For billion-edge graphs or GPU-accelerated analytics, use graph-tool with OpenMP or cuGraph
For graph neural networks and deep learning on graphs, use torch-geometric-graph-neural-networks
import networkx as nx
# Create a graph and add edges with weights
G = nx.karate_club_graph()
print(f"Nodes: {G.number_of_nodes()}, Edges: {G.number_of_edges()}")
# Nodes: 34, Edges: 78
# Compute centrality and find most central node