networkx

Analyze and manipulate graphs in Python using NetworkX's Graph, DiGraph and MultiGraph types and algorithms.

33.0k|3.2k|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/K-Dense-AI/scientific-agent-skills --skill networkx-k-dense-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: networkx
Source: https://github.com/K-Dense-AI/scientific-agent-skills/tree/main/scientific-skills/networkx
Command: npx skills add https://github.com/K-Dense-AI/scientific-agent-skills --skill networkx-k-dense-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

NetworkX provides a comprehensive toolkit for creating, analyzing, and visualizing complex networks and graphs in Python. It helps you model relationships, compute graph algorithms, detect communities, and visualize network topologies across domains like social, biological, transportation, and knowledge graphs.

Core Features & Use Cases

  • Graph creation, manipulation, and attribute handling for Graph, DiGraph, and MultiGraph types
  • Graph algorithms including shortest paths, centrality measures, clustering, and community detection
  • Graph I/O and visualization: read/write formats, plotting, and publication-ready figures
  • Synthetic network generation for testing and simulation across varied domains
  • Use cases across social networks, biology, citations, knowledge graphs, and transportation networks

Quick Start

Install NetworkX and run a quick example to create a graph, add nodes and edges, and compute a couple of basic metrics.

Frequently Asked Questions about networkx

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compute shortest paths and centrality measures for a network graph in Python?

Python network graph analysis uses NetworkX to create Graph, DiGraph, and MultiGraph objects, add nodes and edges, then apply built-in algorithms to compute shortest paths, centrality, and clustering metrics across social, biological, and transportation networks.

What is the best way to analyze social networks and detect communities in Python?

Analyzing social networks and detecting communities in Python involves creating graph structures to model relationships, then applying clustering and community detection algorithms to identify structural groups and compute network metrics.

Can I visualize and export graph topologies for publication-ready figures?

You can visualize and export graph topologies for publication-ready figures using built-in graph I/O capabilities to read/write standard formats, plot network structures, and generate visual outputs from your Graph or DiGraph objects.

Does this Python graph analysis approach support directed graphs and multigraphs?

This Python graph analysis approach supports directed graphs and multigraphs, providing distinct Graph, DiGraph, and MultiGraph types to model varied network structures, handle attributes, and compute algorithms across different domain requirements.

How do I generate synthetic networks for testing and simulation in Python?

Generate synthetic networks for testing and simulation in Python by using specialized graph generation functions to create randomized or structured topologies, enabling algorithm testing and scenario simulation across varied domains like biology and transportation.