networkx

Create and analyze NetworkX graphs with algorithms and standard formats.

783|65|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/LeonChaoX/qinyan-academic-skills --skill networkx-leonchaox
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: networkx
Source: https://github.com/LeonChaoX/qinyan-academic-skills/tree/main/skills/11-%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90%E4%B8%8E%E7%BB%9F%E8%AE%A1%E5%BB%BA%E6%A8%A1/networkx
Command: npx skills add https://github.com/LeonChaoX/qinyan-academic-skills --skill networkx-leonchaox

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you model relationships as graphs and then compute insights like centrality, shortest paths, communities, and network structure without hand-coding algorithms.

Core Features & Use Cases

  • Graph creation & manipulation: Construct undirected, directed, and multigraphs with node/edge attributes.
  • Network analysis algorithms: Compute shortest paths, centrality metrics, clustering, connectivity, community detection, flows, and more.
  • Visualization & export: Generate publication-ready network plots and export/import graphs via common formats (GraphML, JSON, edge lists, matrices).
  • Use case: Turn a citation network into a graph, run PageRank and community detection, and export results for figures and downstream analysis.

Quick Start

Ask the AI to analyze the relationships in your dataset by building a NetworkX graph, computing key metrics (e.g., PageRank and communities), and exporting the graph to GraphML for visualization.

Frequently Asked Questions about networkx

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

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

Network analysis for computing centrality and shortest paths involves building a graph object from your dataset and applying built-in algorithms to extract structural metrics without hand-coding the logic.

What is the best way to detect communities within a complex network?

Community detection in a complex network is performed by constructing a graph with node and edge attributes, then running clustering algorithms to identify densely connected subgroups.

Can I import and export graphs using standard formats like GraphML and JSON?

Yes, importing and exporting graphs using standard formats like GraphML, JSON, edge lists, and matrices is fully supported, allowing you to serialize graph outputs for downstream analysis.

How do I build a directed graph with node and edge attributes from my dataset?

Building a directed graph with attributes requires loading your dataset and mapping the relationships to graph nodes and edges, attaching metadata to model the network structure correctly.

Does Python network analysis support generating synthetic graphs for testing?

Yes, generating synthetic graphs is supported, allowing you to create random or structured test networks to validate graph algorithms and workflows before applying them to real datasets.