Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

torch-geometric

Skill by davila7

PyTorch Geometric (PyG) is a skill for building and training Graph Neural Networks. It covers node and graph classification, link prediction, and geometric deep learning on graph data.

  • Score 94
  • 35k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install torch-geometric

Built from the published package, never by AI.

git clone --depth 1 https://github.com/davila7/claude-code-templates /tmp/claude-code-templates && mkdir -p ~/.claude/skills && cp -r /tmp/claude-code-templates/cli-tool/components/skills/scientific/torch_geometric ~/.claude/skills/torch-geometric

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install torch-geometric in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill gives an AI assistant guidance on PyTorch Geometric, a library built on PyTorch for developing and training Graph Neural Networks. It explains how graphs are stored with the Data class, using COO edge_index tensors for connectivity and attributes such as x, edge_attr, y and pos. It also describes mini-batch processing, which combines several graphs into one large disconnected graph with a batch vector.

The skill includes code patterns for GCN, GAT and GraphSAGE models, custom MessagePassing layers, and loading built-in datasets such as Cora, TUDataset, QM9 and Reddit. It also shows how to create custom datasets and run node and graph classification training. It is aimed at developers and researchers working on citation networks, molecular property prediction, 3D geometric data, heterogeneous graphs and large-scale graph learning.

Written from the project's SKILL.md and checked against it.

What it can do

  • Graph data structuresRepresents graphs with the Data class using node features, edge_index and optional attributes.
  • Built-in datasetsLoads benchmark datasets such as Planetoid (Cora), TUDataset, QM9 and Reddit.
  • Pre-built GNN layersUses GCNConv, GATConv and SAGEConv to build graph neural network models.
  • Custom message passingWrites custom layers by inheriting from MessagePassing with message and aggregation methods.
  • Custom datasetsCreates in-memory or large-scale datasets by inheriting from InMemoryDataset or Dataset.
  • Mini-batch loadingBatches multiple graphs with DataLoader into one disconnected graph for training.
  • Node classification trainingProvides a training and evaluation loop for node classification on a single graph.
  • Graph classificationApplies global pooling such as global_mean_pool to classify whole graphs.

What you need

  • PyTorch
  • uv (for the pip install command shown in the source)

Try asking

  • Train a GCN on the Cora citation dataset with PyG
  • Write a GAT model for node classification using PyTorch Geometric
  • Create a custom MessagePassing layer for my graph data

Good to know

  • Some optional packages need a wheel URL that matches your torch and CUDA versions.
  • The source covers core workflows and points to a separate datasets reference file for the full list.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: cli-tool/components/skills/scientific/torch_geometric/SKILL.md, cli-tool/components/skills/scientific/torch_geometric/scripts/benchmark_model.py, cli-tool/components/skills/scientific/torch_geometric/scripts/create_gnn_template.py, cli-tool/components/skills/scientific/torch_geometric/scripts/visualize_graph.py. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md20 KB
  • references/datasets_reference.md16 KB
  • references/layers_reference.md17 KB
  • references/transforms_reference.md18 KB
  • scripts/benchmark_model.py10 KB
Show all 7 files
  • scripts/create_gnn_template.py15 KB
  • scripts/visualize_graph.py10 KB

Alternatives to torch-geometric

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

torch-geometric: common questions

What is PyTorch Geometric used for?

The source says PyG is used for deep learning on graphs and irregular structures, including node and graph classification and link prediction.

Which GNN models does the skill show?

It shows GCN, GAT and GraphSAGE models built with GCNConv, GATConv and SAGEConv. The source also says PyG provides 40+ convolutional layers.

Does PyG work with molecular data?

The source lists molecular property prediction as a use case and shows the QM9 molecular dataset as a built-in option.

How do I install torch-geometric?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is torch-geometric free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is torch-geometric safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to torch-geometric?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

torch-geometric Install

Add to stack

Loading.