networkx
Comprehensive toolkit for creating, analyzing, and visualizing complex networks and graphs in Python. Use when working with network/graph data structures, analyzing relationships between entities, computing graph algorithms (shortest paths, centrality, clustering), detecting communities, generating synthetic networks, or visualizing network topologies. Applicable to social networks, biological networks, transportation systems, citation networks, and any domain involving pairwise relationships.
下方技能配置(提示词、变量、安装步骤)保留英文原文。.aiskill 文件直接面向 AI 智能体,统一使用英文以确保跨平台行为一致。
概述
Comprehensive toolkit for creating, analyzing, and visualizing complex networks and graphs in Python. Use when working with network/graph data structures, analyzing relationships between entities, computing graph algorithms (shortest paths, centrality, clustering), detecting communities, generating synthetic networks, or visualizing network topologies. Applicable to social networks, biological networks, transportation systems, citation networks, and any domain involving pairwise relationships.
Source: https://github.com/DenDen047/claude-scientific-skills · 3-CLAUSE BSD LICENSE · © 2025 K-Dense Inc.
系统提示词
定义智能体角色、规则与输出格式的指令块。
# NetworkX
## Overview
NetworkX is a Python package for creating, manipulating, and analyzing complex networks and graphs. Use this skill when working with network or graph data structures, including social networks, biological networks, transportation systems, citation networks, knowledge graphs, or any system involving relationships between entities.
## When to Use This Skill
Invoke this skill when tasks involve:
- **Creating graphs**: Building network structures from data, adding nodes and edges with attributes
- **Graph analysis**: Computing centrality measures, finding shortest paths, detecting communities, measuring clustering
- **Graph algorithms**: Running standard algorithms like Dijkstra's, PageRank, minimum spanning trees, maximum flow
- **Network generation**: Creating synthetic networks (random, scale-free, small-world models) for testing or simulation
- **Graph I/O**: Reading from or writing to various formats (edge lists, GraphML, JSON, CSV, adjacency matrices)
- **Visualization**: Drawing and customizing network visualizations with matplotlib or interactive libraries
- **Network comparison**: Checking isomorphism, computing graph metrics, analyzing structural properties
## Core Capabilities
### 1. Graph Creation and Manipulation
NetworkX supports four main graph types:
- **Graph**: Undirected graphs with single edges
- **DiGraph**: Directed graphs with one-way connections
- **MultiGraph**: Undirected graphs allowing multiple edges between nodes
- **MultiDiGraph**: Directed graphs with multiple edges
Create graphs by:
```python
import networkx as nx
# Create empty graph
G = nx.Graph()
# Add nodes (can be any hashable type)
G.add_node(1)
G.add_nodes_from([2, 3, 4])
G.add_node("protein_A", type='enzyme', weight=1.5)
# Add edges
G.add_edge(1, 2)
G.add_edges_from([(1, 3), (2, 4)])
G.add_edge(1, 4, weight=0.8, relation='interacts')
```
**Reference**: See `references/graph-basics.md` for comprehensive guidance on creating, modifying, examining, and managing graph structures, including working with attributes and subgraphs.
### 2. Graph Algorithms
NetworkX provides extensive algorithms for network analysis:
**Shortest Paths**:
```python
# Find shortest path
path = nx.shortest_path(G, source=1, target=5)
length = nx.shortest_path_length(G, source=1, target=5, weight='weight')
```
**Centrality Measures**:
```python
# Degree centrality
degree_cent = nx.degree_centrality(G)
# Betweenness centrality
betweenness = nx.betweenness_centrality(G)
# PageRank
pagerank = nx.pagerank(G)
```
**Community Detection**:
```python
from networkx.algorithms import community
# Detect communities
communities = community.greedy_modularity_communities(G)
```
**Connectivity**:
```python
# Check connectivity
is_connected = nx.is_connected(G)
# Find connected components
components = list(nx.connected_components(G))
```
**Reference**: See `references/algorithms.md` for detailed documentation on all available algorithms including shortest paths, centrality measures, clustering, community detection, flows, matching, tree algorithms, and graph traversal.
### 3. Graph Generators
Create synthetic networks for testing, simulation, or modeling:
**Classic Graphs**:
```python
# Complete graph
G = nx.complete_graph(n=10)
# Cycle graph
G = nx.cycle_graph(n=20)
# Known graphs
G = nx.karate_club_graph()
G = nx.petersen_graph()
```
**Random Networks**:
```python
# Erdős-Rényi random graph
G = nx.erdos_renyi_graph(n=100, p=0.1, seed=42)
# Barabási-Albert scale-free network
G = nx.barabasi_albert_graph(n=100, m=3, seed=42)
# Watts-Strogatz small-world network
G = nx.watts_strogatz_graph(n=100, k=6, p=0.1, seed=42)
```
**Structured Networks**:
```python
# Grid graph
G = nx.grid_2d_graph(m=5, n=7)
# Random tree
G = nx.random_tree(n=100, seed=42)
```
**Reference**: See `references/generators.md` for comprehensive coverage of all graph generators including classic, random, lattice, bipartite, and specialized network models with detailed parameters and use cases.
### 4. Reading and Writing Graphs
NetworkX supports numerous file formats and data sources:
**File Formats**:
```python
# Edge list
G = nx.read_edgelist('graph.edgelist')
nx.write_edgelist(G, 'graph.edgelist')
# GraphML (preserves attributes)
G = nx.read_graphml('graph.graphml')
nx.write_graphml(G, 'graph.graphml')
# GML
G = nx.read_gml('graph.gml')
nx.write_gml(G, 'graph.gml')
# JSON
data = nx.node_link_data(G)
G = nx.node_link_graph(data)
```
**Pandas Integration**:
```python
import pandas as pd
# From DataFrame
df = pd.DataFrame({'source': [1, 2, 3], 'target': [2, 3, 4], 'weight': [0.5, 1.0, 0.75]})
G = nx.from_pandas_edgelist(df, 'source', 'target', edge_attr='weight')
# To DataFrame
df = nx.to_pandas_edgelist(G)
```
**Matrix Formats**:
```python
import numpy as np
# Adjacency matrix
A = nx.to_numpy_array(G)
G = nx.from_numpy_array(A)
# Sparse matrix
A = nx.to_scipy_sparse_array(G)
G = nx.from_scipy_sparse_array(A)
```
**Reference**: See `references/io.md` for complete documentation on all I/O formats including CSV, SQL databases, Cytoscape, DOT, and guidance on format selection for different use cases.
### 5. Visualization
Create clear and informative network visualizations:
**Basic Visualization**:
```python
import matplotlib.pyplot as plt
# Simple draw
nx.draw(G, with_labels=True)
plt.show()
# With layout
pos = nx.spring_layout(G, seed=42)
nx.draw(G, pos=pos, with_labels=True, node_color='lightblue', node_size=500)
plt.show()
```
**Customization**:
```python
# Color by degree
node_colors = [G.degree(n) for n in G.nodes()]
nx.draw(G, node_color=node_colors, cmap=plt.cm.viridis)
# Size by centrality
centrality = nx.betweenness_centrality(G)
node_sizes = [3000 * centrality[n] for n in G.nodes()]
nx.draw(G, node_size=node_sizes)
# Edge weights
edge_widths = [3 * G[u][v].get('weight', 1) for u, v in G.edges()]
nx.draw(G, width=edge_widths)
```
**Layout Algorithms**:
```python
# Spring layout (force-directed)
pos = nx.spring_layout(G, seed=42)
# Circular layout
pos = nx.circular_layout(G)
# Kamada-Kawai layout
pos = nx.kamada_kawai_layout(G)
# Spectral layout
pos = nx.spectral_layout(G)
```
**Publication Quality**:
```python
plt.figure(figsize=(12, 8))
pos = nx.spring_layout(G, seed=42)
nx.draw(G, pos=pos, node_color='lightblue', node_size=500,
edge_color='gray', with_labels=True, font_size=10)
plt.title('Network Visualization', fontsize=16)
plt.axis('off')
plt.tight_layout()
plt.savefig('network.png', dpi=300, bbox_inches='tight')
plt.savefig('network.pdf', bbox_inches='tight') # Vector format
```
**Reference**: See `references/visualization.md` for extensive documentation on visualization techniques including layout algorithms, customization options, interactive visualizations with Plotly and PyVis, 3D networks, and publication-quality figure creation.
## Working with NetworkX
### Installation
Ensure NetworkX is installed:
```python
# Check if installed
import networkx as nx
print(nx.__version__)
# Install if needed (via bash)
# uv pip install networkx
# uv pip install networkx[default] # With optional dependencies
```
### Common Workflow Pattern
Most NetworkX tasks follow this pattern:
1. **Create or Load Graph**:
```python
# From scratch
G = nx.Graph()
G.add_edges_from([(1, 2), (2, 3), (3, 4)])
# Or load from file/data
G = nx.read_edgelist('data.txt')
```
2. **Examine Structure**:
```python
print(f"Nodes: {G.number_of_nodes()}")
print(f"Edges: {G.number_of_edges()}")
print(f"Density: {nx.density(G)}")
print(f"Connected: {nx.is_connected(G)}")
```
3. **Analyze**:
```python
# Compute metrics
degree_cent = nx.degree_centrality(G)
avg_clustering = nx.average_clustering(G)
# Find paths
path = nx.shortest_path(G, source=1, target=4)
# Detect communities
communities = community.greedy_modularity_communities(G)
```
4. **Visualize**:
```python
pos = nx.spring_layout(G, seed=42)
nx.draw(G, pos=pos, with_labels=True)
plt.show()
```
5. **Export Results**:
```python
# Save graph
nx.write_graphml(G, 'analyzed_network.graphml')
# Save metrics
df = pd.DataFrame({
'node': list(degree_cent.keys()),
'centrality': list(degree_cent.values())
})
df.to_csv('centrality_results.csv', index=False)
```
### Important Considerations
**Floating Point Precision**: When graphs contain floating-point numbers, all results are inherently approximate due to precision limitations. This can affect algorithm outcomes, particularly in minimum/maximum computations.
**Memory and Performance**: Each time a script runs, graph data must be loaded into memory. For large networks:
- Use appropriate data structures (sparse matrices for large sparse graphs)
- Consider loading only necessary subgraphs
- Use efficient file formats (pickle for Python objects, compressed formats)
- Leverage approximate algorithms for very large networks (e.g., `k` parameter in centrality calculations)
**Node and Edge Types**:
- Nodes can be any hashable Python object (numbers, strings, tuples, custom objects)
- Use meaningful identifiers for clarity
- When removing nodes, all incident edges are automatically removed
**Random Seeds**: Always set random seeds for reproducibility in random graph generation and force-directed layouts:
```python
G = nx.erdos_renyi_graph(n=100, p=0.1, seed=42)
pos = nx.spring_layout(G, seed=42)
```
## Quick Reference
### Basic Operations
```python
# Create
G = nx.Graph()
G.add_edge(1, 2)
# Query
G.number_of_nodes()
G.number_of_edges()
G.degree(1)
list(G.neighbors(1))
# Check
G.has_node(1)
G.has_edge(1, 2)
nx.is_connected(G)
# Modify
G.remove_node(1)
G.remove_edge(1, 2)
G.clear()
```
### Essential Algorithms
```python
# Paths
nx.shortest_path(G, source, target)
nx.all_pairs_shortest_path(G)
# Centrality
nx.degree_centrality(G)
nx.betweenness_centrality(G)
nx.closeness_centrality(G)
nx.pagerank(G)
# Clustering
nx.clustering(G)
nx.average_clustering(G)
# Components
nx.connected_components(G)
nx.strongly_connected_components(G) # Directed
# Community
community.greedy_modularity_communities(G)
```
### File I/O Quick Reference
```python
# Read
nx.read_edgelist('file.txt')
nx.read_graphml('file.graphml')
nx.read_gml('file.gml')
# Write
nx.write_edgelist(G, 'file.txt')
nx.write_graphml(G, 'file.graphml')
nx.write_gml(G, 'file.gml')
# Pandas
nx.from_pandas_edgelist(df, 'source', 'target')
nx.to_pandas_edgelist(G)
```
## Resources
This skill includes comprehensive reference documentation:
### references/graph-basics.md
Detailed guide on graph types, creating and modifying graphs, adding nodes and edges, managing attributes, examining structure, and working with subgraphs.
### references/algorithms.md
Complete coverage of NetworkX algorithms including shortest paths, centrality measures, connectivity, clustering, community detection, flow algorithms, tree algorithms, matching, coloring, isomorphism, and graph traversal.
### references/generators.md
Comprehensive documentation on graph generators including classic graphs, random models (Erdős-Rényi, Barabási-Albert, Watts-Strogatz), lattices, trees, social network models, and specialized generators.
### references/io.md
Complete guide to reading and writing graphs in various formats: edge lists, adjacency lists, GraphML, GML, JSON, CSV, Pandas DataFrames, NumPy arrays, SciPy sparse matrices, database integration, and format selection guidelines.
### references/visualization.md
Extensive documentation on visualization techniques including layout algorithms, customizing node and edge appearance, labels, interactive visualizations with Plotly and PyVis, 3D networks, bipartite layouts, and creating publication-quality figures.
## Additional Resources
- **Official Documentation**: https://networkx.org/documentation/latest/
- **Tutorial**: https://networkx.org/documentation/latest/tutorial.html
- **Gallery**: https://networkx.org/documentation/latest/auto_examples/index.html
- **GitHub**: https://github.com/networkx/networkx 用户提示词模板
填充变量后发送,即可运行该技能: {{variables}}
变量
| 名称 | 必填 | 说明 | 示例 |
|---|
完整技能配置
标准 .aiskill 文件,提供 JSON 与 YAML 两种格式。
{
"format": "aiskill/v1",
"skill": {
"name": "networkx",
"slug": "networkx",
"version": "1.0.0",
"description": "Comprehensive toolkit for creating, analyzing, and visualizing complex networks and graphs in Python. Use when working with network/graph data structures, analyzing relationships between entities, computing graph algorithms (shortest paths, centrality, clustering), detecting communities, generating synthetic networks, or visualizing network topologies. Applicable to social networks, biological networks, transportation systems, citation networks, and any domain involving pairwise relationships.",
"category": "Research",
"tags": [
"research-science",
"python"
],
"platforms": [
"chatgpt",
"claude-code",
"cursor"
],
"tested_environment": "Agent Skills convention (SKILL.md) — works with Claude Code, Cursor, ChatGPT/Codex and compatible agents",
"license": "3-CLAUSE BSD LICENSE"
},
"prompts": {
"system": "# NetworkX\r\n\r\n## Overview\r\n\r\nNetworkX is a Python package for creating, manipulating, and analyzing complex networks and graphs. Use this skill when working with network or graph data structures, including social networks, biological networks, transportation systems, citation networks, knowledge graphs, or any system involving relationships between entities.\r\n\r\n## When to Use This Skill\r\n\r\nInvoke this skill when tasks involve:\r\n\r\n- **Creating graphs**: Building network structures from data, adding nodes and edges with attributes\r\n- **Graph analysis**: Computing centrality measures, finding shortest paths, detecting communities, measuring clustering\r\n- **Graph algorithms**: Running standard algorithms like Dijkstra's, PageRank, minimum spanning trees, maximum flow\r\n- **Network generation**: Creating synthetic networks (random, scale-free, small-world models) for testing or simulation\r\n- **Graph I/O**: Reading from or writing to various formats (edge lists, GraphML, JSON, CSV, adjacency matrices)\r\n- **Visualization**: Drawing and customizing network visualizations with matplotlib or interactive libraries\r\n- **Network comparison**: Checking isomorphism, computing graph metrics, analyzing structural properties\r\n\r\n## Core Capabilities\r\n\r\n### 1. Graph Creation and Manipulation\r\n\r\nNetworkX supports four main graph types:\r\n- **Graph**: Undirected graphs with single edges\r\n- **DiGraph**: Directed graphs with one-way connections\r\n- **MultiGraph**: Undirected graphs allowing multiple edges between nodes\r\n- **MultiDiGraph**: Directed graphs with multiple edges\r\n\r\nCreate graphs by:\r\n```python\r\nimport networkx as nx\r\n\r\n# Create empty graph\r\nG = nx.Graph()\r\n\r\n# Add nodes (can be any hashable type)\r\nG.add_node(1)\r\nG.add_nodes_from([2, 3, 4])\r\nG.add_node(\"protein_A\", type='enzyme', weight=1.5)\r\n\r\n# Add edges\r\nG.add_edge(1, 2)\r\nG.add_edges_from([(1, 3), (2, 4)])\r\nG.add_edge(1, 4, weight=0.8, relation='interacts')\r\n```\r\n\r\n**Reference**: See `references/graph-basics.md` for comprehensive guidance on creating, modifying, examining, and managing graph structures, including working with attributes and subgraphs.\r\n\r\n### 2. Graph Algorithms\r\n\r\nNetworkX provides extensive algorithms for network analysis:\r\n\r\n**Shortest Paths**:\r\n```python\r\n# Find shortest path\r\npath = nx.shortest_path(G, source=1, target=5)\r\nlength = nx.shortest_path_length(G, source=1, target=5, weight='weight')\r\n```\r\n\r\n**Centrality Measures**:\r\n```python\r\n# Degree centrality\r\ndegree_cent = nx.degree_centrality(G)\r\n\r\n# Betweenness centrality\r\nbetweenness = nx.betweenness_centrality(G)\r\n\r\n# PageRank\r\npagerank = nx.pagerank(G)\r\n```\r\n\r\n**Community Detection**:\r\n```python\r\nfrom networkx.algorithms import community\r\n\r\n# Detect communities\r\ncommunities = community.greedy_modularity_communities(G)\r\n```\r\n\r\n**Connectivity**:\r\n```python\r\n# Check connectivity\r\nis_connected = nx.is_connected(G)\r\n\r\n# Find connected components\r\ncomponents = list(nx.connected_components(G))\r\n```\r\n\r\n**Reference**: See `references/algorithms.md` for detailed documentation on all available algorithms including shortest paths, centrality measures, clustering, community detection, flows, matching, tree algorithms, and graph traversal.\r\n\r\n### 3. Graph Generators\r\n\r\nCreate synthetic networks for testing, simulation, or modeling:\r\n\r\n**Classic Graphs**:\r\n```python\r\n# Complete graph\r\nG = nx.complete_graph(n=10)\r\n\r\n# Cycle graph\r\nG = nx.cycle_graph(n=20)\r\n\r\n# Known graphs\r\nG = nx.karate_club_graph()\r\nG = nx.petersen_graph()\r\n```\r\n\r\n**Random Networks**:\r\n```python\r\n# Erdős-Rényi random graph\r\nG = nx.erdos_renyi_graph(n=100, p=0.1, seed=42)\r\n\r\n# Barabási-Albert scale-free network\r\nG = nx.barabasi_albert_graph(n=100, m=3, seed=42)\r\n\r\n# Watts-Strogatz small-world network\r\nG = nx.watts_strogatz_graph(n=100, k=6, p=0.1, seed=42)\r\n```\r\n\r\n**Structured Networks**:\r\n```python\r\n# Grid graph\r\nG = nx.grid_2d_graph(m=5, n=7)\r\n\r\n# Random tree\r\nG = nx.random_tree(n=100, seed=42)\r\n```\r\n\r\n**Reference**: See `references/generators.md` for comprehensive coverage of all graph generators including classic, random, lattice, bipartite, and specialized network models with detailed parameters and use cases.\r\n\r\n### 4. Reading and Writing Graphs\r\n\r\nNetworkX supports numerous file formats and data sources:\r\n\r\n**File Formats**:\r\n```python\r\n# Edge list\r\nG = nx.read_edgelist('graph.edgelist')\r\nnx.write_edgelist(G, 'graph.edgelist')\r\n\r\n# GraphML (preserves attributes)\r\nG = nx.read_graphml('graph.graphml')\r\nnx.write_graphml(G, 'graph.graphml')\r\n\r\n# GML\r\nG = nx.read_gml('graph.gml')\r\nnx.write_gml(G, 'graph.gml')\r\n\r\n# JSON\r\ndata = nx.node_link_data(G)\r\nG = nx.node_link_graph(data)\r\n```\r\n\r\n**Pandas Integration**:\r\n```python\r\nimport pandas as pd\r\n\r\n# From DataFrame\r\ndf = pd.DataFrame({'source': [1, 2, 3], 'target': [2, 3, 4], 'weight': [0.5, 1.0, 0.75]})\r\nG = nx.from_pandas_edgelist(df, 'source', 'target', edge_attr='weight')\r\n\r\n# To DataFrame\r\ndf = nx.to_pandas_edgelist(G)\r\n```\r\n\r\n**Matrix Formats**:\r\n```python\r\nimport numpy as np\r\n\r\n# Adjacency matrix\r\nA = nx.to_numpy_array(G)\r\nG = nx.from_numpy_array(A)\r\n\r\n# Sparse matrix\r\nA = nx.to_scipy_sparse_array(G)\r\nG = nx.from_scipy_sparse_array(A)\r\n```\r\n\r\n**Reference**: See `references/io.md` for complete documentation on all I/O formats including CSV, SQL databases, Cytoscape, DOT, and guidance on format selection for different use cases.\r\n\r\n### 5. Visualization\r\n\r\nCreate clear and informative network visualizations:\r\n\r\n**Basic Visualization**:\r\n```python\r\nimport matplotlib.pyplot as plt\r\n\r\n# Simple draw\r\nnx.draw(G, with_labels=True)\r\nplt.show()\r\n\r\n# With layout\r\npos = nx.spring_layout(G, seed=42)\r\nnx.draw(G, pos=pos, with_labels=True, node_color='lightblue', node_size=500)\r\nplt.show()\r\n```\r\n\r\n**Customization**:\r\n```python\r\n# Color by degree\r\nnode_colors = [G.degree(n) for n in G.nodes()]\r\nnx.draw(G, node_color=node_colors, cmap=plt.cm.viridis)\r\n\r\n# Size by centrality\r\ncentrality = nx.betweenness_centrality(G)\r\nnode_sizes = [3000 * centrality[n] for n in G.nodes()]\r\nnx.draw(G, node_size=node_sizes)\r\n\r\n# Edge weights\r\nedge_widths = [3 * G[u][v].get('weight', 1) for u, v in G.edges()]\r\nnx.draw(G, width=edge_widths)\r\n```\r\n\r\n**Layout Algorithms**:\r\n```python\r\n# Spring layout (force-directed)\r\npos = nx.spring_layout(G, seed=42)\r\n\r\n# Circular layout\r\npos = nx.circular_layout(G)\r\n\r\n# Kamada-Kawai layout\r\npos = nx.kamada_kawai_layout(G)\r\n\r\n# Spectral layout\r\npos = nx.spectral_layout(G)\r\n```\r\n\r\n**Publication Quality**:\r\n```python\r\nplt.figure(figsize=(12, 8))\r\npos = nx.spring_layout(G, seed=42)\r\nnx.draw(G, pos=pos, node_color='lightblue', node_size=500,\r\n edge_color='gray', with_labels=True, font_size=10)\r\nplt.title('Network Visualization', fontsize=16)\r\nplt.axis('off')\r\nplt.tight_layout()\r\nplt.savefig('network.png', dpi=300, bbox_inches='tight')\r\nplt.savefig('network.pdf', bbox_inches='tight') # Vector format\r\n```\r\n\r\n**Reference**: See `references/visualization.md` for extensive documentation on visualization techniques including layout algorithms, customization options, interactive visualizations with Plotly and PyVis, 3D networks, and publication-quality figure creation.\r\n\r\n## Working with NetworkX\r\n\r\n### Installation\r\n\r\nEnsure NetworkX is installed:\r\n```python\r\n# Check if installed\r\nimport networkx as nx\r\nprint(nx.__version__)\r\n\r\n# Install if needed (via bash)\r\n# uv pip install networkx\r\n# uv pip install networkx[default] # With optional dependencies\r\n```\r\n\r\n### Common Workflow Pattern\r\n\r\nMost NetworkX tasks follow this pattern:\r\n\r\n1. **Create or Load Graph**:\r\n ```python\r\n # From scratch\r\n G = nx.Graph()\r\n G.add_edges_from([(1, 2), (2, 3), (3, 4)])\r\n\r\n # Or load from file/data\r\n G = nx.read_edgelist('data.txt')\r\n ```\r\n\r\n2. **Examine Structure**:\r\n ```python\r\n print(f\"Nodes: {G.number_of_nodes()}\")\r\n print(f\"Edges: {G.number_of_edges()}\")\r\n print(f\"Density: {nx.density(G)}\")\r\n print(f\"Connected: {nx.is_connected(G)}\")\r\n ```\r\n\r\n3. **Analyze**:\r\n ```python\r\n # Compute metrics\r\n degree_cent = nx.degree_centrality(G)\r\n avg_clustering = nx.average_clustering(G)\r\n\r\n # Find paths\r\n path = nx.shortest_path(G, source=1, target=4)\r\n\r\n # Detect communities\r\n communities = community.greedy_modularity_communities(G)\r\n ```\r\n\r\n4. **Visualize**:\r\n ```python\r\n pos = nx.spring_layout(G, seed=42)\r\n nx.draw(G, pos=pos, with_labels=True)\r\n plt.show()\r\n ```\r\n\r\n5. **Export Results**:\r\n ```python\r\n # Save graph\r\n nx.write_graphml(G, 'analyzed_network.graphml')\r\n\r\n # Save metrics\r\n df = pd.DataFrame({\r\n 'node': list(degree_cent.keys()),\r\n 'centrality': list(degree_cent.values())\r\n })\r\n df.to_csv('centrality_results.csv', index=False)\r\n ```\r\n\r\n### Important Considerations\r\n\r\n**Floating Point Precision**: When graphs contain floating-point numbers, all results are inherently approximate due to precision limitations. This can affect algorithm outcomes, particularly in minimum/maximum computations.\r\n\r\n**Memory and Performance**: Each time a script runs, graph data must be loaded into memory. For large networks:\r\n- Use appropriate data structures (sparse matrices for large sparse graphs)\r\n- Consider loading only necessary subgraphs\r\n- Use efficient file formats (pickle for Python objects, compressed formats)\r\n- Leverage approximate algorithms for very large networks (e.g., `k` parameter in centrality calculations)\r\n\r\n**Node and Edge Types**:\r\n- Nodes can be any hashable Python object (numbers, strings, tuples, custom objects)\r\n- Use meaningful identifiers for clarity\r\n- When removing nodes, all incident edges are automatically removed\r\n\r\n**Random Seeds**: Always set random seeds for reproducibility in random graph generation and force-directed layouts:\r\n```python\r\nG = nx.erdos_renyi_graph(n=100, p=0.1, seed=42)\r\npos = nx.spring_layout(G, seed=42)\r\n```\r\n\r\n## Quick Reference\r\n\r\n### Basic Operations\r\n```python\r\n# Create\r\nG = nx.Graph()\r\nG.add_edge(1, 2)\r\n\r\n# Query\r\nG.number_of_nodes()\r\nG.number_of_edges()\r\nG.degree(1)\r\nlist(G.neighbors(1))\r\n\r\n# Check\r\nG.has_node(1)\r\nG.has_edge(1, 2)\r\nnx.is_connected(G)\r\n\r\n# Modify\r\nG.remove_node(1)\r\nG.remove_edge(1, 2)\r\nG.clear()\r\n```\r\n\r\n### Essential Algorithms\r\n```python\r\n# Paths\r\nnx.shortest_path(G, source, target)\r\nnx.all_pairs_shortest_path(G)\r\n\r\n# Centrality\r\nnx.degree_centrality(G)\r\nnx.betweenness_centrality(G)\r\nnx.closeness_centrality(G)\r\nnx.pagerank(G)\r\n\r\n# Clustering\r\nnx.clustering(G)\r\nnx.average_clustering(G)\r\n\r\n# Components\r\nnx.connected_components(G)\r\nnx.strongly_connected_components(G) # Directed\r\n\r\n# Community\r\ncommunity.greedy_modularity_communities(G)\r\n```\r\n\r\n### File I/O Quick Reference\r\n```python\r\n# Read\r\nnx.read_edgelist('file.txt')\r\nnx.read_graphml('file.graphml')\r\nnx.read_gml('file.gml')\r\n\r\n# Write\r\nnx.write_edgelist(G, 'file.txt')\r\nnx.write_graphml(G, 'file.graphml')\r\nnx.write_gml(G, 'file.gml')\r\n\r\n# Pandas\r\nnx.from_pandas_edgelist(df, 'source', 'target')\r\nnx.to_pandas_edgelist(G)\r\n```\r\n\r\n## Resources\r\n\r\nThis skill includes comprehensive reference documentation:\r\n\r\n### references/graph-basics.md\r\nDetailed guide on graph types, creating and modifying graphs, adding nodes and edges, managing attributes, examining structure, and working with subgraphs.\r\n\r\n### references/algorithms.md\r\nComplete coverage of NetworkX algorithms including shortest paths, centrality measures, connectivity, clustering, community detection, flow algorithms, tree algorithms, matching, coloring, isomorphism, and graph traversal.\r\n\r\n### references/generators.md\r\nComprehensive documentation on graph generators including classic graphs, random models (Erdős-Rényi, Barabási-Albert, Watts-Strogatz), lattices, trees, social network models, and specialized generators.\r\n\r\n### references/io.md\r\nComplete guide to reading and writing graphs in various formats: edge lists, adjacency lists, GraphML, GML, JSON, CSV, Pandas DataFrames, NumPy arrays, SciPy sparse matrices, database integration, and format selection guidelines.\r\n\r\n### references/visualization.md\r\nExtensive documentation on visualization techniques including layout algorithms, customizing node and edge appearance, labels, interactive visualizations with Plotly and PyVis, 3D networks, bipartite layouts, and creating publication-quality figures.\r\n\r\n## Additional Resources\r\n\r\n- **Official Documentation**: https://networkx.org/documentation/latest/\r\n- **Tutorial**: https://networkx.org/documentation/latest/tutorial.html\r\n- **Gallery**: https://networkx.org/documentation/latest/auto_examples/index.html\r\n- **GitHub**: https://github.com/networkx/networkx",
"user_template": ""
},
"variables": [],
"install": {
"steps": [
{
"title": "Download & unzip",
"detail": "Download the .zip package from SkillVault and unzip it. The networkx/ folder contains SKILL.md plus any companion scripts, references and assets."
},
{
"title": "Copy into your agent skills directory",
"detail": "Move the folder into your agent's skills directory — e.g. ~/.claude/skills/ (Claude Code), .codex/skills/, .cursor/skills/ or your project's .claude/skills/ folder — then restart or reload the session."
},
{
"title": "Use it",
"detail": "Describe the task in natural language; the agent loads the skill automatically when the request matches the skill description."
}
]
},
"usage": {
"steps": []
},
"metadata": {
"author": "SkillVault",
"source": "https://skillvault.top/skills/networkx",
"exported_at": "2026-11-03T07:42:29.843Z"
}
} format: aiskill/v1
skill:
name: networkx
slug: networkx
version: 1.0.0
description: >-
Comprehensive toolkit for creating, analyzing, and visualizing complex networks and graphs in
Python. Use when working with network/graph data structures, analyzing relationships between
entities, computing graph algorithms (shortest paths, centrality, clustering), detecting
communities, generating synthetic networks, or visualizing network topologies. Applicable to
social networks, biological networks, transportation systems, citation networks, and any domain
involving pairwise relationships.
category: Research
tags:
- research-science
- python
platforms:
- chatgpt
- claude-code
- cursor
tested_environment: >-
Agent Skills convention (SKILL.md) — works with Claude Code, Cursor, ChatGPT/Codex and
compatible agents
license: 3-CLAUSE BSD LICENSE
prompts:
system: "# NetworkX\r\n\r\n## Overview\r\n\r\nNetworkX is a Python package for creating, manipulating, and analyzing complex networks and graphs. Use this skill when working with network or graph data structures, including social networks, biological networks, transportation systems, citation networks, knowledge graphs, or any system involving relationships between entities.\r\n\r\n## When to Use This Skill\r\n\r\nInvoke this skill when tasks involve:\r\n\r\n- **Creating graphs**: Building network structures from data, adding nodes and edges with attributes\r\n- **Graph analysis**: Computing centrality measures, finding shortest paths, detecting communities, measuring clustering\r\n- **Graph algorithms**: Running standard algorithms like Dijkstra's, PageRank, minimum spanning trees, maximum flow\r\n- **Network generation**: Creating synthetic networks (random, scale-free, small-world models) for testing or simulation\r\n- **Graph I/O**: Reading from or writing to various formats (edge lists, GraphML, JSON, CSV, adjacency matrices)\r\n- **Visualization**: Drawing and customizing network visualizations with matplotlib or interactive libraries\r\n- **Network comparison**: Checking isomorphism, computing graph metrics, analyzing structural properties\r\n\r\n## Core Capabilities\r\n\r\n### 1. Graph Creation and Manipulation\r\n\r\nNetworkX supports four main graph types:\r\n- **Graph**: Undirected graphs with single edges\r\n- **DiGraph**: Directed graphs with one-way connections\r\n- **MultiGraph**: Undirected graphs allowing multiple edges between nodes\r\n- **MultiDiGraph**: Directed graphs with multiple edges\r\n\r\nCreate graphs by:\r\n```python\r\nimport networkx as nx\r\n\r\n# Create empty graph\r\nG = nx.Graph()\r\n\r\n# Add nodes (can be any hashable type)\r\nG.add_node(1)\r\nG.add_nodes_from([2, 3, 4])\r\nG.add_node(\"protein_A\", type='enzyme', weight=1.5)\r\n\r\n# Add edges\r\nG.add_edge(1, 2)\r\nG.add_edges_from([(1, 3), (2, 4)])\r\nG.add_edge(1, 4, weight=0.8, relation='interacts')\r\n```\r\n\r\n**Reference**: See `references/graph-basics.md` for comprehensive guidance on creating, modifying, examining, and managing graph structures, including working with attributes and subgraphs.\r\n\r\n### 2. Graph Algorithms\r\n\r\nNetworkX provides extensive algorithms for network analysis:\r\n\r\n**Shortest Paths**:\r\n```python\r\n# Find shortest path\r\npath = nx.shortest_path(G, source=1, target=5)\r\nlength = nx.shortest_path_length(G, source=1, target=5, weight='weight')\r\n```\r\n\r\n**Centrality Measures**:\r\n```python\r\n# Degree centrality\r\ndegree_cent = nx.degree_centrality(G)\r\n\r\n# Betweenness centrality\r\nbetweenness = nx.betweenness_centrality(G)\r\n\r\n# PageRank\r\npagerank = nx.pagerank(G)\r\n```\r\n\r\n**Community Detection**:\r\n```python\r\nfrom networkx.algorithms import community\r\n\r\n# Detect communities\r\ncommunities = community.greedy_modularity_communities(G)\r\n```\r\n\r\n**Connectivity**:\r\n```python\r\n# Check connectivity\r\nis_connected = nx.is_connected(G)\r\n\r\n# Find connected components\r\ncomponents = list(nx.connected_components(G))\r\n```\r\n\r\n**Reference**: See `references/algorithms.md` for detailed documentation on all available algorithms including shortest paths, centrality measures, clustering, community detection, flows, matching, tree algorithms, and graph traversal.\r\n\r\n### 3. Graph Generators\r\n\r\nCreate synthetic networks for testing, simulation, or modeling:\r\n\r\n**Classic Graphs**:\r\n```python\r\n# Complete graph\r\nG = nx.complete_graph(n=10)\r\n\r\n# Cycle graph\r\nG = nx.cycle_graph(n=20)\r\n\r\n# Known graphs\r\nG = nx.karate_club_graph()\r\nG = nx.petersen_graph()\r\n```\r\n\r\n**Random Networks**:\r\n```python\r\n# Erdős-Rényi random graph\r\nG = nx.erdos_renyi_graph(n=100, p=0.1, seed=42)\r\n\r\n# Barabási-Albert scale-free network\r\nG = nx.barabasi_albert_graph(n=100, m=3, seed=42)\r\n\r\n# Watts-Strogatz small-world network\r\nG = nx.watts_strogatz_graph(n=100, k=6, p=0.1, seed=42)\r\n```\r\n\r\n**Structured Networks**:\r\n```python\r\n# Grid graph\r\nG = nx.grid_2d_graph(m=5, n=7)\r\n\r\n# Random tree\r\nG = nx.random_tree(n=100, seed=42)\r\n```\r\n\r\n**Reference**: See `references/generators.md` for comprehensive coverage of all graph generators including classic, random, lattice, bipartite, and specialized network models with detailed parameters and use cases.\r\n\r\n### 4. Reading and Writing Graphs\r\n\r\nNetworkX supports numerous file formats and data sources:\r\n\r\n**File Formats**:\r\n```python\r\n# Edge list\r\nG = nx.read_edgelist('graph.edgelist')\r\nnx.write_edgelist(G, 'graph.edgelist')\r\n\r\n# GraphML (preserves attributes)\r\nG = nx.read_graphml('graph.graphml')\r\nnx.write_graphml(G, 'graph.graphml')\r\n\r\n# GML\r\nG = nx.read_gml('graph.gml')\r\nnx.write_gml(G, 'graph.gml')\r\n\r\n# JSON\r\ndata = nx.node_link_data(G)\r\nG = nx.node_link_graph(data)\r\n```\r\n\r\n**Pandas Integration**:\r\n```python\r\nimport pandas as pd\r\n\r\n# From DataFrame\r\ndf = pd.DataFrame({'source': [1, 2, 3], 'target': [2, 3, 4], 'weight': [0.5, 1.0, 0.75]})\r\nG = nx.from_pandas_edgelist(df, 'source', 'target', edge_attr='weight')\r\n\r\n# To DataFrame\r\ndf = nx.to_pandas_edgelist(G)\r\n```\r\n\r\n**Matrix Formats**:\r\n```python\r\nimport numpy as np\r\n\r\n# Adjacency matrix\r\nA = nx.to_numpy_array(G)\r\nG = nx.from_numpy_array(A)\r\n\r\n# Sparse matrix\r\nA = nx.to_scipy_sparse_array(G)\r\nG = nx.from_scipy_sparse_array(A)\r\n```\r\n\r\n**Reference**: See `references/io.md` for complete documentation on all I/O formats including CSV, SQL databases, Cytoscape, DOT, and guidance on format selection for different use cases.\r\n\r\n### 5. Visualization\r\n\r\nCreate clear and informative network visualizations:\r\n\r\n**Basic Visualization**:\r\n```python\r\nimport matplotlib.pyplot as plt\r\n\r\n# Simple draw\r\nnx.draw(G, with_labels=True)\r\nplt.show()\r\n\r\n# With layout\r\npos = nx.spring_layout(G, seed=42)\r\nnx.draw(G, pos=pos, with_labels=True, node_color='lightblue', node_size=500)\r\nplt.show()\r\n```\r\n\r\n**Customization**:\r\n```python\r\n# Color by degree\r\nnode_colors = [G.degree(n) for n in G.nodes()]\r\nnx.draw(G, node_color=node_colors, cmap=plt.cm.viridis)\r\n\r\n# Size by centrality\r\ncentrality = nx.betweenness_centrality(G)\r\nnode_sizes = [3000 * centrality[n] for n in G.nodes()]\r\nnx.draw(G, node_size=node_sizes)\r\n\r\n# Edge weights\r\nedge_widths = [3 * G[u][v].get('weight', 1) for u, v in G.edges()]\r\nnx.draw(G, width=edge_widths)\r\n```\r\n\r\n**Layout Algorithms**:\r\n```python\r\n# Spring layout (force-directed)\r\npos = nx.spring_layout(G, seed=42)\r\n\r\n# Circular layout\r\npos = nx.circular_layout(G)\r\n\r\n# Kamada-Kawai layout\r\npos = nx.kamada_kawai_layout(G)\r\n\r\n# Spectral layout\r\npos = nx.spectral_layout(G)\r\n```\r\n\r\n**Publication Quality**:\r\n```python\r\nplt.figure(figsize=(12, 8))\r\npos = nx.spring_layout(G, seed=42)\r\nnx.draw(G, pos=pos, node_color='lightblue', node_size=500,\r\n edge_color='gray', with_labels=True, font_size=10)\r\nplt.title('Network Visualization', fontsize=16)\r\nplt.axis('off')\r\nplt.tight_layout()\r\nplt.savefig('network.png', dpi=300, bbox_inches='tight')\r\nplt.savefig('network.pdf', bbox_inches='tight') # Vector format\r\n```\r\n\r\n**Reference**: See `references/visualization.md` for extensive documentation on visualization techniques including layout algorithms, customization options, interactive visualizations with Plotly and PyVis, 3D networks, and publication-quality figure creation.\r\n\r\n## Working with NetworkX\r\n\r\n### Installation\r\n\r\nEnsure NetworkX is installed:\r\n```python\r\n# Check if installed\r\nimport networkx as nx\r\nprint(nx.__version__)\r\n\r\n# Install if needed (via bash)\r\n# uv pip install networkx\r\n# uv pip install networkx[default] # With optional dependencies\r\n```\r\n\r\n### Common Workflow Pattern\r\n\r\nMost NetworkX tasks follow this pattern:\r\n\r\n1. **Create or Load Graph**:\r\n ```python\r\n # From scratch\r\n G = nx.Graph()\r\n G.add_edges_from([(1, 2), (2, 3), (3, 4)])\r\n\r\n # Or load from file/data\r\n G = nx.read_edgelist('data.txt')\r\n ```\r\n\r\n2. **Examine Structure**:\r\n ```python\r\n print(f\"Nodes: {G.number_of_nodes()}\")\r\n print(f\"Edges: {G.number_of_edges()}\")\r\n print(f\"Density: {nx.density(G)}\")\r\n print(f\"Connected: {nx.is_connected(G)}\")\r\n ```\r\n\r\n3. **Analyze**:\r\n ```python\r\n # Compute metrics\r\n degree_cent = nx.degree_centrality(G)\r\n avg_clustering = nx.average_clustering(G)\r\n\r\n # Find paths\r\n path = nx.shortest_path(G, source=1, target=4)\r\n\r\n # Detect communities\r\n communities = community.greedy_modularity_communities(G)\r\n ```\r\n\r\n4. **Visualize**:\r\n ```python\r\n pos = nx.spring_layout(G, seed=42)\r\n nx.draw(G, pos=pos, with_labels=True)\r\n plt.show()\r\n ```\r\n\r\n5. **Export Results**:\r\n ```python\r\n # Save graph\r\n nx.write_graphml(G, 'analyzed_network.graphml')\r\n\r\n # Save metrics\r\n df = pd.DataFrame({\r\n 'node': list(degree_cent.keys()),\r\n 'centrality': list(degree_cent.values())\r\n })\r\n df.to_csv('centrality_results.csv', index=False)\r\n ```\r\n\r\n### Important Considerations\r\n\r\n**Floating Point Precision**: When graphs contain floating-point numbers, all results are inherently approximate due to precision limitations. This can affect algorithm outcomes, particularly in minimum/maximum computations.\r\n\r\n**Memory and Performance**: Each time a script runs, graph data must be loaded into memory. For large networks:\r\n- Use appropriate data structures (sparse matrices for large sparse graphs)\r\n- Consider loading only necessary subgraphs\r\n- Use efficient file formats (pickle for Python objects, compressed formats)\r\n- Leverage approximate algorithms for very large networks (e.g., `k` parameter in centrality calculations)\r\n\r\n**Node and Edge Types**:\r\n- Nodes can be any hashable Python object (numbers, strings, tuples, custom objects)\r\n- Use meaningful identifiers for clarity\r\n- When removing nodes, all incident edges are automatically removed\r\n\r\n**Random Seeds**: Always set random seeds for reproducibility in random graph generation and force-directed layouts:\r\n```python\r\nG = nx.erdos_renyi_graph(n=100, p=0.1, seed=42)\r\npos = nx.spring_layout(G, seed=42)\r\n```\r\n\r\n## Quick Reference\r\n\r\n### Basic Operations\r\n```python\r\n# Create\r\nG = nx.Graph()\r\nG.add_edge(1, 2)\r\n\r\n# Query\r\nG.number_of_nodes()\r\nG.number_of_edges()\r\nG.degree(1)\r\nlist(G.neighbors(1))\r\n\r\n# Check\r\nG.has_node(1)\r\nG.has_edge(1, 2)\r\nnx.is_connected(G)\r\n\r\n# Modify\r\nG.remove_node(1)\r\nG.remove_edge(1, 2)\r\nG.clear()\r\n```\r\n\r\n### Essential Algorithms\r\n```python\r\n# Paths\r\nnx.shortest_path(G, source, target)\r\nnx.all_pairs_shortest_path(G)\r\n\r\n# Centrality\r\nnx.degree_centrality(G)\r\nnx.betweenness_centrality(G)\r\nnx.closeness_centrality(G)\r\nnx.pagerank(G)\r\n\r\n# Clustering\r\nnx.clustering(G)\r\nnx.average_clustering(G)\r\n\r\n# Components\r\nnx.connected_components(G)\r\nnx.strongly_connected_components(G) # Directed\r\n\r\n# Community\r\ncommunity.greedy_modularity_communities(G)\r\n```\r\n\r\n### File I/O Quick Reference\r\n```python\r\n# Read\r\nnx.read_edgelist('file.txt')\r\nnx.read_graphml('file.graphml')\r\nnx.read_gml('file.gml')\r\n\r\n# Write\r\nnx.write_edgelist(G, 'file.txt')\r\nnx.write_graphml(G, 'file.graphml')\r\nnx.write_gml(G, 'file.gml')\r\n\r\n# Pandas\r\nnx.from_pandas_edgelist(df, 'source', 'target')\r\nnx.to_pandas_edgelist(G)\r\n```\r\n\r\n## Resources\r\n\r\nThis skill includes comprehensive reference documentation:\r\n\r\n### references/graph-basics.md\r\nDetailed guide on graph types, creating and modifying graphs, adding nodes and edges, managing attributes, examining structure, and working with subgraphs.\r\n\r\n### references/algorithms.md\r\nComplete coverage of NetworkX algorithms including shortest paths, centrality measures, connectivity, clustering, community detection, flow algorithms, tree algorithms, matching, coloring, isomorphism, and graph traversal.\r\n\r\n### references/generators.md\r\nComprehensive documentation on graph generators including classic graphs, random models (Erdős-Rényi, Barabási-Albert, Watts-Strogatz), lattices, trees, social network models, and specialized generators.\r\n\r\n### references/io.md\r\nComplete guide to reading and writing graphs in various formats: edge lists, adjacency lists, GraphML, GML, JSON, CSV, Pandas DataFrames, NumPy arrays, SciPy sparse matrices, database integration, and format selection guidelines.\r\n\r\n### references/visualization.md\r\nExtensive documentation on visualization techniques including layout algorithms, customizing node and edge appearance, labels, interactive visualizations with Plotly and PyVis, 3D networks, bipartite layouts, and creating publication-quality figures.\r\n\r\n## Additional Resources\r\n\r\n- **Official Documentation**: https://networkx.org/documentation/latest/\r\n- **Tutorial**: https://networkx.org/documentation/latest/tutorial.html\r\n- **Gallery**: https://networkx.org/documentation/latest/auto_examples/index.html\r\n- **GitHub**: https://github.com/networkx/networkx"
user_template: ""
variables: []
install:
steps:
- title: Download & unzip
detail: >-
Download the .zip package from SkillVault and unzip it. The networkx/ folder contains
SKILL.md plus any companion scripts, references and assets.
- title: Copy into your agent skills directory
detail: >-
Move the folder into your agent's skills directory — e.g. ~/.claude/skills/ (Claude Code),
.codex/skills/, .cursor/skills/ or your project's .claude/skills/ folder — then restart or
reload the session.
- title: Use it
detail: >-
Describe the task in natural language; the agent loads the skill automatically when the
request matches the skill description.
usage:
steps: []
metadata:
author: SkillVault
source: https://skillvault.top/skills/networkx
exported_at: "2026-11-03T07:42:29.843Z"
安装指南
- 1
Download & unzip
Download the .zip package from SkillVault and unzip it. The networkx/ folder contains SKILL.md plus any companion scripts, references and assets.
- 2
Copy into your agent skills directory
Move the folder into your agent's skills directory — e.g. ~/.claude/skills/ (Claude Code), .codex/skills/, .cursor/skills/ or your project's .claude/skills/ folder — then restart or reload the session.
- 3
Use it
Describe the task in natural language; the agent loads the skill automatically when the request matches the skill description.
使用方法
平台兼容性
相关技能
astropy
Comprehensive Python library for astronomy and astrophysics. This skill should be used when working with astronomical data including celestial coordinates, physical units, FITS files, cosmological calculations, time systems, tables, world coordinate systems (WCS), and astronomical data analysis. Use when tasks involve coordinate transformations, unit conversions, FITS file manipulation, cosmological distance calculations, time scale conversions, or astronomical data processing.
fluidsim
Framework for computational fluid dynamics simulations using Python. Use when running fluid dynamics simulations including Navier-Stokes equations (2D/3D), shallow water equations, stratified flows, or when analyzing turbulence, vortex dynamics, or geophysical flows. Provides pseudospectral methods with FFT, HPC support, and comprehensive output analysis.
geomaster
Comprehensive geospatial science skill covering remote sensing, GIS, spatial analysis, machine learning for earth observation, and 30+ scientific domains. Supports satellite imagery processing (Sentinel, Landsat, MODIS, SAR, hyperspectral), vector and raster data operations, spatial statistics, point cloud processing, network analysis, cloud-native workflows (STAC, COG, Planetary Computer), and 8 programming languages (Python, R, Julia, JavaScript, C++, Java, Go, Rust) with 500+ code examples. Use for remote sensing workflows, GIS analysis, spatial ML, Earth observation data processing, terrain analysis, hydrological modeling, marine spatial analysis, atmospheric science, and any geospatial computation task.