NetworkX Graph Analysis
A skill that guides Claude in building, analyzing, and visualizing networks and graphs with Python's NetworkX.
Data & AnalyticsIntermediate★ 33,030⑂ 3,248AI score 9/10Last updated: Aug 9, 2026
What it does
- Supplies patterns for creating Graph/DiGraph/MultiGraph structures and managing node/edge attributes.
- Covers core algorithms: shortest paths, centrality (degree, betweenness, closeness, PageRank), clustering, community detection, flows, spanning trees.
- Includes synthetic network generators (Erdős–Rényi, Barabási–Albert, Watts–Strogatz, lattices, trees) and I/O for GraphML, GML, JSON, edge lists, Pandas, NumPy/SciPy.
- Handles visualization: layout algorithms, styling by degree/centrality, publication-quality exports, plus Plotly/PyVis interactive options.
- Flags APIs removed in NetworkX 3.x (
nx.info,write_gpickle,random_tree) and explains accelerated backends likenx-cugraphandnx-parallel.
Who it's for
- Researchers and data analysts working with social, citation, biological, or knowledge graphs.
- Engineers modeling transportation, logistics, or dependency graphs.
- NetworkX users hitting errors from outdated tutorial code.
Example uses
- Load an edge-list CSV with Pandas, compute betweenness centrality, and export the top nodes to CSV.
- Generate a seeded Barabási–Albert scale-free network and compare average clustering with path length.
- Detect communities, color nodes by group, and save a spring-layout figure as 300dpi PNG plus vector PDF.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/K-Dense-AI/scientific-agent-skills/HEAD/skills/networkx/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
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.
- Open a terminal and go to your working directory.
- Clone the repo:
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git - Create the skills folder:
mkdir -p ~/.claude/skills - Copy the skill:
cp -r scientific-agent-skills/skills/networkx ~/.claude/skills/ - On Python 3.11+, install dependencies:
pip install networkx[default] matplotlib pandas - Restart Claude Code and try a prompt like "Analyze centrality for the network in this edge list."
View source on GitHub ↗License: MIT