13c-metabolic-flux
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…
Supports PyTorch Geometric (PyG) 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
Claude Code
$ npx -y skills add K-Dense-AI/scientific-agent-skills --skill torch-geometric --agent claude-code
Codex
$ npx skills add K-Dense-AI/scientific-agent-skills --skill torch-geometric -a codex -y
Cursor
$ npx skills add K-Dense-AI/scientific-agent-skills --skill torch-geometric -a cursor -y
Gemini CLI
$ npx skills add K-Dense-AI/scientific-agent-skills --skill torch-geometric -a gemini-cli -y
GitHub Copilot
$ npx skills add K-Dense-AI/scientific-agent-skills --skill torch-geometric -a github-copilot -y
OpenCode
$ npx skills add K-Dense-AI/scientific-agent-skills --skill torch-geometric -a opencode -y
Windsurf
$ npx skills add K-Dense-AI/scientific-agent-skills --skill torch-geometric -a windsurf -y
name: torch-geometric description: Supports PyTorch Geometric (PyG) 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. license: MIT license compatibility: Requires Python 3.10+, PyTorch 2.9+, and torch-geometric 2.8.0.post1. Optional pyg-lib, torch-scatter and torch-sparse wheels must match Python, OS, PyTorch and CUDA/CPU. Network access is needed only for installation and dataset/model downloads. metadata: version: "1.4" last-reviewed: "2026-10-01" skill-author: K-Dense Inc.
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.
Reviewed released **torch-geometric 2.8.0.post1** (2026-10-01); CPU examples tested with **Python 3.13 / PyTorch 2.14.1**. Rolling `latest` docs identify 2.9.0; check the installed release before adopting new APIs. PyG 2.8 requires PyTorch 2.9+; its original release table covers 2.9–2.12. Our 2.14.1 core tests do not establish every extension/backend combination.
# Install the PyTorch build for your platform from https://pytorch.org/get-started/locally/ uv pip install torch==2.14.1 uv pip install torch-geometric==2.8.0.post1 python -c "import torch, torch_geometric; print(torch.__version__, torch.version.cuda, torch_geometric.__version__)"
Basic tensor-based layers need no extensions. Neighbor sampling requires `pyg-lib` or `torch-sparse`; spatial k-NN operators require `pyg-lib` in 2.8. `torch-cluster` and `torch-spline-conv` are deprecated and ignored. Inspect the [wheel index](https://data.pyg.org/whl/) for your exact Python/OS/Torch/CUDA tuple. Never install wheels for a different Torch release merely because core imports succeed. The tested macOS ARM CPU extension is below; choose a different matching wheel for other platforms, and verify its operators:
uv pip install --only-binary=:all: "pyg-lib==0.9.0+pt214" \ -f https://data.pyg.org/whl/torch-2.14.0+cpu.html
Conda packages are no longer provided for Torch >2.5. See [installation](https://pytorch-geometric.readthedocs.io/en/latest/install/installation.html) and [2.8 release changes](https://github.com/pyg-team/pytorch_geometric/releases/tag/2.8.0). Optional sampling/GPU/distributed/download examples below are illustrative unless covered by the CPU checks in [review notes](references/review.md).
A graph lives in a `Data` object. The key attributes:
from torch_geometric.data import Data
data = Data(
x=node_features, # [num_nodes, num_node_features]
edge_index=edge_index, # [2, num_edges] — COO format, dtype=torch.long
edge_attr=edge_features, # [num_edges, num_edge_features]
y=labels, # node-level [num_nodes, *] or graph-level [1, *]
pos=positions, # [num_nodes, num_dimensions] (for point clouds/spatial)
)**`edge_index` format is critical**: it's a `[2, num_edges]` tensor where `edge_index[0]` = source nodes, `edge_index[1]` = target nodes. It is NOT a list of tuples. If you have edge pairs as rows, transpose and call `.contiguous()`:
# If edges are [[src1, dst1], [src2, dst2], ...] — transpose first: edge_index = edge_pairs.t().contiguous()
For undirected graphs, include both directions: edge (0,1) needs both `[0,1]` and `[1,0]` in edge_index.
If node features are absent, set `data.num_nodes` explicitly from the node table. Inferring it from `edge_index.max() + 1` misses isolated nodes, which can corrupt batching offsets and outputs. Check `data.validate(raise_on_error=True)` after construction, including an edge-free or isolated-node case.
For heterogeneous graphs, use `HeteroData` — see the Heterogeneous Graphs section below.
PyG bundles many standard datasets that auto-download and preprocess:
from torch_geometric.datasets import Planetoid, TUDataset # Single-graph node classification (Cora, Citeseer, Pubmed) dataset = Planetoid(root='./data/Cora', name='Cora', split='public') data = dataset[0] # single graph with train/val/test masks # Multi-graph classification (ENZYMES, MUTAG, IMDB-BINARY, etc.) dataset = TUDataset(root='./data/TU', name='ENZYMES') # dataset[0], dataset[1], ... are individual graphs
Common datasets by task:
Dataset classes manage provider downloads; they are not API search endpoints. Preserve the dataset version, split and preprocessing. OGB benchmarks use the separate `ogb` package/evaluator; do not replace their official split with a random split. See [review notes](references/review.md) for verified download locations and unexecuted large datasets.
Transforms preprocess or augment graph data, analogous to torchvision transforms:
import torch_geometric.transforms as T from torch_geometric.datasets import ShapeNet # Common transforms T.NormalizeFeatures() # Shift by minimum, then divide row sum (clamped >=1) T.ToUndirected() # Add reverse edges to make graph undirected T.AddSelfLoops() # Add self-loop edges T.KNNGraph(k=6) # Build k-NN graph from positions; requires pyg-lib T.RandomJitter(0.01) # Random noise augmentation on positions T.Compose([...]) # Chain multiple transforms # Apply as pre_
🔔 Claude Scientific Skills is now Scientific Agent Skills. Same skills, broader compatibility — now works with any AI agent that supports the open Agent Skills standard, not just Claude.
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…
Uses the Adaptyv Bio Foundry API and Python SDK to design protein characterization experiments, estimate costs, submit sequences,…
This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting,…
AlphaGenome API key, free for non-commercial use from deepmind.google.com/science/alphagenome. ALPHA_GENOME_API_KEY is accepted…
Plans, executes, and documents validation, verification, and transfer of analytical procedures under the governing framework -…
Handles annotated matrices in single-cell analysis, .h5ad and Zarr files, and integration with the scverse ecosystem. This is the…
Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as…