networkx — Claude Code skill: graphs and installation
Build, analyse and visualise Python graphs with NetworkX. Use it for routes, centrality, communities and graph file formats.
npx skills add K-Dense-AI/scientific-agent-skills --skill networkx -a claude-codeWhat networkx does
This skill guides an agent through building directed and undirected graphs, including graph types with parallel edges. It covers shortest paths, centrality, connectivity, clustering, PageRank, maximum flow and community detection. Structural metrics and isomorphism checks are included too.
It can generate random, scale-free and small-world networks, along with classic and grid graphs. The skill covers edge lists, GraphML, GML and JSON, plus graph data exchanged through pandas. Drawing examples use Matplotlib.
It requires Python >=3.12 and NetworkX 3.7; Python 3.14.1 is excluded. Check the interpreter version before installing. Numerical, tabular and drawing examples use NumPy, SciPy, pandas and Matplotlib, while separate integrations require their own packages.
What it helps with
- build a graph from nodes and attributed edges
- find a weighted shortest path
- calculate PageRank and centrality scores
- detect communities and connected components
- read GraphML or an edge list
Example prompts for the agent
- “Build a graph from this edge table and find the shortest path between these nodes.”
- “Calculate PageRank and centrality for this graph.”
- “Generate a small-world network and draw it with Matplotlib.”
How to install networkx
1Skills CLI (Vercel)
npx skills add K-Dense-AI/scientific-agent-skills --skill networkx -a claude-code2Manually: put the files in place
~/.claude/skills/networkx/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/networkx/
1Skills CLI (Vercel)
npx skills add K-Dense-AI/scientific-agent-skills --skill networkx -a codex2Manually: put the files in place
.agents/skills/networkx/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add K-Dense-AI/scientific-agent-skills --skill networkx -a cursor2Manually: put the files in place
.cursor/skills/networkx/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install K-Dense-AI/scientific-agent-skills networkx2Manually: put the files in place
.github/skills/networkx/SKILL.md1Skills CLI (Vercel)
npx skills add K-Dense-AI/scientific-agent-skills --skill networkx -a gemini-cli2Platform CLI
gemini skills install https://github.com/K-Dense-AI/scientific-agent-skills --path skills/networkxManually: put the files in place
.devin/skills/networkx/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add K-Dense-AI/scientific-agent-skills --skill networkx -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set120
The whole set →Similar
Questions about networkx
How do I install networkx in Claude Code?
Run npx skills add K-Dense-AI/scientific-agent-skills --skill networkx -a claude-code, then run npx skills add K-Dense-AI/scientific-agent-skills --skill networkx -a claude-code again. The skill file is at ~/.claude/skills/networkx/SKILL.md.
What does networkx do?
The skill guides an agent through creating, analysing and visualising graphs with NetworkX. It covers routes, centrality, communities, network generation and graph data formats.
Which Python and NetworkX versions does networkx require?
It requires Python >=3.12 and NetworkX 3.7. Python 3.14.1 is excluded.