rdkit

rdkit is a skill for Claude Code from ualberta-rcg/drac-agent-skills. It costs 89 tokens per session (1,331 once invoked), scanned A, original, MIT.

A Python toolkit for reading, checking, comparing, and modelling chemical structures. It works with formats such as SMILES and SDF and calculates properties, fingerprints, substructure matches, reactions, and 3D molecular shapes.

In plain words
What is it for?
Use it to clean molecule files, calculate properties such as molecular weight and logP, find similar compounds, search for chemical patterns, cluster molecules, and create 3D conformers.
Why use it?
It removes the need to implement chemical structure handling and common molecular calculations yourself. Its validation tools can identify invalid chemical records before later analysis.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the community-science plugin — 10 skills shipped together

Good fit Use it to clean molecule files, calculate properties such as molecular weight and logP, find similar compounds, search for chemical patterns, cluster molecules, and create 3D conformers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ualberta-rcg/drac-agent-skills/rdkit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ualberta-rcg/drac-agent-skills --skill rdkit
Clone the repo
git clone --depth 1 https://github.com/ualberta-rcg/drac-agent-skills

Made for: Claude Code.

Or install community-science, the plugin that ships this one along with the rest of its 10 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rdkit

README.md
[![agentmods](https://agentmods.dev/badge/skills/ualberta-rcg/drac-agent-skills/rdkit/github.svg)](https://agentmods.dev/skills/ualberta-rcg/drac-agent-skills/rdkit)
Your own site
<a href="https://agentmods.dev/skills/ualberta-rcg/drac-agent-skills/rdkit"><img src="https://agentmods.dev/badge/skills/ualberta-rcg/drac-agent-skills/rdkit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rdkit

Your own site · 80×15
<a href="https://agentmods.dev/skills/ualberta-rcg/drac-agent-skills/rdkit"><img src="https://agentmods.dev/badge/skills/ualberta-rcg/drac-agent-skills/rdkit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,331 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00089 $0.01331
Opus 5.5 $0.00036 $0.00532
Sonnet 5.5 $0.00018 $0.00266
Haiku 4.5 $0.00009 $0.00133

Measured 6d ago against content hash eebc0c4352ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rdkit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

community-skills/skills/rdkit/SKILL.md · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.

RDKit Cheminformatics Toolkit

Use RDKit for molecular I/O, sanitization validation, descriptor calculation, modern rdFingerprintGenerator fingerprints, SMARTS substructure queries, and 3D conformer embedding.

Installation

# Check CVMFS module or wheelhouse first on Alliance clusters
module spider rdkit
# Or inside a Python venv (use `rdkit`, never legacy `rdkit-pypi`, and do not mix conda + pip rdkit)
pip install "rdkit==2026.3.6"

Core Patterns & Modern API Contracts

1. Safe Parsing & Sanitization Diagnostics

Chem.MolFromSmiles and ForwardSDMolSupplier return None on invalid records — always check for None and retain 1-based source record IDs before filtering:

from rdkit import Chem

mol = Chem.MolFromSmiles("CC(=O)Oc1ccccc1C(=O)O")
if mol is None:
    raw = Chem.MolFromSmiles(bad_smiles, sanitize=False)
    problems = Chem.DetectChemistryProblems(raw) if raw else []
    raise ValueError([p.Message() for p in problems])

# Canonical isomeric SMILES preserves specified stereochemistry (does NOT strip salts or pick pH protonation)
canon_smiles = Chem.MolToSmiles(mol, isomericSmiles=True)

2. Physicochemical Descriptors

from rdkit.Chem import Descriptors, QED, rdMolDescriptors

props = {
    "mw": Descriptors.MolWt(mol),
    "logp": Descriptors.MolLogP(mol),
    "tpsa": rdMolDescriptors.CalcTPSA(mol),
    "hbd": rdMolDescriptors.CalcNumHBD(mol),
    "hba": rdMolDescriptors.CalcNumHBA(mol),
    "rot_bonds": rdMolDescriptors.CalcNumRotatableBonds(mol),
    "qed": QED.qed(mol),
}

(Remember: Lipinski/QED/PAINS filters are exploratory heuristics, not proof of potency, toxicity, or developability.)

3. Modern Fingerprints (rdFingerprintGenerator) & Similarity

Use rdFingerprintGenerator (replaces deprecated AllChem.GetMorganFingerprintAsBitVect):

from rdkit import DataStructs
from rdkit.Chem import rdFingerprintGenerator

# radius=2 -> ECFP4-like; includeChirality=True distinguishes enantiomers
mfpgen = rdFingerprintGenerator.GetMorganGenerator(radius=2, fpSize=2048, includeChirality=True)
fps = [mfpgen.GetFingerprint(m) for m in valid_mols]
sims = DataStructs.BulkTanimotoSimilarity(fps[0], fps[1:])

(Note: Tanimoto similarity 1.0 is not a molecular identity proof due to bit collisions — compare canonical InChIKey or standardized isomeric SMILES for exact graph identity.)

Read the full file on GitHub · 110 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 110 lines · 89 tokens per session scan A eebc0c4352ef

Subscribe to this mod's changes

rdkit is a skill published in the GitHub repository ualberta-rcg/drac-agent-skills (2 stars, last pushed 7d ago), licensed MIT. It adds 89 tokens to every session and 1,331 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-25.

Related

rdkit compared with skills from other repositories

rdkit next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rdkitualberta-rcg/drac-agent-skillsSkill27d agoMITA89Claude Code
jupyter-notebookNousResearch/hermes-agentSkill267ktodayMITA18Claude Code, Codex
matlabK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA44Claude Code
pennylaneK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA74Claude Code
cuequivariance-torchNVIDIA/skillsSkill4.2ktodayApache-2.0A37Claude Code, Codex
cuequivariance-jaxNVIDIA/skillsSkill4.2ktodayApache-2.0A38Claude Code, Codex
cuopt-numerical-optimization-apiNVIDIA/skillsSkill4.2ktodayApache-2.0A51Claude Code, Codex