Guide · Agent skill
How to use the Medicinal Chemistry Compound Filters agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The medchem skill gives an AI agent a set of medicinal chemistry filters it can apply to a list of compounds. It covers drug-likeness rules such as Lipinski and Veber, structural alert catalogs such as PAINS and NIBR, and complexity thresholds. After this guide you will know what the skill does, how to install it, how to ask for it in plain language, and where its limits are.
Quick start
- 1Download and unzip. Download the ZIP from this page and unzip it so the medchem folder sits in ~/.claude/skills/ or a project's .claude/skills/ folder.
- 2Or upload in the apps. In the Claude apps, open Settings, go to Capabilities, then Skills, and upload the skill.
- 3Install the packages. Run the pinned install command for medchem, datamol and RDKit in the Python environment the agent will use.
- 4Prepare your compounds. Provide your library as SMILES strings and make sure empty or invalid structures are removed first.
- 5Ask for the filter. Describe the rules or alerts you want, such as Lipinski, Veber, PAINS or NIBR, and what output you need.
- 6Review the results. Check the pass and fail tables and the reasons column, then apply your own chemistry judgement before acting on them.
What does the medchem skill make the agent do?
Medchem is a Python library for molecular filtering and prioritization in drug discovery. The skill tells the agent how to use it to triage a compound library: it applies published drug-likeness rules, named structural alert sets, complexity thresholds and chemical-group detection, then returns tables showing which molecules pass or fail each filter.
The skill is guidance plus a batch-filtering script (scripts/filter_molecules.py). It does not replace expert judgement. The filters are context-specific guidelines, so they should be combined with knowledge of the biological target.
- Drug-likeness rules: Lipinski, Veber, CNS, lead-like and others
- Structural alerts: PAINS, NIBR screening-deck rules, ChEMBL-derived common alerts
- Complexity metrics compared against ZINC-derived thresholds
- Chemical group detection and the medchem query language for library filtering
Install the medchem skill from the ZIP
Download the ZIP from this page and unzip it. Then put the skill folder in one of two places: your user skills folder at ~/.claude/skills/, or a project-specific .claude/skills/ folder inside the project you are working in.
If you use the Claude apps instead of a folder, upload the skill under Settings → Capabilities → Skills.
- User-wide: unzip into ~/.claude/skills/
- Single project: unzip into the project's .claude/skills/ folder
- Claude apps: Settings → Capabilities → Skills
Install the Python dependencies
The skill needs Python with the medchem, datamol and RDKit packages. The skill's SKILL.md lists the exact pinned versions, and the command below installs them. Run it in the Python environment the agent will use. Installation needs network access.
The optional Lilly demerit tools are a separate step. The skill documents the medchem install-lilly command but says it was not executed in the review. It needs a C++ compiler, make, zlib and Ruby, and on Windows it needs WSL. Skip this step unless you need Lilly demerits.
- Python packages: medchem, datamol, RDKit (pinned versions as in SKILL.md), plus pandas and tqdm, which the script uses
- Optional: medchem install-lilly, which downloads source, builds executables and runs native tests
uv pip install "medchem==2.1.1" "datamol==0.13.0" "rdkit==2026.3.6"Ask the agent for filtering in plain language
You do not need to name the skill or any function. The skill is meant to be used when you ask for drug-likeness rules, structural alerts, PAINS or NIBR screening, compound prioritization for hit-to-lead or lead optimization, complexity metrics, functional group detection, or multi-criteria filters.
Give the agent your compound list as SMILES strings and say which filters you want. Tell it what you need back, such as the passing molecules or a table of pass and fail results.
- Check my list of SMILES against Lipinski and Veber and give me a table of pass or fail for each rule.
- Flag any compounds in this library that trigger PAINS or NIBR alerts and list the reasons.
- Which of these molecules are lead-like? Keep only the ones that pass.
- Filter these compounds for complexity using the ZINC 99th percentile threshold.
Example: run several rules on one library
The rule-filter class applies several rules at once and returns a pandas DataFrame with one boolean column per rule, plus pass_all and pass_any columns. Passing molecules are the rows where pass_all is true.
The skill notes that examples assume the caller has already parsed the molecules and rejected missing or empty structures before filtering.
- Use keep_props=True to add descriptors such as mw, clogp and tpsa to the result
- Structural alert and NIBR results also come back as DataFrames with pass_filter and reasons columns
import datamol as dm\nimport medchem as mc\nmols = [dm.to_mol(s) for s in smiles_list]\nrfilter = mc.rules.RuleFilters(rule_list=["rule_of_five", "rule_of_oprea", "rule_of_cns", "rule_of_leadlike_soft"])\ndf = rfilter(mols=mols, n_jobs=-1, progress=True, keep_props=False)\npassing = df[df["pass_all"]]Safety notes: scripts and network access
This skill runs scripts and uses the network. The filters themselves run locally and do not need credentials. Network access is needed for installation and for documentation lookup. Read scripts/filter_molecules.py before running it on your own data, and make sure you know which packages the agent will install.
The filters are screening heuristics. They are not toxicity or efficacy tests, and the skill warns that they are context-specific. Do not use their output as a clinical or safety decision about a real medicine.
- Filters run locally without credentials
- Installation and documentation lookup need network access
- Lilly demerit tools need a C++ compiler, make, zlib and Ruby and were not tested in the review
- Prevalidate inputs: invalid molecules can slip through some functional filters
Tips for reliable results
Set the common-alert sets explicitly, because the class defaults to BMS only. Use catalog_filter for names such as brenk and pains_a, and use the dedicated NIBR filter for NIBR rules rather than passing nibr to catalog_filter.
Pass copies of molecules to the Bredt filter, because it changes the molecules in place. Read the rules catalog in references/rules_catalog.md to see the thresholds the implemented functions actually use, since they can differ from simplified literature summaries.
- Set alert collections explicitly rather than relying on defaults
- Keep a record of the SMILES versus SMARTS setting for custom chemical groups
- Check results against your target knowledge before acting on them
What people use it for
- Narrowing a compound library by drug-likeness rules before lab testing
- Flagging PAINS or NIBR structural alerts across a screening deck
- Prioritizing compounds for hit-to-lead or lead optimization
- Building a reproducible molecular filtering pipeline with a documented script
- Teaching how drug-likeness rules and structural alerts are applied
Frequently asked questions
Is the medchem skill free to use?
The skill's SKILL.md front matter lists an Apache-2.0 licence, while the directory listing for this item says MIT. Check the licence file included with your download before you rely on either. The skill and the medchem library are open source.
What do I need to install the medchem skill?
You need Python with the medchem, datamol and RDKit packages, plus pandas and tqdm for the script. Installation needs network access. The optional Lilly tools also need a C++ compiler, make, zlib and Ruby, and on Windows WSL.
Where do I put the medchem skill folder?
Unzip the downloaded ZIP into ~/.claude/skills/ for all projects, or into a project's .claude/skills/ folder for one project. In the Claude apps, upload it under Settings → Capabilities → Skills.
Does the medchem skill need an internet connection?
Installation and documentation lookup need network access. The skill says the filters run locally without credentials, so routine filtering does not need a connection.
What is the difference between medchem and this skill?
Medchem is the Python library that performs the calculations. The skill is guidance and a batch-filtering script that teaches the agent how to use the library for compound triage.
Can the medchem skill tell me if a molecule is safe or will work as a drug?
No. The filters are screening heuristics and not toxicity or efficacy tests. The skill itself warns that they are context-specific and should be combined with domain expertise and target knowledge.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
The medchem skill suits medicinal chemists, drug discovery teams and students who want an agent to apply standard drug-likeness and structural alert filters to compound lists. It suits people comfortable with Python environments and command-line setup. If you need clinical or safety decisions, or you cannot set up Python and RDKit, choose a different tool or work with a specialist.
Download the skill