Chem Hazard Toxicity
Researchchem-hazard-toxicityChem Hazard Toxicity is an Agent Skill for research published in the learningmatter-mit/AtomisticSkills repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Extract explicit safety warnings, GHS classifications, and LD50 profiles from PubChem PUG VIEW.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/learningmatter-mit/AtomisticSkills/blob/HEAD/.agents/skills/chem-hazard-toxicity/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/chem-hazard-toxicity, 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.
Chemical Hazard and Toxicity Profiling
Goal
To programmatically extract critical safety information from the PubChem PUG-VIEW API. This skill pulls GHS Classifications, Hazard Classes, and Toxicological properties (like LD50/LC50 experimental animal records) for a given compound based on its CID.
Instructions
1. Extract Safety Profile by CID
Provide the precise CID of the molecule targeting the specific record to query safety metadata. The output is a JSON array of natural language texts sourced from chemical vendors, safety data sheets, and literature.
# Env: base-agent
python .agents/skills/chem-hazard-toxicity/scripts/get_safety_data.py \
--cid 2519 \
--outdir research/caffeine_safety \
--output safety_caffeine.json
Examples
We can test the extraction for Caffeine (CID: 2519), a well documented compound.
# Env: base-agent
python .agents/skills/chem-hazard-toxicity/scripts/get_safety_data.py \
--cid 2519 \
--outdir .agents/skills/chem-hazard-toxicity/examples/caffeine \
--output safety_caffeine.json
Constraints
- Data Availability: This relies exclusively on experimental or reported data listed in PubChem. Some newly generated molecules or obscure reagents may have empty safety profiles.
- Network Limits: PubChem PUG VIEW can be rate-limited under heavy load. The script automatically handles standard
HTTP 503blocking via exponential backoff.
Author: Bowen Deng Contact: GitHub @learningmatter-mit