[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MB9C3S9SMWMEKDV5EA5KRB":3,"skill-same:01M6MB9C3S9SMWMEKDV5EA5KRB":106},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":45,"linkOnly":46,"markdownContent":47,"markdownBody":48,"frontMatter":49,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":59,"repositoryHtmlUrl":60,"repositoryHomepageUrl":61,"ownerHtmlUrl":62,"ownerBlogUrl":63,"ownerDescription":64,"updatedAt":65,"install":66,"resources":79},"01M6MB9C3S9SMWMEKDV5EA5KRB","torch-geometric",null,"PyTorch Geometric (PyG) for graph neural networks — node\u002Flink\u002Fgraph 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.","hashgraph-online\u002Fawesome-codex-plugins","hashgraph-online","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160371962?v=4","01M6CNB6NRJVNNGN14TR01Q6D3","HOL (Hashgraph Online)","01M6JT1HSKKG9V68KQAQGBA7XP",1575,"MIT","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Ftorch-geometric\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"torch geometric","sampling","when","graph neural networks","for","org","data-science","cluster","gin","lib","deep","message","analytics","node","networks","data","gnn","graph","pytorch","neural networks","deep learning","2026-11-10 10:12:30",false,"---\nname: torch-geometric\ndescription: PyTorch Geometric (PyG) for graph neural networks — node\u002Flink\u002Fgraph 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.\nlicense: MIT\ncompatibility: Requires Python 3.10+, PyTorch 2.6+, and torch-geometric 2.7.x. Optional extension wheels (pyg-lib, torch-scatter, torch-sparse, torch-cluster) must match your PyTorch\u002FCUDA build from https:\u002F\u002Fdata.pyg.org\u002Fwhl.\nmetadata:\n  version: '1.2'\n  category: data-science-and-ml\n  maintainer: Kalaris Labs\n  tags: graph neural networks, PyTorch Geometric, GNN, deep learning\n---\n\n# PyTorch Geometric (PyG)\n\nPyG 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.\n\n## Installation\n\nTested against **torch-geometric 2.7.x** (Oct 2025). Requires **Python 3.10+** and **PyTorch 2.6+**.\n\n```bash\n# 1. Install PyTorch first (match your CUDA\u002FCPU setup — see https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F)\nuv pip install torch\n\n# 2. Core PyG (no extension wheels required for basic usage)\nuv pip install torch_geometric\n```\n\nOptional 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:\u002F\u002Fdata.pyg.org\u002Fwhl) after checking your PyTorch and CUDA versions:\n\n```bash\npython -c \"import torch; print(torch.__version__, torch.version.cuda)\"\n# Then install wheels for your torch+CUDA combo, e.g.:\nuv pip install pyg-lib torch-scatter torch-sparse torch-cluster \\\n  -f https:\u002F\u002Fdata.pyg.org\u002Fwhl\u002Ftorch-2.8.0+cu128.html\n```\n\nCheck your version:\n\n```python\nimport torch_geometric\nprint(torch_geometric.__version__)\n```\n\n**Conda:** the `pyg` conda channel is no longer maintained for PyTorch >2.5 — use `uv pip install` and the wheel index above instead.\n\n### PyG 2.7 notes\n\nPyG 2.7 dropped Python 3.9 and PyTorch ≤2.5. See the [2.7.0 release notes](https:\u002F\u002Fgithub.com\u002Fpyg-team\u002Fpytorch_geometric\u002Freleases\u002Ftag\u002F2.7.0) for PyTorch 2.6–2.8 compatibility tables. `torch_geometric.distributed` is deprecated — use standard `torch.distributed` DDP (see `references\u002Fscaling.md`).\n\n## Core Concepts\n\n### Graph Data: `Data` and `HeteroData`\n\nA graph lives in a `Data` object. The key attributes:\n\n```python\nfrom torch_geometric.data import Data\n\ndata = Data(\n    x=node_features,          # [num_nodes, num_node_features]\n    edge_index=edge_index,     # [2, num_edges] — COO format, dtype=torch.long\n    edge_attr=edge_features,   # [num_edges, num_edge_features]\n    y=labels,                  # node-level [num_nodes, *] or graph-level [1, *]\n    pos=positions,             # [num_nodes, num_dimensions] (for point clouds\u002Fspatial)\n)\n```\n\n**`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()`:\n\n```python\n# If edges are [[src1, dst1], [src2, dst2], ...] — transpose first:\nedge_index = edge_pairs.t().contiguous()\n```\n\nFor undirected graphs, include both directions: edge (0,1) needs both `[0,1]` and `[1,0]` in edge_index.\n\nFor heterogeneous graphs, use `HeteroData` — see the Heterogeneous Graphs section below.\n\n### Datasets\n\nPyG bundles many standard datasets that auto-download and preprocess:\n\n```python\nfrom torch_geometric.datasets import Planetoid, TUDataset\n\n# Single-graph node classification (Cora, Citeseer, Pubmed)\ndataset = Planetoid(root='.\u002Fdata', name='Cora')\ndata = dataset[0]  # single graph with train\u002Fval\u002Ftest masks\n\n# Multi-graph classification (ENZYMES, MUTAG, IMDB-BINARY, etc.)\ndataset = TUDataset(root='.\u002Fdata', name='ENZYMES')\n# dataset[0], dataset[1], ... are individual graphs\n```\n\nCommon datasets by task:\n- **Node classification**: Planetoid (Cora\u002FCiteseer\u002FPubmed), OGB (ogbn-arxiv, ogbn-products, ogbn-mag)\n- **Graph classification**: TUDataset (MUTAG, ENZYMES, PROTEINS, IMDB-BINARY), OGB (ogbg-molhiv)\n- **Link prediction**: OGB (ogbl-collab, ogbl-citation2)\n- **Molecular**: QM7, QM9, MoleculeNet\n- **Point cloud\u002Fmesh**: ShapeNet, ModelNet10\u002F40, FAUST\n\n### Transforms\n\nTransforms preprocess or augment graph data, analogous to torchvision transforms:\n\n```python\nimport torch_geometric.transforms as T\n\n# Common transforms\nT.NormalizeFeatures()    # Row-normalize node features to sum to 1\nT.ToUndirected()         # Add reverse edges to make graph undirected\nT.AddSelfLoops()         # Add self-loop edges\nT.KNNGraph(k=6)          # Build k-NN graph from point cloud positions\nT.RandomJitter(0.01)     # Random noise augmentation on positions\nT.Compose([...])         # Chain multiple transforms\n\n# Apply as pre_transform (once, saved to disk) or transform (every access)\ndataset = ShapeNet(root='.\u002Fdata', pre_transform=T.KNNGraph(k=6),\n                   transform=T.RandomJitter(0.01))\n```\n\n## Building GNN Models\n\n### Quick Start: Using Built-in Layers\n\nThe fastest way to build a GNN — stack conv layers from `torch_geometric.nn`:\n\n```python\nimport torch\nimport torch.nn.functional as F\nfrom torch_geometric.nn import GCNConv\n\nclass GCN(torch.nn.Module):\n    def __init__(self, in_channels, hidden_channels, out_channels):\n        super().__init__()\n        self.conv1 = GCNConv(in_channels, hidden_channels)\n        self.conv2 = GCNConv(hidden_channels, out_channels)\n\n    def forward(self, x, edge_index):\n        x = self.conv1(x, edge_index).relu()\n        x = F.dropout(x, p=0.5, training=self.training)\n        x = self.conv2(x, edge_index)\n        return x\n```\n\n**Important**: PyG conv layers do NOT include activation functions — apply them yourself after each layer. This is by design for flexibility.\n\n### Choosing a Conv Layer\n\nPick based on your task and graph structure:\n\n| Layer | Best for | Key idea |\n|-------|----------|----------|\n| `GCNConv` | Homogeneous, semi-supervised node classification | Spectral-inspired, degree-normalized aggregation |\n| `GATConv` \u002F `GATv2Conv` | When neighbor importance varies | Attention-weighted messages |\n| `SAGEConv` | Large graphs, inductive settings | Sampling-friendly, learnable aggregation |\n| `GINConv` | Graph classification, maximizing expressiveness | As powerful as WL test |\n| `TransformerConv` | Rich edge features, complex interactions | Multi-head attention with edge features |\n| `EdgeConv` | Point clouds, dynamic graphs | MLP on edge features (x_i, x_j - x_i) |\n| `RGCNConv` | Heterogeneous with many relation types | Relation-specific weight matrices |\n| `HGTConv` | Heterogeneous graphs | Type-specific attention |\n\nAll conv layers accept `(x, edge_index)` at minimum. Many also accept `edge_attr` for edge features.\n\n### Lazy Initialization\n\nUse `-1` for input channels to let PyG infer dimensions automatically — especially useful for heterogeneous models:\n\n```python\nconv = SAGEConv((-1, -1), 64)  # Input dims inferred on first forward pass\n# Initialize lazy modules:\nwith torch.no_grad():\n    out = model(data.x, data.edge_index)\n```\n\n### High-Level Model APIs\n\nFor common architectures, PyG provides ready-made model classes:\n\n```python\nfrom torch_geometric.nn import GraphSAGE, GCN, GAT, GIN\n\nmodel = GraphSAGE(\n    in_channels=dataset.num_features,\n    hidden_channels=64,\n    out_channels=dataset.num_classes,\n    num_layers=2,\n)\n```\n\n### Custom Layers via MessagePassing\n\nTo implement a novel GNN layer, subclass `MessagePassing`. The framework is:\n\n1. `propagate()` orchestrates the message passing\n2. `message()` defines what info flows along each edge (the phi function)\n3. `aggregate()` combines messages at each node (sum\u002Fmean\u002Fmax)\n4. `update()` transforms the aggregated result (the gamma function)\n\n```python\nfrom torch_geometric.nn import MessagePassing\nfrom torch_geometric.utils import add_self_loops, degree\n\nclass MyConv(MessagePassing):\n    def __init__(self, in_channels, out_channels):\n        super().__init__(aggr='add')  # \"add\", \"mean\", or \"max\"\n        self.lin = torch.nn.Linear(in_channels, out_channels)\n\n    def forward(self, x, edge_index):\n        # Pre-processing before message passing\n        x = self.lin(x)\n        # Start message passing\n        return self.propagate(edge_index, x=x)\n\n    def message(self, x_j):\n        # x_j: features of source nodes for each edge [num_edges, features]\n        # The _j suffix auto-indexes source nodes, _i indexes target nodes\n        return x_j\n```\n\n**The `_i` \u002F `_j` convention**: any tensor passed to `propagate()` can be auto-indexed by appending `_i` (target\u002Fcentral node) or `_j` (source\u002Fneighbor node) in the `message()` signature. So if you pass `x=...` to propagate, you can access `x_i` and `x_j` in message().\n\nRead `references\u002Fmessage_passing.md` for the full GCN and EdgeConv implementation examples.\n\n## Task-Specific Patterns\n\n### Node Classification\n\n```python\n# Full-batch training on a single graph (e.g., Cora)\nmodel.train()\nfor epoch in range(200):\n    optimizer.zero_grad()\n    out = model(data.x, data.edge_index)\n    loss = F.cross_entropy(out[data.train_mask], data.y[data.train_mask])\n    loss.backward()\n    optimizer.step()\n\n# Evaluation — train(False) puts the model in inference mode (disables dropout\u002FBN)\nmodel.train(False)\npred = model(data.x, data.edge_index).argmax(dim=1)\nacc = (pred[data.test_mask] == data.y[data.test_mask]).float().mean()\n```\n\n### Graph Classification\n\nMultiple graphs — use `DataLoader` for mini-batching and global pooling to get graph-level representations:\n\n```python\nfrom torch_geometric.loader import DataLoader\nfrom torch_geometric.nn import GCNConv, global_mean_pool\n\nloader = DataLoader(dataset, batch_size=32, shuffle=True)\n\nclass GraphClassifier(torch.nn.Module):\n    def __init__(self, in_ch, hidden_ch, out_ch):\n        super().__init__()\n        self.conv1 = GCNConv(in_ch, hidden_ch)\n        self.conv2 = GCNConv(hidden_ch, hidden_ch)\n        self.lin = torch.nn.Linear(hidden_ch, out_ch)\n\n    def forward(self, x, edge_index, batch):\n        x = self.conv1(x, edge_index).relu()\n        x = self.conv2(x, edge_index).relu()\n        x = global_mean_pool(x, batch)  # [num_graphs_in_batch, hidden_ch]\n        return self.lin(x)\n\n# Training loop\nfor data in loader:\n    out = model(data.x, data.edge_index, data.batch)\n    loss = F.cross_entropy(out, data.y)\n```\n\nPyG's `DataLoader` batches multiple graphs by creating block-diagonal adjacency matrices. The `batch` tensor maps each node to its graph index. Pooling ops (`global_mean_pool`, `global_max_pool`, `global_add_pool`) use this to aggregate per-graph.\n\n### Link Prediction\n\nSplit edges into train\u002Fval\u002Ftest, use negative sampling:\n\n```python\nfrom torch_geometric.transforms import RandomLinkSplit\n\ntransform = RandomLinkSplit(\n    num_val=0.1,\n    num_test=0.1,\n    is_undirected=True,\n    add_negative_train_samples=False,\n)\ntrain_data, val_data, test_data = transform(data)\n\n# Encode nodes, then score edges\nz = model.encode(train_data.x, train_data.edge_index)\n# Positive edges\npos_score = (z[train_data.edge_label_index[0]] * z[train_data.edge_label_index[1]]).sum(dim=1)\n```\n\nRead `references\u002Flink_prediction.md` for the complete link prediction guide: GAE\u002FVGAE autoencoders, full training loops, LinkNeighborLoader for large graphs, heterogeneous link prediction, and evaluation metrics.\n\n## Scaling to Large Graphs\n\nFor graphs that don't fit in GPU memory, use neighbor sampling via `NeighborLoader`:\n\n```python\nfrom torch_geometric.loader import NeighborLoader\n\ntrain_loader = NeighborLoader(\n    data,\n    num_neighbors=[15, 10],     # Sample 15 neighbors in hop 1, 10 in hop 2\n    batch_size=128,              # Number of seed nodes per batch\n    input_nodes=data.train_mask, # Which nodes to sample from\n    shuffle=True,\n)\n\nfor batch in train_loader:\n    batch = batch.to(device)\n    out = model(batch.x, batch.edge_index)\n    # Only use first batch_size nodes for loss (these are the seed nodes)\n    loss = F.cross_entropy(out[:batch.batch_size], batch.y[:batch.batch_size])\n```\n\n**Key points about NeighborLoader**:\n- `num_neighbors` list length should match GNN depth (number of message passing layers)\n- Seed nodes are always the first `batch.batch_size` nodes in the output\n- `batch.n_id` maps relabeled indices back to original node IDs\n- Works for both `Data` and `HeteroData`\n- For link prediction, use `LinkNeighborLoader` instead\n- Sampling more than 2-3 hops is generally infeasible (exponential blowup)\n\nOther scalability options: `ClusterLoader` (ClusterGCN), `GraphSAINTSampler`, `ShaDowKHopSampler`. For multi-GPU training, DDP, PyTorch Lightning integration, and `torch.compile` support, read `references\u002Fscaling.md`.\n\n## Heterogeneous Graphs\n\nFor graphs with multiple node and edge types (social networks, knowledge graphs, recommendation):\n\n```python\nfrom torch_geometric.data import HeteroData\n\ndata = HeteroData()\n\n# Node features — indexed by node type string\ndata['user'].x = torch.randn(1000, 64)\ndata['movie'].x = torch.randn(500, 128)\n\n# Edge indices — indexed by (src_type, edge_type, dst_type) triplet\ndata['user', 'rates', 'movie'].edge_index = torch.randint(0, 500, (2, 3000))\ndata['user', 'follows', 'user'].edge_index = torch.randint(0, 1000, (2, 5000))\n\n# Access convenience dicts\ndata.x_dict        # {'user': tensor, 'movie': tensor}\ndata.edge_index_dict  # {('user','rates','movie'): tensor, ...}\ndata.metadata()    # ([node_types], [edge_types])\n```\n\n### Three ways to build heterogeneous GNNs\n\n**1. Auto-convert with `to_hetero()`** — write a homogeneous model, convert automatically:\n\n```python\nfrom torch_geometric.nn import SAGEConv, to_hetero\n\nclass GNN(torch.nn.Module):\n    def __init__(self, hidden_channels, out_channels):\n        super().__init__()\n        self.conv1 = SAGEConv((-1, -1), hidden_channels)\n        self.conv2 = SAGEConv((-1, -1), out_channels)\n\n    def forward(self, x, edge_index):\n        x = self.conv1(x, edge_index).relu()\n        x = self.conv2(x, edge_index)\n        return x\n\nmodel = GNN(64, dataset.num_classes)\nmodel = to_hetero(model, data.metadata(), aggr='sum')\n\n# Now accepts dicts:\nout = model(data.x_dict, data.edge_index_dict)\n```\n\nUse `(-1, -1)` for bipartite input channels (source, target may differ). Lazy init handles the rest.\n\n**2. `HeteroConv` wrapper** — different conv per edge type:\n\n```python\nfrom torch_geometric.nn import HeteroConv, GCNConv, SAGEConv, GATConv\n\nconv = HeteroConv({\n    ('paper', 'cites', 'paper'): GCNConv(-1, 64),\n    ('author', 'writes', 'paper'): SAGEConv((-1, -1), 64),\n    ('paper', 'rev_writes', 'author'): GATConv((-1, -1), 64, add_self_loops=False),\n}, aggr='sum')\n```\n\n**3. Native heterogeneous operators** like `HGTConv`:\n\n```python\nfrom torch_geometric.nn import HGTConv\nconv = HGTConv(hidden_channels, hidden_channels, data.metadata(), num_heads=4)\n```\n\n**Important for heterogeneous graphs**:\n- Use `T.ToUndirected()` to add reverse edge types for bidirectional message flow\n- Disable `add_self_loops` in bipartite conv layers (different source\u002Fdest types) — use skip connections instead: `conv(x, edge_index) + lin(x)`\n- For NeighborLoader on HeteroData, specify `input_nodes` as `('node_type', mask)` tuple\n- `num_neighbors` can be a dict keyed by edge type for fine-grained control\n\nRead `references\u002Fheterogeneous.md` for complete examples including training loops and NeighborLoader usage with heterogeneous graphs.\n\n## Custom Datasets\n\nFor loading your own data into PyG:\n\n- **Quick (no class needed)**: Create `Data` objects directly and pass a list to `DataLoader`\n- **Reusable (fits in RAM)**: Subclass `InMemoryDataset` — override `raw_file_names`, `processed_file_names`, `download()`, `process()`\n- **Large (disk-backed)**: Subclass `Dataset` — also override `len()` and `get()`\n- **From CSV**: Load node\u002Fedge tables with pandas, build mappings to consecutive indices, assemble into `Data` or `HeteroData`\n- **From NetworkX**: `from_networkx(G)` converts a NetworkX graph directly\n- **From scipy sparse**: `from_scipy_sparse_matrix(adj)` extracts edge_index\n\nRead `references\u002Fcustom_datasets.md` for complete examples with all patterns, CSV loading with encoders, and the MovieLens walkthrough.\n\n## Explainability\n\nPyG provides `torch_geometric.explain` for interpreting GNN predictions:\n\n```python\nfrom torch_geometric.explain import Explainer, GNNExplainer\n\nexplainer = Explainer(\n    model=model,\n    algorithm=GNNExplainer(epochs=200),\n    explanation_type='model',\n    node_mask_type='attributes',\n    edge_mask_type='object',\n    model_config=dict(\n        mode='multiclass_classification',\n        task_level='node',\n        return_type='log_probs',\n    ),\n)\n\nexplanation = explainer(data.x, data.edge_index, index=10)\nexplanation.visualize_graph()           # Important subgraph\nexplanation.visualize_feature_importance(top_k=10)  # Feature importance\n```\n\nAvailable algorithms: `GNNExplainer` (optimization-based), `PGExplainer` (parametric, trained), `CaptumExplainer` (gradient-based via Captum), `AttentionExplainer` (attention weights). Works for both homogeneous and heterogeneous graphs.\n\nRead `references\u002Fexplainability.md` for all algorithms, heterogeneous explanations, evaluation metrics, and PGExplainer training.\n\n## Common Pitfalls\n\n1. **edge_index shape**: Must be `[2, num_edges]`, not `[num_edges, 2]`. Transpose if needed.\n2. **Forgetting activations**: Conv layers don't include ReLU\u002Fetc — add them manually.\n3. **Self-loops in hetero bipartite**: Don't use `add_self_loops=True` when source and dest node types differ. Use skip connections instead.\n4. **NeighborLoader slicing**: Only the first `batch.batch_size` nodes are your seed nodes. Slice predictions and labels accordingly.\n5. **Undirected graphs**: If your graph is undirected, include edges in both directions in `edge_index`, or use `T.ToUndirected()`.\n6. **Lazy init**: Models with `-1` input channels need one forward pass with `torch.no_grad()` before training to initialize parameters.\n7. **Global pooling for graph tasks**: Use `global_mean_pool(x, batch)` (not manual reshape) to aggregate node features to graph-level.\n8. **num_neighbors alignment**: Keep `len(num_neighbors)` equal to the number of GNN layers. More hops than layers wastes compute; fewer means wasted model capacity.\n\n## Agent operating procedure\n\n1. **Check the environment.** Confirm the Python environment and library versions (`python -c \"import pkg; print(pkg.__version__)\"`) and inspect the data's shape, types and missing values.\n2. **Pin down the inputs.** Confirm formats, identifiers and parameters from the data or the user. Ask rather than guess any value that changes the result.\n3. **Run a small version first.** Run on a sample or a single fold first and check runtime and memory.\n4. **Execute the full task** using the instructions and references above.\n5. **Validate the result.** Use held-out data, fixed random seeds and appropriate metrics; check for leakage; report uncertainty (CIs, std over seeds).\n6. **Report.** State what was run (versions, commands, parameters), what was checked, and what is still uncertain.\n\n| If this happens | Do this |\n|---|---|\n| Out-of-memory or very slow execution | Subsample, use chunked or lazy computation, or reduce model size, and tell the user what changed. |\n| A function, flag or endpoint in these instructions is missing in the installed version | Check the installed version's own documentation (`help()`, `--help`, official docs), adapt, and tell the user. Never invent an API. |\n| A required input, identifier or parameter is ambiguous | Ask the user, or state the assumption explicitly before running. |\n\n**Integrity rules**\n\n- Never fabricate results, parameters, identifiers, citations or statistics. If something cannot be run or verified, say so plainly.\n- Never report a metric you did not compute in this session; show the code path that produced every number.\n- Treat version-specific details here as possibly outdated: confirm them against the official documentation for the installed version.\n- Ask before actions that cost money, consume shared GPUs or cloud quota, touch personal or patient data, or cannot be undone.\n\n## Related skills\n\n- `networkx`: Create, analyze, and visualize complex networks and graphs in Python with NetworkX.\n- `torchdrug`: Build and troubleshoot TorchDrug 0.2.1 workflows for molecular graphs, property prediction, self-supervised pretraining, molecule generatio…\n","# PyTorch Geometric (PyG)\n\nPyG 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.\n\n## Installation\n\nTested against **torch-geometric 2.7.x** (Oct 2025). Requires **Python 3.10+** and **PyTorch 2.6+**.\n\n```bash\n# 1. Install PyTorch first (match your CUDA\u002FCPU setup — see https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F)\nuv pip install torch\n\n# 2. Core PyG (no extension wheels required for basic usage)\nuv pip install torch_geometric\n```\n\nOptional 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:\u002F\u002Fdata.pyg.org\u002Fwhl) after checking your PyTorch and CUDA versions:\n\n```bash\npython -c \"import torch; print(torch.__version__, torch.version.cuda)\"\n# Then install wheels for your torch+CUDA combo, e.g.:\nuv pip install pyg-lib torch-scatter torch-sparse torch-cluster \\\n  -f https:\u002F\u002Fdata.pyg.org\u002Fwhl\u002Ftorch-2.8.0+cu128.html\n```\n\nCheck your version:\n\n```python\nimport torch_geometric\nprint(torch_geometric.__version__)\n```\n\n**Conda:** the `pyg` conda channel is no longer maintained for PyTorch >2.5 — use `uv pip install` and the wheel index above instead.\n\n### PyG 2.7 notes\n\nPyG 2.7 dropped Python 3.9 and PyTorch ≤2.5. See the [2.7.0 release notes](https:\u002F\u002Fgithub.com\u002Fpyg-team\u002Fpytorch_geometric\u002Freleases\u002Ftag\u002F2.7.0) for PyTorch 2.6–2.8 compatibility tables. `torch_geometric.distributed` is deprecated — use standard `torch.distributed` DDP (see `references\u002Fscaling.md`).\n\n## Core Concepts\n\n### Graph Data: `Data` and `HeteroData`\n\nA graph lives in a `Data` object. The key attributes:\n\n```python\nfrom torch_geometric.data import Data\n\ndata = Data(\n    x=node_features,          # [num_nodes, num_node_features]\n    edge_index=edge_index,     # [2, num_edges] — COO format, dtype=torch.long\n    edge_attr=edge_features,   # [num_edges, num_edge_features]\n    y=labels,                  # node-level [num_nodes, *] or graph-level [1, *]\n    pos=positions,             # [num_nodes, num_dimensions] (for point clouds\u002Fspatial)\n)\n```\n\n**`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()`:\n\n```python\n# If edges are [[src1, dst1], [src2, dst2], ...] — transpose first:\nedge_index = edge_pairs.t().contiguous()\n```\n\nFor undirected graphs, include both directions: edge (0,1) needs both `[0,1]` and `[1,0]` in edge_index.\n\nFor heterogeneous graphs, use `HeteroData` — see the Heterogeneous Graphs section below.\n\n### Datasets\n\nPyG bundles many standard datasets that auto-download and preprocess:\n\n```python\nfrom torch_geometric.datasets import Planetoid, TUDataset\n\n# Single-graph node classification (Cora, Citeseer, Pubmed)\ndataset = Planetoid(root='.\u002Fdata', name='Cora')\ndata = dataset[0]  # single graph with train\u002Fval\u002Ftest masks\n\n# Multi-graph classification (ENZYMES, MUTAG, IMDB-BINARY, etc.)\ndataset = TUDataset(root='.\u002Fdata', name='ENZYMES')\n# dataset[0], dataset[1], ... are individual graphs\n```\n\nCommon datasets by task:\n- **Node classification**: Planetoid (Cora\u002FCiteseer\u002FPubmed), OGB (ogbn-arxiv, ogbn-products, ogbn-mag)\n- **Graph classification**: TUDataset (MUTAG, ENZYMES, PROTEINS, IMDB-BINARY), OGB (ogbg-molhiv)\n- **Link prediction**: OGB (ogbl-collab, ogbl-citation2)\n- **Molecular**: QM7, QM9, MoleculeNet\n- **Point cloud\u002Fmesh**: ShapeNet, ModelNet10\u002F40, FAUST\n\n### Transforms\n\nTransforms preprocess or augment graph data, analogous to torchvision transforms:\n\n```python\nimport torch_geometric.transforms as T\n\n# Common transforms\nT.NormalizeFeatures()    # Row-normalize node features to sum to 1\nT.ToUndirected()         # Add reverse edges to make graph undirected\nT.AddSelfLoops()         # Add self-loop edges\nT.KNNGraph(k=6)          # Build k-NN graph from point cloud positions\nT.RandomJitter(0.01)     # Random noise augmentation on positions\nT.Compose([...])         # Chain multiple transforms\n\n# Apply as pre_transform (once, saved to disk) or transform (every access)\ndataset = ShapeNet(root='.\u002Fdata', pre_transform=T.KNNGraph(k=6),\n                   transform=T.RandomJitter(0.01))\n```\n\n## Building GNN Models\n\n### Quick Start: Using Built-in Layers\n\nThe fastest way to build a GNN — stack conv layers from `torch_geometric.nn`:\n\n```python\nimport torch\nimport torch.nn.functional as F\nfrom torch_geometric.nn import GCNConv\n\nclass GCN(torch.nn.Module):\n    def __init__(self, in_channels, hidden_channels, out_channels):\n        super().__init__()\n        self.conv1 = GCNConv(in_channels, hidden_channels)\n        self.conv2 = GCNConv(hidden_channels, out_channels)\n\n    def forward(self, x, edge_index):\n        x = self.conv1(x, edge_index).relu()\n        x = F.dropout(x, p=0.5, training=self.training)\n        x = self.conv2(x, edge_index)\n        return x\n```\n\n**Important**: PyG conv layers do NOT include activation functions — apply them yourself after each layer. This is by design for flexibility.\n\n### Choosing a Conv Layer\n\nPick based on your task and graph structure:\n\n| Layer | Best for | Key idea |\n|-------|----------|----------|\n| `GCNConv` | Homogeneous, semi-supervised node classification | Spectral-inspired, degree-normalized aggregation |\n| `GATConv` \u002F `GATv2Conv` | When neighbor importance varies | Attention-weighted messages |\n| `SAGEConv` | Large graphs, inductive settings | Sampling-friendly, learnable aggregation |\n| `GINConv` | Graph classification, maximizing expressiveness | As powerful as WL test |\n| `TransformerConv` | Rich edge features, complex interactions | Multi-head attention with edge features |\n| `EdgeConv` | Point clouds, dynamic graphs | MLP on edge features (x_i, x_j - x_i) |\n| `RGCNConv` | Heterogeneous with many relation types | Relation-specific weight matrices |\n| `HGTConv` | Heterogeneous graphs | Type-specific attention |\n\nAll conv layers accept `(x, edge_index)` at minimum. Many also accept `edge_attr` for edge features.\n\n### Lazy Initialization\n\nUse `-1` for input channels to let PyG infer dimensions automatically — especially useful for heterogeneous models:\n\n```python\nconv = SAGEConv((-1, -1), 64)  # Input dims inferred on first forward pass\n# Initialize lazy modules:\nwith torch.no_grad():\n    out = model(data.x, data.edge_index)\n```\n\n### High-Level Model APIs\n\nFor common architectures, PyG provides ready-made model classes:\n\n```python\nfrom torch_geometric.nn import GraphSAGE, GCN, GAT, GIN\n\nmodel = GraphSAGE(\n    in_channels=dataset.num_features,\n    hidden_channels=64,\n    out_channels=dataset.num_classes,\n    num_layers=2,\n)\n```\n\n### Custom Layers via MessagePassing\n\nTo implement a novel GNN layer, subclass `MessagePassing`. The framework is:\n\n1. `propagate()` orchestrates the message passing\n2. `message()` defines what info flows along each edge (the phi function)\n3. `aggregate()` combines messages at each node (sum\u002Fmean\u002Fmax)\n4. `update()` transforms the aggregated result (the gamma function)\n\n```python\nfrom torch_geometric.nn import MessagePassing\nfrom torch_geometric.utils import add_self_loops, degree\n\nclass MyConv(MessagePassing):\n    def __init__(self, in_channels, out_channels):\n        super().__init__(aggr='add')  # \"add\", \"mean\", or \"max\"\n        self.lin = torch.nn.Linear(in_channels, out_channels)\n\n    def forward(self, x, edge_index):\n        # Pre-processing before message passing\n        x = self.lin(x)\n        # Start message passing\n        return self.propagate(edge_index, x=x)\n\n    def message(self, x_j):\n        # x_j: features of source nodes for each edge [num_edges, features]\n        # The _j suffix auto-indexes source nodes, _i indexes target nodes\n        return x_j\n```\n\n**The `_i` \u002F `_j` convention**: any tensor passed to `propagate()` can be auto-indexed by appending `_i` (target\u002Fcentral node) or `_j` (source\u002Fneighbor node) in the `message()` signature. So if you pass `x=...` to propagate, you can access `x_i` and `x_j` in message().\n\nRead `references\u002Fmessage_passing.md` for the full GCN and EdgeConv implementation examples.\n\n## Task-Specific Patterns\n\n### Node Classification\n\n```python\n# Full-batch training on a single graph (e.g., Cora)\nmodel.train()\nfor epoch in range(200):\n    optimizer.zero_grad()\n    out = model(data.x, data.edge_index)\n    loss = F.cross_entropy(out[data.train_mask], data.y[data.train_mask])\n    loss.backward()\n    optimizer.step()\n\n# Evaluation — train(False) puts the model in inference mode (disables dropout\u002FBN)\nmodel.train(False)\npred = model(data.x, data.edge_index).argmax(dim=1)\nacc = (pred[data.test_mask] == data.y[data.test_mask]).float().mean()\n```\n\n### Graph Classification\n\nMultiple graphs — use `DataLoader` for mini-batching and global pooling to get graph-level representations:\n\n```python\nfrom torch_geometric.loader import DataLoader\nfrom torch_geometric.nn import GCNConv, global_mean_pool\n\nloader = DataLoader(dataset, batch_size=32, shuffle=True)\n\nclass GraphClassifier(torch.nn.Module):\n    def __init__(self, in_ch, hidden_ch, out_ch):\n        super().__init__()\n        self.conv1 = GCNConv(in_ch, hidden_ch)\n        self.conv2 = GCNConv(hidden_ch, hidden_ch)\n        self.lin = torch.nn.Linear(hidden_ch, out_ch)\n\n    def forward(self, x, edge_index, batch):\n        x = self.conv1(x, edge_index).relu()\n        x = self.conv2(x, edge_index).relu()\n        x = global_mean_pool(x, batch)  # [num_graphs_in_batch, hidden_ch]\n        return self.lin(x)\n\n# Training loop\nfor data in loader:\n    out = model(data.x, data.edge_index, data.batch)\n    loss = F.cross_entropy(out, data.y)\n```\n\nPyG's `DataLoader` batches multiple graphs by creating block-diagonal adjacency matrices. The `batch` tensor maps each node to its graph index. Pooling ops (`global_mean_pool`, `global_max_pool`, `global_add_pool`) use this to aggregate per-graph.\n\n### Link Prediction\n\nSplit edges into train\u002Fval\u002Ftest, use negative sampling:\n\n```python\nfrom torch_geometric.transforms import RandomLinkSplit\n\ntransform = RandomLinkSplit(\n    num_val=0.1,\n    num_test=0.1,\n    is_undirected=True,\n    add_negative_train_samples=False,\n)\ntrain_data, val_data, test_data = transform(data)\n\n# Encode nodes, then score edges\nz = model.encode(train_data.x, train_data.edge_index)\n# Positive edges\npos_score = (z[train_data.edge_label_index[0]] * z[train_data.edge_label_index[1]]).sum(dim=1)\n```\n\nRead `references\u002Flink_prediction.md` for the complete link prediction guide: GAE\u002FVGAE autoencoders, full training loops, LinkNeighborLoader for large graphs, heterogeneous link prediction, and evaluation metrics.\n\n## Scaling to Large Graphs\n\nFor graphs that don't fit in GPU memory, use neighbor sampling via `NeighborLoader`:\n\n```python\nfrom torch_geometric.loader import NeighborLoader\n\ntrain_loader = NeighborLoader(\n    data,\n    num_neighbors=[15, 10],     # Sample 15 neighbors in hop 1, 10 in hop 2\n    batch_size=128,              # Number of seed nodes per batch\n    input_nodes=data.train_mask, # Which nodes to sample from\n    shuffle=True,\n)\n\nfor batch in train_loader:\n    batch = batch.to(device)\n    out = model(batch.x, batch.edge_index)\n    # Only use first batch_size nodes for loss (these are the seed nodes)\n    loss = F.cross_entropy(out[:batch.batch_size], batch.y[:batch.batch_size])\n```\n\n**Key points about NeighborLoader**:\n- `num_neighbors` list length should match GNN depth (number of message passing layers)\n- Seed nodes are always the first `batch.batch_size` nodes in the output\n- `batch.n_id` maps relabeled indices back to original node IDs\n- Works for both `Data` and `HeteroData`\n- For link prediction, use `LinkNeighborLoader` instead\n- Sampling more than 2-3 hops is generally infeasible (exponential blowup)\n\nOther scalability options: `ClusterLoader` (ClusterGCN), `GraphSAINTSampler`, `ShaDowKHopSampler`. For multi-GPU training, DDP, PyTorch Lightning integration, and `torch.compile` support, read `references\u002Fscaling.md`.\n\n## Heterogeneous Graphs\n\nFor graphs with multiple node and edge types (social networks, knowledge graphs, recommendation):\n\n```python\nfrom torch_geometric.data import HeteroData\n\ndata = HeteroData()\n\n# Node features — indexed by node type string\ndata['user'].x = torch.randn(1000, 64)\ndata['movie'].x = torch.randn(500, 128)\n\n# Edge indices — indexed by (src_type, edge_type, dst_type) triplet\ndata['user', 'rates', 'movie'].edge_index = torch.randint(0, 500, (2, 3000))\ndata['user', 'follows', 'user'].edge_index = torch.randint(0, 1000, (2, 5000))\n\n# Access convenience dicts\ndata.x_dict        # {'user': tensor, 'movie': tensor}\ndata.edge_index_dict  # {('user','rates','movie'): tensor, ...}\ndata.metadata()    # ([node_types], [edge_types])\n```\n\n### Three ways to build heterogeneous GNNs\n\n**1. Auto-convert with `to_hetero()`** — write a homogeneous model, convert automatically:\n\n```python\nfrom torch_geometric.nn import SAGEConv, to_hetero\n\nclass GNN(torch.nn.Module):\n    def __init__(self, hidden_channels, out_channels):\n        super().__init__()\n        self.conv1 = SAGEConv((-1, -1), hidden_channels)\n        self.conv2 = SAGEConv((-1, -1), out_channels)\n\n    def forward(self, x, edge_index):\n        x = self.conv1(x, edge_index).relu()\n        x = self.conv2(x, edge_index)\n        return x\n\nmodel = GNN(64, dataset.num_classes)\nmodel = to_hetero(model, data.metadata(), aggr='sum')\n\n# Now accepts dicts:\nout = model(data.x_dict, data.edge_index_dict)\n```\n\nUse `(-1, -1)` for bipartite input channels (source, target may differ). Lazy init handles the rest.\n\n**2. `HeteroConv` wrapper** — different conv per edge type:\n\n```python\nfrom torch_geometric.nn import HeteroConv, GCNConv, SAGEConv, GATConv\n\nconv = HeteroConv({\n    ('paper', 'cites', 'paper'): GCNConv(-1, 64),\n    ('author', 'writes', 'paper'): SAGEConv((-1, -1), 64),\n    ('paper', 'rev_writes', 'author'): GATConv((-1, -1), 64, add_self_loops=False),\n}, aggr='sum')\n```\n\n**3. Native heterogeneous operators** like `HGTConv`:\n\n```python\nfrom torch_geometric.nn import HGTConv\nconv = HGTConv(hidden_channels, hidden_channels, data.metadata(), num_heads=4)\n```\n\n**Important for heterogeneous graphs**:\n- Use `T.ToUndirected()` to add reverse edge types for bidirectional message flow\n- Disable `add_self_loops` in bipartite conv layers (different source\u002Fdest types) — use skip connections instead: `conv(x, edge_index) + lin(x)`\n- For NeighborLoader on HeteroData, specify `input_nodes` as `('node_type', mask)` tuple\n- `num_neighbors` can be a dict keyed by edge type for fine-grained control\n\nRead `references\u002Fheterogeneous.md` for complete examples including training loops and NeighborLoader usage with heterogeneous graphs.\n\n## Custom Datasets\n\nFor loading your own data into PyG:\n\n- **Quick (no class needed)**: Create `Data` objects directly and pass a list to `DataLoader`\n- **Reusable (fits in RAM)**: Subclass `InMemoryDataset` — override `raw_file_names`, `processed_file_names`, `download()`, `process()`\n- **Large (disk-backed)**: Subclass `Dataset` — also override `len()` and `get()`\n- **From CSV**: Load node\u002Fedge tables with pandas, build mappings to consecutive indices, assemble into `Data` or `HeteroData`\n- **From NetworkX**: `from_networkx(G)` converts a NetworkX graph directly\n- **From scipy sparse**: `from_scipy_sparse_matrix(adj)` extracts edge_index\n\nRead `references\u002Fcustom_datasets.md` for complete examples with all patterns, CSV loading with encoders, and the MovieLens walkthrough.\n\n## Explainability\n\nPyG provides `torch_geometric.explain` for interpreting GNN predictions:\n\n```python\nfrom torch_geometric.explain import Explainer, GNNExplainer\n\nexplainer = Explainer(\n    model=model,\n    algorithm=GNNExplainer(epochs=200),\n    explanation_type='model',\n    node_mask_type='attributes',\n    edge_mask_type='object',\n    model_config=dict(\n        mode='multiclass_classification',\n        task_level='node',\n        return_type='log_probs',\n    ),\n)\n\nexplanation = explainer(data.x, data.edge_index, index=10)\nexplanation.visualize_graph()           # Important subgraph\nexplanation.visualize_feature_importance(top_k=10)  # Feature importance\n```\n\nAvailable algorithms: `GNNExplainer` (optimization-based), `PGExplainer` (parametric, trained), `CaptumExplainer` (gradient-based via Captum), `AttentionExplainer` (attention weights). Works for both homogeneous and heterogeneous graphs.\n\nRead `references\u002Fexplainability.md` for all algorithms, heterogeneous explanations, evaluation metrics, and PGExplainer training.\n\n## Common Pitfalls\n\n1. **edge_index shape**: Must be `[2, num_edges]`, not `[num_edges, 2]`. Transpose if needed.\n2. **Forgetting activations**: Conv layers don't include ReLU\u002Fetc — add them manually.\n3. **Self-loops in hetero bipartite**: Don't use `add_self_loops=True` when source and dest node types differ. Use skip connections instead.\n4. **NeighborLoader slicing**: Only the first `batch.batch_size` nodes are your seed nodes. Slice predictions and labels accordingly.\n5. **Undirected graphs**: If your graph is undirected, include edges in both directions in `edge_index`, or use `T.ToUndirected()`.\n6. **Lazy init**: Models with `-1` input channels need one forward pass with `torch.no_grad()` before training to initialize parameters.\n7. **Global pooling for graph tasks**: Use `global_mean_pool(x, batch)` (not manual reshape) to aggregate node features to graph-level.\n8. **num_neighbors alignment**: Keep `len(num_neighbors)` equal to the number of GNN layers. More hops than layers wastes compute; fewer means wasted model capacity.\n\n## Agent operating procedure\n\n1. **Check the environment.** Confirm the Python environment and library versions (`python -c \"import pkg; print(pkg.__version__)\"`) and inspect the data's shape, types and missing values.\n2. **Pin down the inputs.** Confirm formats, identifiers and parameters from the data or the user. Ask rather than guess any value that changes the result.\n3. **Run a small version first.** Run on a sample or a single fold first and check runtime and memory.\n4. **Execute the full task** using the instructions and references above.\n5. **Validate the result.** Use held-out data, fixed random seeds and appropriate metrics; check for leakage; report uncertainty (CIs, std over seeds).\n6. **Report.** State what was run (versions, commands, parameters), what was checked, and what is still uncertain.\n\n| If this happens | Do this |\n|---|---|\n| Out-of-memory or very slow execution | Subsample, use chunked or lazy computation, or reduce model size, and tell the user what changed. |\n| A function, flag or endpoint in these instructions is missing in the installed version | Check the installed version's own documentation (`help()`, `--help`, official docs), adapt, and tell the user. Never invent an API. |\n| A required input, identifier or parameter is ambiguous | Ask the user, or state the assumption explicitly before running. |\n\n**Integrity rules**\n\n- Never fabricate results, parameters, identifiers, citations or statistics. If something cannot be run or verified, say so plainly.\n- Never report a metric you did not compute in this session; show the code path that produced every number.\n- Treat version-specific details here as possibly outdated: confirm them against the official documentation for the installed version.\n- Ask before actions that cost money, consume shared GPUs or cloud quota, touch personal or patient data, or cannot be undone.\n\n## Related skills\n\n- `networkx`: Create, analyze, and visualize complex networks and graphs in Python with NetworkX.\n- `torchdrug`: Build and troubleshoot TorchDrug 0.2.1 workflows for molecular graphs, property prediction, self-supervised pretraining, molecule generatio…\n",{"name":5,"license":15,"metadata":50,"description":7,"compatibility":55},{"tags":51,"version":52,"category":53,"maintainer":54},"graph neural networks, PyTorch Geometric, GNN, deep learning","1.2","data-science-and-ml","Kalaris Labs","Requires Python 3.10+, PyTorch 2.6+, and torch-geometric 2.7.x. Optional extension wheels (pyg-lib, torch-scatter, torch-sparse, torch-cluster) must match your PyTorch\u002FCUDA build from https:\u002F\u002Fdata.pyg.org\u002Fwhl.","main","2b63f856ce19c2a797929cacabd9e0fc936812fa","plugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Ftorch-geometric",491,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins","https:\u002F\u002Fhol.org\u002Fplugins\u002Fbest-codex-plugins","https:\u002F\u002Fgithub.com\u002Fhashgraph-online","https:\u002F\u002Fhol.org","Open-source standards and developer tools for interoperable AI agents: discovery, identity, communication, payments, privacy and security.","2026-11-14 14:06:13",{"source":8,"skillName":5,"commands":67,"prompt":77,"zipAvailable":78},[68,71,74],{"tool":69,"command":70},"npx","npx skills add hashgraph-online\u002Fawesome-codex-plugins --skill torch-geometric",{"tool":72,"command":73},"bunx","bunx skills add hashgraph-online\u002Fawesome-codex-plugins --skill torch-geometric",{"tool":75,"command":76},"pnpm","pnpm dlx skills add hashgraph-online\u002Fawesome-codex-plugins --skill torch-geometric","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Ftorch-geometric\u002FSKILL.md",true,[80,86,90,94,98,102],{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Fcustom_datasets.md","REFERENCE","参考文档",7277,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Ftorch-geometric\u002Freferences\u002Fcustom_datasets.md",{"path":87,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":88,"sourceHtmlUrl":89},"references\u002Fexplainability.md",6420,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Ftorch-geometric\u002Freferences\u002Fexplainability.md",{"path":91,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":92,"sourceHtmlUrl":93},"references\u002Fheterogeneous.md",7935,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Ftorch-geometric\u002Freferences\u002Fheterogeneous.md",{"path":95,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":96,"sourceHtmlUrl":97},"references\u002Flink_prediction.md",8386,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Ftorch-geometric\u002Freferences\u002Flink_prediction.md",{"path":99,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":100,"sourceHtmlUrl":101},"references\u002Fmessage_passing.md",4266,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Ftorch-geometric\u002Freferences\u002Fmessage_passing.md",{"path":103,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":104,"sourceHtmlUrl":105},"references\u002Fscaling.md",8688,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Ftorch-geometric\u002Freferences\u002Fscaling.md",[107,116,124,132,140,148],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":111,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":115},"01M7DV332YQMGD8WTRJ9DZQXTB","worktable-review-with-annotations","Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":120,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":115},"01M7DV2YGHCZVBEB1AHYB6CGHE","worktable-find-and-synthesize-context","Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FSKILL.md",[],[],{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":128,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":115},"01M7DV2TQN1H11ME2SAF9MXN7V","worktable-create-or-update-docs","Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FSKILL.md",[],[],{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":136,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":115},"01M7DV2NE452NEA8TXATKSNAJH","worktable-create-or-manage-records","Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FSKILL.md",[],[],{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":144,"sourceHtmlUrl":145,"categories":146,"keywords":147,"publishedAt":115},"01M7DV2HENRBR2KSCVM064WH0Y","worktable-create-or-manage-interactive-html","Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FSKILL.md",[],[],{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":152,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":115},"01M7DV2CADR5R7RQFFYPNAGR9Y","worktable-collaborate-threads","Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FSKILL.md",[],[]]