NetworkX Graph Analysis
A reference skill that guides Claude to create, analyze, and visualize networks with Python's NetworkX.
Data & AnalyticsIntermediate★ 33,030⑂ 3,248AI score 8/10Last updated: Aug 9, 2026
What it does
A reference skill that helps Claude use the NetworkX library correctly and idiomatically.
- Graph construction: Graph, DiGraph, MultiGraph, MultiDiGraph plus node/edge attribute handling
- Algorithms: shortest paths (Dijkstra), centrality (degree/betweenness/closeness/PageRank), clustering, community detection, max flow, minimum spanning trees
- Generators: Erdős–Rényi random, Barabási–Albert scale-free, Watts–Strogatz small-world, lattices, random trees
- I/O: edgelist, GraphML, GML, JSON node-link, Pandas DataFrames, NumPy/SciPy matrices
- Visualization: spring/circular/Kamada-Kawai/spectral layouts, centrality-driven node sizes and colors, publication-quality export
It targets NetworkX 3.x, explicitly avoiding removed APIs (nx.info, nx.write_gpickle, nx.random_tree) and covering accelerated backends such as nx-cugraph (GPU) and nx-parallel (multicore). Five bundled reference files cover basics, algorithms, generators, I/O, and visualization in depth.
Who it's for
- Researchers and analysts working on social, citation, or knowledge graphs
- Bioinformaticians handling protein-interaction or metabolic networks
- Engineers analyzing routing and bottlenecks in transportation or logistics networks
- Anyone needing clean network figures for papers and reports
Example uses
- Community detection: "Load this follow-relationship CSV into a DiGraph, export the top 20 nodes by PageRank and greedy-modularity communities to CSV."
- Path analysis: "Build a weighted graph from station adjacency data, find the fastest route from A to B and list transfer hubs with high betweenness."
- Visualization: "Read this protein-interaction GraphML, draw a spring layout with node size by degree and color by community, and save 300dpi PNG plus PDF."
· · · Install guide · · ·
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills/networkx folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/networkx/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git && mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/networkx ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Make sure Git, Python 3.11+, and Claude Code are installed.
- Clone the repository:
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git - Create the skills folder if needed:
mkdir -p ~/.claude/skills - Copy the skill in:
cp -r scientific-agent-skills/skills/networkx ~/.claude/skills/ - Install dependencies:
pip install "networkx[default]" matplotlib pandas - Restart Claude Code and try: "Use NetworkX to compute centrality for this edgelist file."
- If the skill doesn't trigger automatically, say "use the networkx skill" in your prompt.
- For very large graphs, optionally install the
nx-parallelornx-cugraphbackend.
View source on GitHub ↗License: MIT