torch-geometric
PyTorch Geometric (PyG) for graph neural networks — node/link/graph classification, message passing (GCN, GAT, GraphSAGE, GIN), heterogeneous graphs, neighbor sampling, and custom datasets. Use when working with torch_geometric, not for general NetworkX analytics or non-graph PyTorch models.
npx skills add K-Dense-AI/scientific-agent-skills --skill torch-geometric --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# PyTorch Geometric (PyG) PyG is the standard library for Graph Neural Networks built on PyTorch. It provides data structures for graphs, 60+ GNN layer implementations, scalable mini-batch training, and support for heterogeneous graphs. ## Installation Tested against **torch-geometric 2.7.x** (Oct 2025). Requires **Python 3.10+** and **PyTorch 2.6+**. ```bash # 1. Install PyTorch first (match your CUDA/CPU setup — see https://pytorch.org/get-started/locally/) uv pip install torch # 2. Core PyG (no extension wheels required for basic usage) uv pip install torch_geometric ``` Optional accelerated ops (`pyg-lib`, `torch-scatter`, `torch-sparse`, `torch-cluster`) are **not required** for basic PyG usage (since PyG 2.3). Install version-matched wheels from the [PyG wheel index](https://data.pyg.org/whl) after checking your PyTorch and CUDA versions: ```bash python -c "import torch; print(torch.__version__, torch.version.cuda)" # Then install wheels for your torch+CUDA combo, e.g.: uv pip install pyg-lib torch-scatter torch-sparse torch-cluster \ -f https://data.pyg.org/whl/torch-2.8.0+cu128.html ``` Check your version: ```python import torch_geometric print(torch_geometric.__version__)
- Installation
- PyG 2.7 notes
- Core Concepts
- Graph Data: Data and HeteroData
- Datasets
- Transforms
- Building GNN Models
- Quick Start: Using Built-in Layers
- Choosing a Conv Layer
- Lazy Initialization
- High-Level Model APIs
- Custom Layers via MessagePassing
- Task-Specific Patterns
- Node Classification
uv pip install torch uv pip install torch_geometric python -c "import torch; print(torch.__version__, torch.version.cuda)" Then install wheels for your torch+CUDA combo, e.g.: uv pip install pyg-lib torch-scatter torch-sparse torch-cluster \
What does the torch-geometric skill do?
PyTorch Geometric (PyG) for graph neural networks — node/link/graph classification, message passing (GCN, GAT, GraphSAGE, GIN), heterogeneous graphs, neighbor sampling, and custom datasets. Use when working with torch_geometric, not for general NetworkX analytics or non-graph PyTorch models.
How do I install it?
Run `npx skills add K-Dense-AI/scientific-agent-skills --skill torch-geometric --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From K-Dense-AI/scientific-agent-skills, a repository with 32,619 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
