Query PubChem via PUG-REST to retrieve CIDs, computed properties, synonyms, and 2D/3D SDF structures.

MITAuto-check passedBackend & APIs

Install Drug DB Pubchem

skills CLI
$ npx skills add learningmatter-mit/AtomisticSkills --skill drug-db-pubchem -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install learningmatter-mit/AtomisticSkills drug-db-pubchem --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/learningmatter-mit/AtomisticSkills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/drug-db-pubchem .claude/skills/drug-db-pubchem && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
drug-db-pubchem
GitHub stars
176
Token cost
~1.3k tokens
SKILL.md length
333 words
Files
4 (incl. scripts)
Skills in repo
129
Repo updated
First seen
Licence
MIT

At a glance

Query PubChem via PUG-REST to retrieve CIDs, computed properties, synonyms, and 2D/3D SDF structures.

  • Works in 7 steps: Search by Compound Name → Search by SMILES → Search by CID → …
  • Backend & APIs work in your project
  • SKILL.md covers Goal, Instructions, Examples and Constraints
  • Runs Python scripts from its folder

What it does

Drug DB Pubchem is an agent skill from learningmatter-mit/AtomisticSkills. Query PubChem via PUG-REST to retrieve CIDs, computed properties, synonyms, and 2D/3D SDF structures.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts (for example `examples/README.md`, `examples/aspirin.json` and `scripts/query_pubchem.py`).

It sits in Backend & APIs. The repository describes itself as: Integrating AtomisticSkills into Agentic IDEs (Cursor, Claude Code, Codex, Google Antigravity, Hermes Agent, etc). The licence is MIT.

When your agent uses it

  • Backend & APIs work in your project

Example prompts

  • “/drug-db-pubchem”

Requirements

  • Python 3

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Search by Compound Name
  2. Search by SMILES
  3. Search by CID
  4. Search by InChI or InChIKey
  5. Search by Molecular Formula
  6. Download SDF Structures (2D/3D)
  7. Disable Synonyms

What it can do on your machine

Read from SKILL.md and the folder at commit 6257444. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Drug DB Pubchem loads about 1.3k tokens when it runs. Until then it costs about 29 tokens; SKILL.md has 333 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~29
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from learningmatter-mit/AtomisticSkills at commit 6257444, republished under its MIT licence (© learningmatter-mit). 333 words, ~1,266 tokens.

Download SKILL.mdSave it as .claude/skills/drug-db-pubchem/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
drug-db-pubchem
description
Query PubChem via PUG-REST to retrieve CIDs, computed properties, synonyms, and 2D/3D SDF structures.
metadata.category
drug-discovery
metadata.venv
cpu

PubChem Database Query

Goal

To programmatically query the PubChem Compound database using the PUG-REST API and retrieve:

  • PubChem Compound IDs (CIDs) from names, SMILES, InChI, InChIKey, or molecular formulas,
  • computed molecular properties (e.g., molecular weight, XLogP, TPSA, HBD/HBA),
  • optional synonyms (names/identifiers),
  • optional structure files (SDF), preferring 3D records when available.

This skill is designed for reproducible, rate-limited queries suitable for automation workflows.

Instructions

1. Search by Compound Name

Look up a compound by its common name. Use --name_type complete (default) for exact match or --name_type word for partial matching.

bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_pubchem.py \
  --name "aspirin" \
  --name_type complete \
  --max_results 5 \
  --outdir research/pubchem/aspirin \
  --output aspirin.json

For partial name matching (can be noisier):

bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_pubchem.py \
  --name "atorvastatin" \
  --name_type word \
  --max_results 10 \
  --outdir research/pubchem/atorvastatin \
  --output atorvastatin_word.json
2. Search by SMILES

SMILES may contain characters reserved by URL syntax; this script uses HTTP POST to avoid common failures.

bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_pubchem.py \
  --smiles "CC(=O)Oc1ccccc1C(=O)O" \
  --max_results 5 \
  --outdir research/pubchem/aspirin_smiles \
  --output aspirin_smiles.json
3. Search by CID

Most unambiguous lookup method.

bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_pubchem.py \
  --cid 2244 \
  --outdir research/pubchem/CID_2244 \
  --output cid_2244.json
4. Search by InChI or InChIKey

InChI uses HTTP POST (like SMILES) to avoid URL syntax issues.

bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_pubchem.py \
  --inchikey "BSYNRYMUTXBXSQ-UHFFFAOYSA-N" \
  --outdir research/pubchem/aspirin_inchikey \
  --output aspirin_inchikey.json
5. Search by Molecular Formula

Uses fastformula for synchronous molecular formula search. Optionally allow additional elements for broader results.

bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_pubchem.py \
  --formula "C9H8O4" \
  --max_results 10 \
  --outdir research/pubchem/C9H8O4 \
  --output formula_results.json

Allow other elements (broader search):

bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_pubchem.py \
  --formula "C6H12O6" \
  --allow_other_elements \
  --max_results 10 \
  --outdir research/pubchem/C6H12O6_allow_other \
  --output formula_allow_other.json
6. Download SDF Structures (2D/3D)

PubChem 3D records are computationally generated and may be unavailable for some CIDs; the script falls back to 2D by default.

bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_pubchem.py \
  --name "ibuprofen" \
  --download_sdf \
  --sdf_record_type 3d \
  --outdir research/pubchem/ibuprofen \
  --output ibuprofen.json
7. Disable Synonyms

Synonyms require extra API calls; disable them for high-throughput workflows.

bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_pubchem.py \
  --cid 2244 \
  --no_synonyms \
  --outdir research/pubchem/CID_2244_minimal \
  --output cid_2244_minimal.json

Examples

Caffeine (download 3D SDF if available):

bash
${CLAUDE_SKILL_DIR}/../../venv/run cpu python ${CLAUDE_SKILL_DIR}/scripts/query_pubchem.py \
  --name "caffeine" \
  --download_sdf \
  --sdf_record_type 3d \
  --outdir research/pubchem/caffeine \
  --output caffeine.json

Constraints

  • Rate Limiting: PubChem enforces per-user limits (~5 requests/sec, plus per-minute limits). Exceeding limits triggers HTTP 503 responses. The script rate-limits via a sliding window and retries with exponential backoff. It also adapts to PubChem's dynamic throttling feedback via the X-Throttling-Control header.
  • Request Time Limit: PUG-REST is intended for short synchronous requests (server timeouts ~30 seconds). Keep --max_results small for interactive use.
  • 3D Structures: PubChem 3D SDF records are computed (not necessarily experimental) and may not exist for all compounds; the script falls back to 2D when needed.
  • Synonyms: Synonyms may be numerous and are optional; disable them with --no_synonyms for high-throughput workflows.
  • Environment: Requires the cpu environment.
  • Dependencies: Standard library only (urllib, json, argparse).


Author: Matthew Cox Contact: GitHub @mcox3406

© learningmatter-mit, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts) in skills/drug-db-pubchem of learningmatter-mit/AtomisticSkills.

  • SKILL.md
  • examples/README.md
  • examples/aspirin.json
  • scripts/query_pubchem.py

Open the folder on GitHubat commit 6257444

Compare with similar skills

Drug DB Pubchem next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Drug DB Pubchem compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Drug DB Pubchem this skilllearningmatter-mit/AtomisticSkills176—~1.3kAutomated safety check: PassMIT
Configuring Horizoncoollabsio/coolify63k4 repos~898Automated safety check: PassMIT
Nestjs Best Practicesrolling-scopes/rsschool-app10k6 repos~1.2kAutomated safety check: PassMIT
Sub2API AdminWei-Shaw/sub2api43k1 repos~717Automated safety check: PassLGPL-3.0
Firecrawl Build Onboardingfirecrawl/firecrawl190k1 repos~1.4kAutomated safety check: NotesISC
Obsidian BasesAtmosphere/atmosphere3.8k22 repos~3.2kAutomated safety check: PassApache-2.0

Similar skills

  • Configuring Horizon

    coollabsio/coolify

    A skill your agent uses whenever the user mentions Horizon by name in a Laravel context.

    63k GitHub starsUsed in 4 repos~898 tokens
    Backend & APIsAuto-check passed
  • Nestjs Best Practices

    rolling-scopes/rsschool-app

    NestJS best practices and architecture patterns for building production-ready applications.

    10k GitHub starsUsed in 6 repos~1.2k tokens
    Backend & APIsAuto-check passed
  • Sub2API Admin

    Wei-Shaw/sub2api

    Manages a Sub2API deployment from the command line: accounts, redeem and invitation codes, groups, proxies, imports, exports and raw admin API calls.

    43k GitHub starsUsed in 1 repo~717 tokens
    Backend & APIsAuto-check passed
  • Firecrawl Build Onboarding

    firecrawl/firecrawl

    Gets Firecrawl working in a project: signs you in through the browser, saves FIRECRAWL_API_KEY to .env and picks the first SDK or REST path.

    190k GitHub starsUsed in 1 repo~1.4k tokens
    Backend & APIsAuto-check: notes
  • Obsidian Bases

    Atmosphere/atmosphere

    Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries.

    3.8k GitHub starsUsed in 22 repos~3.2k tokens
    Backend & APIsAuto-check passed
  • Fortify Development

    coollabsio/coolify

    ACTIVATE when the user works on authentication in Laravel. An agent skill from coollabsio/coolify.

    63k GitHub starsUsed in 4 repos~1.9k tokens
    Backend & APIsAuto-check passed

More from learningmatter-mit/AtomisticSkills

All 129 skills in this repo
  • Drug Binding Site Definition

    learningmatter-mit/AtomisticSkills

    Define a docking search box (center coordinates + box dimensions in Angstroms) from a co-crystal ligand, binding-site residues, or a saved JSON specification.

    176 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Drug Complex System Builder

    learningmatter-mit/AtomisticSkills

    Build a solvated, charge-neutralized protein-ligand complex for OpenMM molecular dynamics simulation.

    176 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Drug Pocket Detection

    learningmatter-mit/AtomisticSkills

    Identify and rank ligandable pockets on a protein structure or model using geometry (fpocket) or an ML predictor (P2Rank).

    176 GitHub stars~4k tokensUpdated yesterday
    Auto-check passed
  • Chem Bond Dissociation

    learningmatter-mit/AtomisticSkills

    Calculate homolytic and heterolytic bond dissociation energies (BDEs) for all single bonds in a molecule using MLIPs with RDKit fragmentation.

    176 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Chem Conformer Search

    learningmatter-mit/AtomisticSkills

    Generate molecular conformers with RDKit ETKDG, relax with MLIPs, and rank by energy with Boltzmann weighting.

    176 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Chem DB Mof

    learningmatter-mit/AtomisticSkills

    Query multiple MOF databases (QMOF via MPContribs; ARC-MOF DB7/Majumdar et al.

    176 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Drug DB Pubchem

What does Drug DB Pubchem do?

Query PubChem via PUG-REST to retrieve CIDs, computed properties, synonyms, and 2D/3D SDF structures. Drug DB Pubchem is an agent skill from learningmatter-mit/AtomisticSkills. Query PubChem via PUG-REST to retrieve CIDs, computed properties, synonyms, and 2D/3D SDF structures.

When should I use Drug DB Pubchem?

Drug DB Pubchem fits situations like: backend & APIs work in your project.

How do I install Drug DB Pubchem in Claude Code?

Run `npx skills add learningmatter-mit/AtomisticSkills --skill drug-db-pubchem -a claude-code`. Or copy the skill folder (skills/drug-db-pubchem in learningmatter-mit/AtomisticSkills) into .claude/skills/drug-db-pubchem in your project. Claude Code loads it when a task matches its description.

How do I install Drug DB Pubchem in Codex?

Run `npx skills add learningmatter-mit/AtomisticSkills --skill drug-db-pubchem -a codex`. Or copy the skill folder (skills/drug-db-pubchem in learningmatter-mit/AtomisticSkills) into .agents/skills/drug-db-pubchem in your project. Codex loads it when a task matches its description.

Can I use Drug DB Pubchem in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add learningmatter-mit/AtomisticSkills --skill drug-db-pubchem -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/drug-db-pubchem, .gemini/skills/drug-db-pubchem, .github/skills/drug-db-pubchem and .opencode/skills/drug-db-pubchem in your project.

What does Drug DB Pubchem need to run?

Going by SKILL.md and its folder, Drug DB Pubchem needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Drug DB Pubchem access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Drug DB Pubchem safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Drug DB Pubchem use?

Drug DB Pubchem is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Drug DB Pubchem use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Drug DB Pubchem?

Skills that share tags, products or a category with Drug DB Pubchem: Configuring Horizon (coollabsio/coolify, 63k stars), Nestjs Best Practices (rolling-scopes/rsschool-app, 10k stars), Sub2API Admin (Wei-Shaw/sub2api, 43k stars) and Firecrawl Build Onboarding (firecrawl/firecrawl, 190k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Drug DB Pubchem?

learningmatter-mit (a GitHub organization) maintains it in learningmatter-mit/AtomisticSkills, which has 176 GitHub stars. The repository holds 129 skills in this directory. The repository was last updated on October 7, 2026.

Source: learningmatter-mit/AtomisticSkills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.