OpenParable
Skip to content
← Back to skills

Cas

Research
cas

Cas is an Agent Skill for research published in the lamm-mit/scienceclaw repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Look up chemicals in CAS Common Chemistry (name, CAS RN, SMILES, InChI; ~500k compounds)

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/lamm-mit/scienceclaw/blob/HEAD/skills/cas/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/cas, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

CAS Common Chemistry

Query CAS Common Chemistry for compound names, CAS Registry Numbers®, molecular formula, mass, SMILES, InChI, and experimental properties. Covers nearly 500,000 compounds (CC BY-NC 4.0).

API access: Request a free API key at https://www.cas.org/services/commonchemistry-api. The script works without a key for public endpoints; if CAS requires a key, set CAS_API_KEY or use ~/.scienceclaw/cas_config.json.

Overview

  • Search by compound name (supports trailing wildcard, e.g. aspirin*), CAS RN, SMILES, or InChI/InChIKey
  • Get detail: name, formula, mass, InChI, SMILES, experimental properties (e.g. melting point, density)
  • Reference: references/cas-common-chemistry-api.md

Usage

Search by name

python3 {baseDir}/scripts/cas_search.py --query "aspirin"

Get detail by CAS Registry Number

python3 {baseDir}/scripts/cas_search.py --cas "50-78-2"

Search with wildcard

python3 {baseDir}/scripts/cas_search.py --query "atrazin*"

JSON output

python3 {baseDir}/scripts/cas_search.py --query "caffeine" --format json

Parameters

ParameterDescriptionDefault
--queryName, SMILES, or InChI (name supports trailing *)-
--casCAS Registry Number (e.g. 50-78-2)-
--max-resultsMax search results10
--formatsummary, detailed, jsonsummary

Output

  • Summary: CAS RN, name, formula, molecular mass, SMILES
  • Detailed: Adds InChI, InChIKey, experimental properties, synonyms
  • JSON: Full API response

Notes