Skip to content

NetworkX Graph Analysis

Build, analyze, generate and draw network/graph data in Python using NetworkX 3.7

Stars
55,780
Licence
MIT
Files
7 files

What it does

Once installed, the agent knows how to work with networks (graphs made of nodes and connections) using the Python NetworkX library. It can build graphs from data, compute things like shortest paths, centrality (which nodes are most important), and communities, generate synthetic test networks, read and write common graph file formats, and draw network diagrams. It includes reference guides and API patterns so it uses current NetworkX functions rather than outdated ones.

Great for

  • Researchers analyzing social, biological, transport or citation networks in Python
  • Data analysts who need centrality, clustering or community detection on relationship data
  • Students learning graph theory who want runnable examples
  • Developers building graph-based features who need correct NetworkX 3.7 API usage

Skip it if

  • Users without Python 3.12+ or who cannot install NetworkX, since the skill's examples depend on that environment
  • Weighted-path work where edge weights are similarities rather than distances, because the wrong weight conversion gives misleading results

Try asking

  • “Find the most influential people in this social network edge list using PageRank and betweenness centrality”
  • “Detect communities in my citation graph and draw them with matplotlib”
  • “Generate a scale-free network with 500 nodes for a simulation and export it as GraphML”
  • “Convert this pandas DataFrame of interactions into a NetworkX graph and compute shortest paths”
Step-by-step guide: how to use NetworkX Graph AnalysisInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 7 original files, the MIT licence and an attribution note.

    networkx.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip networkx.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip networkx.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • State the graph type (Graph, DiGraph, MultiGraph) and input file format up front so the agent picks the right API
  • For weighted shortest paths, say explicitly what the weight means (distance or cost) so the agent converts similarity scores correctly
  • Ask the agent to set seeds on random generators if you need reproducible results

What's inside

  • references/algorithms.md
  • references/generators.md
  • references/graph-basics.md
  • references/io.md
  • references/review.md
  • references/visualization.md
  • SKILL.md

Redistributed unmodified from K-Dense-AI/scientific-agent-skills under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.