networkx

Create, manipulate, and analyze graphs with NetworkX in Python.

94|11|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/swaruplab/operon --skill networkx-swaruplab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: networkx
Source: https://github.com/swaruplab/operon/tree/main/src-tauri/protocols/networkx
Command: npx skills add https://github.com/swaruplab/operon --skill networkx-swaruplab

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

NetworkX provides a Python toolkit to create, manipulate, and analyze graphs and networks, enabling researchers and developers to model relationships without building graph methods from scratch.

Core Features & Use Cases

  • Graph creation and manipulation (Graph, DiGraph, MultiGraph, MultiDiGraph) and attributes management
  • Graph algorithms (shortest paths, centrality, clustering, connectivity, communities)
  • Graph generation and synthetic networks (random, small-world, scale-free models)
  • Reading and writing graphs across formats (GraphML, GML, edge lists, JSON, CSV) and integration with Pandas/Numpy
  • Visualization and exploration of network structures for insight and communication

Quick Start

Construct a simple graph, perform a shortest-path query, and visualize the result.

Frequently Asked Questions about networkx

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

FAQPage Schema
How do I analyze and visualize a network graph in Python?

To analyze and visualize a network graph in Python, you can use NetworkX to create nodes and edges, calculate centrality or shortest paths, and render the structure for insight. It supports graph creation, algorithms, and visualization.

What types of graph algorithms can I run for social or biological networks?

For social or biological networks, graph algorithms include shortest paths, centrality, clustering, connectivity, and community detection. These algorithms help identify key relationships and structures within the modeled network.

Can I import and export graph data from JSON, CSV, or GraphML formats?

Yes, you can import and export graph data from JSON, CSV, GraphML, GML, and edge list formats. This I/O capability integrates with Pandas and Numpy to facilitate seamless data exchange and analysis.

How do I generate synthetic networks like scale-free or small-world models?

You can generate synthetic networks like scale-free or small-world models using built-in graph generation functions. This allows you to create random structures for testing algorithms and simulating network behaviors.

Does this approach support directed graphs and multigraphs with attributes?

Yes, this approach supports directed graphs, multigraphs, and multidigraphs with full attribute management. You can assign and manipulate attributes on both nodes and edges to model complex relationships.

What is the best way to find the shortest path between nodes in a citation network?

The best way to find the shortest path in a citation network is to model the relationships as a directed graph and apply shortest path algorithms. This identifies the most direct connection sequence between entities.