Claude Code Plugins

Community-maintained marketplace

Feedback

Query chemical compound data from CAS Common Chemistry API. Use when retrieving chemical information by compound name, CAS Registry Number, SMILES, or InChI. Provides molecular properties (formula, mass, structure), physical properties (boiling/melting point, density), structure images (SVG), and data exports. Covers ~500,000 common substances.

Install Skill

1Download skill
2Enable skills in Claude

Open claude.ai/settings/capabilities and find the "Skills" section

3Upload to Claude

Click "Upload skill" and select the downloaded ZIP file

Note: Please verify skill by going through its instructions before using it.

SKILL.md

name cas-common-chemistry
description Query chemical compound data from CAS Common Chemistry API. Use when retrieving chemical information by compound name, CAS Registry Number, SMILES, or InChI. Provides molecular properties (formula, mass, structure), physical properties (boiling/melting point, density), structure images (SVG), and data exports. Covers ~500,000 common substances.

CAS Common Chemistry

Query chemical compound data from the CAS Common Chemistry API.

Setup

Set API key as environment variable:

# Linux/Mac
export CAS_API_KEY="your_api_key_here"

# Windows (PowerShell)
[Environment]::SetEnvironmentVariable('CAS_API_KEY', 'your_api_key', 'User')

Requires requests library:

pip install requests

Quick Start

Get Complete Data (Recommended)

Fetch all available data and auto-export JSON + SVG + TXT:

python scripts/cas_api.py full 100-42-5 --output-dir ./output

Search by Name

python scripts/cas_api.py search "styrene"

Get Details Only

python scripts/cas_api.py detail 100-42-5
python scripts/cas_api.py detail 100-42-5 --json

Available Data Fields

Field Description
rn CAS Registry Number
uri Unique resource identifier
name Official chemical name
molecularFormula Molecular formula
molecularMass Molecular mass
smile SMILES notation
canonicalSmile Canonical SMILES
inchi InChI identifier
inchiKey InChI key
hasMolfile Whether MOL file exists
experimentalProperties Boiling point, melting point, density, etc.
propertyCitations Data source citations
synonyms All alternative names
replacedRns Replaced/deleted CAS RNs
images SVG structure images

Commands

full - Complete Data Export

Get all data and automatically export files:

python scripts/cas_api.py full <CAS_RN> --output-dir <DIR>

Outputs:

  • <CAS_RN>.json - Complete JSON data
  • <CAS_RN>.svg - Structure image
  • <CAS_RN>.txt - Formatted text summary

search - Find Compounds

python scripts/cas_api.py search "benzene"
python scripts/cas_api.py search "C6H6" --size 10
python scripts/cas_api.py search "71-43-2" --json

detail - Get Information

python scripts/cas_api.py detail 100-42-5
python scripts/cas_api.py detail 100-42-5 --json

export - Export SVG Only

python scripts/cas_api.py export 100-42-5 --output structure.svg

Batch Processing

Process multiple compounds from file:

python scripts/batch_query.py --input compounds.txt --output results.json

Input file format (one per line):

styrene
benzene
100-42-5

Limitations

CAS Common Chemistry API does not include:

  • Synthesis routes/reactions
  • Commercial suppliers
  • Literature references
  • Full CAS REGISTRY (165M+ substances)

For complete data, use CAS SciFinder API.

Resources

  • scripts/cas_api.py - Main CLI tool
  • scripts/batch_query.py - Batch processing utility
  • references/api_reference.md - Complete API documentation