Agent skill

torchdrug

Build and troubleshoot TorchDrug 0.2.1 workflows for molecular graphs, property prediction, self-supervised pretraining, molecule generation, retrosynthesis, protein representation learning, and knowledge graph reasoning. Use when code imports torchdrug or needs its datasets, models, tasks, or Engine.

K-Dense-AIgithub.com/K-Dense-AIGitHub ↗
claude-codecan modify filesMIT
Install
npx skills add K-Dense-AI/scientific-agent-skills --skill torchdrug --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 9
SKILL.md size: 9 KB
Bundled scripts: none
Version: 1.1
Allowed tools: ReadWriteEditBash
Requires: TorchDrug 0.2.1 requires Python 3.7-3.10 and supports PyTorch 1.8-2.0. Apple Silicon is CPU-only; MPS is unsupported.
Path: skills/torchdrug/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 32,619
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# TorchDrug Use TorchDrug as a modular PyTorch graph-learning stack: 1. load a `datasets.*` dataset, 2. choose a `models.*` representation model, 3. wrap it in a `tasks.*` objective, 4. train and evaluate it with `core.Engine`. The current official documentation and latest release are both **0.2.1**. Treat newer Python or PyTorch combinations as unverified rather than silently assuming compatibility. ## Start with the version guard Before generating or debugging code, inspect the environment: ```bash python --version python -c "import torch; print(torch.__version__)" python -c "import torchdrug; print(torchdrug.__version__)" ``` The supported matrix for TorchDrug 0.2.1 is: - Python 3.7 through 3.10 - PyTorch 1.8 through 2.0 - Linux, Windows, or macOS - Apple Silicon: PyTorch 1.13 or later, CPU only; no MPS support If the project uses Python 3.11+ or PyTorch 2.1+, create a compatible environment or explicitly test a source build. Do not present such combinations as supported. ## Installation Prefer a dedicated Python 3.10 environment and pin the TorchDrug release: ```bash uv venv --python 3.10 source .venv/bin/activate uv pip install "torch==2.0.0" ``` Install `torch-scatter` and `t

What's inside
Steps it walks through
  1. Start with the version guard
  2. Installation
  3. Canonical property-prediction workflow
  4. Choose the official workflow
  5. Molecular property prediction
  6. Self-supervised molecular pretraining
  7. Molecule generation
  8. Retrosynthesis
  9. Knowledge graph reasoning
  10. Protein modeling
  11. Rules for reliable TorchDrug code
  12. Troubleshooting
  13. Installation or import failure
  14. Feature dimension mismatch
Ships with 8 files
  • references/core_concepts.md
  • references/datasets.md
  • references/knowledge_graphs.md
  • references/models_architectures.md
  • references/molecular_generation.md
  • references/molecular_property_prediction.md
  • references/protein_modeling.md
  • references/retrosynthesis.md
Commands it runs
python --version
python -c "import torch; print(torch.__version__)"
python -c "import torchdrug; print(torchdrug.__version__)"
uv venv --python 3.10
source .venv/bin/activate
uv pip install "torch==2.0.0"
uv pip install "torch-scatter==2.1.1" "torch-cluster==1.6.1" \
uv pip install "torchdrug==0.2.1"
More from scientific-agent-skills
All skills →
About this skill
What does the torchdrug skill do?

Build and troubleshoot TorchDrug 0.2.1 workflows for molecular graphs, property prediction, self-supervised pretraining, molecule generation, retrosynthesis, protein representation learning, and knowledge graph reasoning. Use when code imports torchdrug or needs its datasets, models, tasks, or Engine.

How do I install it?

Run `npx skills add K-Dense-AI/scientific-agent-skills --skill torchdrug --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.

Keep going