skills/tooluniverse-pharmacovigilance/SKILL.md
Drug safety and adverse event analysis — FAERS spontaneous-report mining, FDA black-box warnings, signal detection (PRR, ROR, IC), risk factors by demographic/comorbidity, and label change tracking. Use for post-market safety surveillance, AE signal investigation, drug-AE association strength scoring, and pharmacovigilance reports.
npx skillsauth add mims-harvard/tooluniverse tooluniverse-pharmacovigilanceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When analysis requires computation (statistics, data processing, scoring, enrichment), write and run Python code via Bash. Don't describe what you would do — execute it and report actual results. Use ToolUniverse tools to retrieve data, then Python (pandas, scipy, statsmodels, matplotlib) to analyze it.
Systematic drug safety analysis using FAERS adverse event data, FDA labeling, PharmGKB pharmacogenomics, and clinical trial safety signals.
KEY PRINCIPLES:
Apply when user asks:
Ask: is this adverse effect a predictable extension of the drug's mechanism (on-target), or something the mechanism doesn't explain (off-target)? On-target effects are dose-dependent and predictable. Off-target effects are often idiosyncratic and harder to predict.
How to apply this:
When did the adverse event start relative to drug initiation? The timeline alone narrows the mechanism:
How to apply this: When reviewing FAERS case reports, always check the time_to_onset field. If the reported timeline is biologically implausible for the proposed mechanism, suspect confounding or misattribution. A reaction appearing years after drug start is unlikely to be immune-mediated but could be chronic accumulation.
This distinction determines monitoring strategy and management:
How to apply this: When evaluating a safety signal, classify it as Type A or B. This determines whether you recommend dose adjustment (Type A) or drug avoidance with potential pharmacogenomic screening (Type B).
When investigating a suspected drug adverse event, the Naranjo algorithm asks: (1) Did the event appear after the drug was given? (2) Did it improve when the drug was stopped? (3) Did it reappear when restarted? (4) Could other causes explain it? Score each question to classify causality.
Did the event recur when the drug was restarted? Positive rechallenge is the strongest evidence for causation in an individual case. But rechallenge is often unethical for serious reactions, so absence of rechallenge data doesn't exonerate the drug.
How to apply this: When reviewing case narratives or FAERS reports, check for dechallenge (did the event resolve when the drug was stopped?) and rechallenge (did it recur on re-exposure?). A positive dechallenge + positive rechallenge is near-definitive. Negative dechallenge weakens the causal link considerably.
A signal in FAERS means the drug-event pair is REPORTED more than expected. It does not mean the drug CAUSES the event. Think about reporting biases:
How to apply this: Always ask — what is the base rate of this event in the untreated population? A high PRR for "cardiac arrest" in a drug used by ICU patients may reflect the patient population, not the drug. Cross-reference with clinical trial placebo-arm rates when available.
Use FAERS/OpenFDA tools to QUANTIFY a signal you have already hypothesized based on mechanism. Do not mine FAERS without a hypothesis — you will find spurious associations.
The correct sequence:
Rather than memorizing gene-drug pairs, apply this reasoning framework:
Query PharmGKB_search_drugs(query=...) and CPIC_list_guidelines to get current pharmacogenomic annotations rather than relying on memorized associations, which may be outdated.
[DRUG]_safety_report.md FIRST with all section headers and [Researching...] placeholders[DRUG]_adverse_events.csv and [DRUG]_pharmacogenomics.csvEvery safety signal MUST include source tool, data period, PRR, case counts, and serious/fatal breakdown.
| Tool | WRONG Parameter | CORRECT Parameter |
|------|-----------------|-------------------|
| FAERS_count_reactions_by_drug_event | drug | drug_name |
| FAERS_filter_serious_events | American spelling (e.g., "Hemorrhage") | MedDRA British spelling (e.g., "Haemorrhage") |
| FAERS_stratify_by_demographics | Requiring adverse_event | adverse_event is optional (omit for all-event stratification) |
| DailyMed_search_spls | name | drug_name |
| PharmGKB_search_drugs | drug | query |
| OpenFDA_search_drug_events | drug_name | search |
Phase 0: Mechanistic Reasoning (BEFORE tools)
On-target toxicity, time-to-onset, dose vs idiosyncratic, PGx risk
Phase 1: Drug Disambiguation
-> Resolve drug name, get identifiers (ChEMBL, DrugBank)
Phase 2: Adverse Event Profiling (FAERS)
-> Query FAERS, calculate PRR, stratify by seriousness
Phase 3: Label Warning Extraction
-> DailyMed boxed warnings, contraindications, precautions
Phase 4: Pharmacogenomic Risk
-> PharmGKB clinical annotations, high-risk genotypes
Phase 5: Clinical Trial Safety
-> ClinicalTrials.gov Phase 3/4 safety data
Phase 5.5: Pathway & Mechanism Context
-> KEGG drug metabolism, target pathway analysis
Phase 5.6: Literature Intelligence
-> PubMed, BioRxiv/MedRxiv, OpenAlex citation analysis
Phase 6: Signal Prioritization
-> Rank by PRR x severity x frequency
Phase 7: Report Synthesis
DailyMed_search_spls(drug_name=...) for NDC, SPL setid, generic nameChEMBL_search_drugs(query=...) for molecule ID, max phaseFAERS_count_reactions_by_drug_event(drug_name=..., limit=50) for top events(A/B) / (C/D) where A=drug+event, B=drug+any, C=event+any_other, D=total_otherSeverity classification:
filter_serious_events -- MedDRA Spelling (CRITICAL)FAERS_filter_serious_events uses MedDRA preferred terms which follow British
English spelling conventions. Common examples:
| Incorrect (American) | Correct (MedDRA/British) | |----------------------|--------------------------| | HEMORRHAGE | Haemorrhage | | ANEMIA | Anaemia | | EDEMA | Oedema | | DIARRHEA | Diarrhoea | | LEUKOPENIA | Leucopenia | | ESOPHAGITIS | Oesophagitis |
The adverse_event parameter should use the exact MedDRA preferred term spelling.
When in doubt, first query FAERS_count_reactions_by_drug_event to see the exact event
names as they appear in the FAERS database, then use those exact strings.
Additional FAERS notes:
adverse_event is now correctly appended to the OpenFDA query in _filter_serious_eventsFAERS_stratify_by_demographics: adverse_event is optional — when omitted, stratification covers all events for the drug. Sex codes: 0=Unknown, 1=Male, 2=FemaleSee SIGNAL_DETECTION.md for detailed disproportionality formulas and example output tables.
DailyMed_get_spl_by_setid(setid=...)PharmGKB_search_drugs(query=...) for clinical annotationsPGx Evidence Levels: | Level | Description | Action | |-------|-------------|--------| | 1A | CPIC/DPWG guideline, implementable | Follow guideline | | 1B | CPIC/DPWG guideline, annotation | Consider testing | | 2A | VIP annotation, moderate evidence | May inform | | 2B | VIP annotation, weaker evidence | Research | | 3 | Low-level annotation | Not actionable |
search_clinical_trials(intervention=..., phase="Phase 3", status="Completed")PubMed_search_articles(query='"[drug]" AND (safety OR adverse OR toxicity)')Signal Score = PRR x Severity_Weight x log10(Case_Count + 1)
Severity weights: Fatal=10, Life-threatening=8, Hospitalization=5, Disability=5, Other serious=3, Non-serious=1
Categorize signals:
Cross-check against mechanistic prediction: A signal not predicted mechanistically warrants additional scrutiny (possible confounding, reporting bias, or genuinely novel finding).
Save as [DRUG]_safety_report.md. See REPORT_TEMPLATES.md for the full report structure and example outputs.
| Tier | Criteria | Example | |------|----------|---------| | T1 | PRR >10, fatal outcomes, boxed warning | Lactic acidosis | | T2 | PRR 3-10, serious outcomes | Hepatotoxicity | | T3 | PRR 2-3, moderate concern | Hypoglycemia | | T4 | PRR <2, known/expected | GI side effects |
| Primary Tool | Fallback 1 | Fallback 2 |
|--------------|------------|------------|
| FAERS_count_reactions_by_drug_event | OpenFDA_search_drug_events | Literature search |
| DailyMed_search_spls | OpenFDA_search_drug_labels | DailyMed website |
| PharmGKB_search_drugs | CPIC_list_guidelines | Literature search |
| search_clinical_trials | ClinicalTrials.gov API | PubMed for trial results |
See CHECKLIST.md for the full phase-by-phase verification checklist.
tools
Post-market safety surveillance and recall/adverse-event RETRIEVAL across the full spectrum of FDA-regulated products that are NOT covered by the drug-AE signal skills: medical devices, food / dietary supplements / cosmetics, veterinary drugs, and drug supply (shortages). Orchestrates openFDA endpoints (MAUDE device adverse events + device recalls + 510(k), CAERS food/supplement/ cosmetic adverse events, veterinary adverse events, drug shortages, and cross-product enforcement/recall reports). USE WHEN the user asks: "are there adverse events for [device / pacemaker / infusion pump / insulin pump]", "device recalls for [firm/product]", "supplement / vitamin / cosmetic adverse reactions", "is [drug] in shortage", "what injectables are on shortage", "veterinary / animal adverse events for [drug] in [dog/cat/horse]", "food recall for listeria", "MAUDE report for [device]", "CAERS reactions for [brand]". DO NOT USE for drug adverse-event SIGNAL detection or disproportionality (PRR / ROR / IC) or drug-AE association scoring — that is `tooluniverse-pharmacovigilance` / `tooluniverse-adverse-event-detection`. This skill is multi-product surveillance and retrieval, not drug-AE statistical signal mining.
tools
--- name: tooluniverse-phewas description: Cross-ancestry / cross-biobank phenome-wide association (PheWAS) and replication. Given ONE variant (rsID) or ONE gene, look up every phenotype it associates with across European/UK (UKB-TOPMed), Finnish (FinnGen), Japanese (BioBank Japan), and Taiwanese (TPMI) biobanks, plus exome-wide gene-burden PheWAS (Genebass), then judge whether an association replicates across ancestries or is population-specific. Use whenever the user asks "what else is this va
tools
Dereplicate a putative natural product and assign its chemical taxonomy. Use to answer "is [compound] a known natural product", "what microbe/organism produces [compound]", "what chemical class is [compound]", "dereplicate this metabolite (by formula/exact mass/InChIKey/SMILES)", or "classify this molecule into ChemOnt". Searches NPAtlas for known microbial natural products (producing organism + literature reference), assigns the ChemOnt kingdom→superclass→class→subclass hierarchy via ClassyFire, resolves systematic IUPAC names to structure via OPSIN, and cross-references identity in PubChem. NOT for general drug/compound identity or ADMET (use tooluniverse-chemical-compound-retrieval / tooluniverse-small-molecule-discovery) and NOT for metabolomics pathway/enrichment analysis (use tooluniverse-metabolomics skills).
tools
Genome-ASSEMBLY discovery, QC, and replicon mapping for any organism (bacteria, archaea, fungi, and beyond) using NCBI Datasets. Resolves an organism name or taxid to assemblies, picks the reference/representative or best-quality assembly, pulls assembly QC metrics (total length, contig/scaffold N50, contig count, GC%, assembly level, RefSeq category), enumerates chromosomes and plasmids via per-replicon sequence reports, and compares candidate assemblies on quality. Use for "what genomes are available for [organism]", "assembly stats / N50 / GC content for [GCF_/GCA_ accession]", "how many plasmids does [strain] have", "compare assemblies for [species]", "find the reference genome for [taxon]", "is this assembly Complete Genome or just contigs". NOT for gene-level orthology/synteny (use tooluniverse-comparative-genomics), plant gene structure (use tooluniverse-plant-genomics), de novo assembly from raw reads (no tool exists), or taxonomy-only name/lineage lookups.