medchem

medchem is a skill for Claude Code from K-Dense-AI/drug-discovery-agent-skills. It costs 176 tokens per session (3,312 once invoked), scanned A, a copy of medchem, MIT.

A Python library for filtering and prioritising chemical compounds during drug discovery. It checks drug-likeness guidelines, structural warning patterns, chemical groups, and molecular complexity.

In plain words
What is it for?
Use it to apply rules such as Lipinski's rule of five, detect PAINS and other structural alerts, compare complexity measures, and prioritise compounds for hit-to-lead or lead-optimisation work.
Why use it?
It helps researchers narrow large compound collections and flag molecules that may need closer review before further testing.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to apply rules such as Lipinski's rule of five, detect PAINS and other structural alerts, compare complexity measures, and prioritise compounds for hit-to-lead or lead-optimisation work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/k-dense-ai/drug-discovery-agent-skills/medchem
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 K-Dense-AI/drug-discovery-agent-skills --skill medchem
Clone the repo
git clone --depth 1 https://github.com/K-Dense-AI/drug-discovery-agent-skills

Made for: Claude Code.

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 medchem

README.md
[![agentmods](https://agentmods.dev/badge/skills/k-dense-ai/drug-discovery-agent-skills/medchem/github.svg)](https://agentmods.dev/skills/k-dense-ai/drug-discovery-agent-skills/medchem)
Your own site
<a href="https://agentmods.dev/skills/k-dense-ai/drug-discovery-agent-skills/medchem"><img src="https://agentmods.dev/badge/skills/k-dense-ai/drug-discovery-agent-skills/medchem/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 medchem

Your own site · 80×15
<a href="https://agentmods.dev/skills/k-dense-ai/drug-discovery-agent-skills/medchem"><img src="https://agentmods.dev/badge/skills/k-dense-ai/drug-discovery-agent-skills/medchem.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 176 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,312 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 89% copy Near-identical to another mod 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.00176 $0.03312
Opus 5 $0.00088 $0.01656
Sonnet 5 $0.00035 $0.00662
Haiku 4.5 $0.00018 $0.00331

Measured 12d ago against content hash 241855885ee8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

medchem 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 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/filter_molecules.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Origin

This is a copy

89% identical to medchem — 34 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/medchem/SKILL.md · 344 lines

How it starts

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

Medchem

Overview

Medchem is a Python library from datamol-io for molecular filtering and prioritization in drug discovery. Apply literature-derived drug-likeness rules, named alert catalogs, complexity thresholds, chemical-group detection, and a custom query language to triage compound libraries at scale. Filters are context-specific guidelines — combine with domain expertise and target knowledge.

Checked against: medchem 2.0.5 (PyPI stable, released 2024-11-18; still the current release as of August 2026) — 22 rules and 32 named catalogs verified live. Requires Python ≥3.9. Depends on datamol and RDKit (installed automatically). RuleFilters and structural filter classes return pandas DataFrames. Lilly demerits require optional native binaries (mamba install lilly-medchem-rules).

When to Use This Skill

This skill should be used when:

  • Applying drug-likeness rules (Lipinski, Veber, CNS, lead-like) to compound libraries
  • Filtering molecules by structural alerts, PAINS, or NIBR screening-deck rules
  • Prioritizing compounds for hit-to-lead or lead optimization
  • Calculating complexity metrics against ZINC-derived thresholds
  • Detecting functional groups or named substructure catalogs
  • Building multi-criteria filters with the medchem query language

Installation

uv pip install medchem datamol

Optional — Eli Lilly demerit filter (requires conda-forge native binaries):

mamba install -c conda-forge lilly-medchem-rules

Core Capabilities

1. Medicinal Chemistry Rules

Apply established drug-likeness rules via medchem.rules.

List available rules:

import medchem as mc

mc.rules.RuleFilters.list_available_rules_names()
# ['rule_of_five', 'rule_of_five_beyond', 'rule_of_four', 'rule_of_three', ...]

Single rule on one molecule:

import datamol as dm
import medchem as mc

smiles = "CC(=O)OC1=CC=CC=C1C(=O)O"  # aspirin
mc.rules.basic_rules.rule_of_five(smiles)   # True
mc.rules.basic_rules.rule_of_cns(smiles)    # True
mc.rules.basic_rules.rule_of_veber(smiles)  # True

Read the full file on GitHub · 344 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 344 lines · 176 tokens per session scan A 241855885ee8

Subscribe to this mod's changes

medchem is a skill published in the GitHub repository K-Dense-AI/drug-discovery-agent-skills (28 stars, last pushed 5d ago), licensed MIT. It adds 176 tokens to every session and 3,312 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. It is 89% identical to medchem, differing in 34 lines, and is treated as a copy.