[chemistry, drug-discovery]
Chemical Safety Triage for AI Agents: chem-hazard-toxicity
Extract GHS classifications, LD50 data, and acute oral toxicity from PubChem with this agent skill. Practical for drug discovery and lab safety workflows.
Where this fits
Imagine you're building an agent that helps chemists shortlist drug candidates. You need to know which compounds are acutely toxic before proposing them for synthesis. Pulling that data manually from PubChem means parsing JSON, cross-referencing GHS codes, and reconciling conflicting LD50 values. The chem-hazard-toxicity skill automates this: given a PubChem CID, it extracts safety warnings, GHS classifications, LD50 profiles, and performs acute oral toxicity triage—right inside your agent's workflow.
Why agents benefit
- Structured safety profiles: Fetches and normalizes PubChem PUG-VIEW data into a clean JSON schema, so your agent can reason over hazard classes, signal words, and risk codes without wrestling with raw API responses.
- Consensus-based triage: The
--triageflag computes consensus GHS statements (≥50% occurrence), picks the lowest rat oral LD50, and assigns an acute oral toxicity category (1–5 or unclassified) automatically. - Hazard consistency checks: It cross-checks oral hazard codes against GHS categories, flagging contradictions that might otherwise slip through manual review.
- Reproducible and scriptable: Runs as a CLI command, making it easy to integrate into larger agent pipelines, CI checks, or batch processing of multiple CIDs.
- Domain-aware defaults: Built with chemistry and drug-discovery context, so it understands terms like "acute oral toxicity" and "GHS classification" without extra prompting.
Practical scenarios
Drug candidate screening
Your agent evaluates a list of PubChem CIDs from a virtual screen. It runs chem-hazard-toxicity on each, filters out compounds with GHS category 1 or 2 oral toxicity, and flags those with low LD50 values for further review. This reduces the candidate list by 30% before any wet-lab work.
Lab safety compliance
A lab automation agent synthesizes novel compounds. Before each run, it queries the skill for the starting materials' hazard codes and automatically generates a safety checklist (e.g., "requires fume hood" or "avoid skin contact") based on GHS statements.
Literature meta-analysis
You're building an agent that mines papers for toxicity data. It uses this skill to cross-reference compound names (via CID lookup) and validate reported LD50 values against PubChem's experimental records, catching discrepancies in published studies.
Add it to your agent workflow
Install the skill via npx, then call it with a CID and an output directory. Here's a minimal example:
npx skills add learningmatter-mit/AtomisticSkills --skill chem-hazard-toxicity
python .agents/skills/chem-hazard-toxicity/scripts/get_safety_data.py \
--cid 2519 \
--outdir research/caffeine_safety \
--output safety_caffeine.json \
--triage
The output JSON includes ghs_classifications, hazard_statements, ld50_values, and triage (category, lowest LD50, consistency flags).
Compare before adopting
Before committing, evaluate how the skill handles edge cases: does it fail gracefully when PubChem lacks data? How often is the underlying API updated? Compare it against manual API calls or other toxicity tools (e.g., ToxCast, EPA's CompTox). Check whether the skill's output format matches your agent's data schema and whether the triage logic aligns with your regulatory context (e.g., GHS rev. 9 vs. 10). Also inspect the GitHub repo for recent commits and issue responsiveness.
Why it is worth tracking
This skill is part of the AtomisticSkills collection (161 stars, actively maintained), and it fills a real gap in agent-based chemistry workflows: turning raw PubChem data into actionable safety decisions. Its consensus-based triage and consistency checks are not trivial to implement from scratch. Track it if you're building agents for drug discovery, lab automation, or chemical safety auditing—and revisit it when PubChem's API changes or your safety requirements evolve. For a broader view of available agent skills, see OpenAgentSkill for this skill's page.
Featured Skill
chem-hazard-toxicity
Skill by learningmatter-mit