sciagent-skill-creator
Scaffold a new SciAgent-Skills entry. Picks pipeline/toolkit/database/guide template, creates skills/{category}/{name}/SKILL.md with valid frontmatter, appends…
Query FDA drug labels (DailyMed) via REST API. Search structured product labels (SPLs) by name, NDC, set ID, or RxCUI; get indications, dosage, warnings, adverse reactions, packaging. No auth. For adverse events use fda-database; for DDIs use ddinter-database.
$ npx -y skills add jaechang-hits/SciAgent-Skills --skill dailymed-database --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/dailymed-databaseContext preview
The summary Claude sees to decide when to auto-load this skill.
Query FDA drug labels (DailyMed) via REST API. Search structured product labels (SPLs) by name, NDC, set ID, or RxCUI; get indications, dosage, warnings, adverse reactions, packaging. No auth. For adverse events use fda-database; for DDIs use ddinter-database.
name: "dailymed-database" description: "Query FDA drug labels (DailyMed) via REST API. Search structured product labels (SPLs) by name, NDC, set ID, or RxCUI; get indications, dosage, warnings, adverse reactions, packaging. No auth. For adverse events use fda-database; for DDIs use ddinter-database." license: "CC0-1.0"
DailyMed is the National Library of Medicine's official repository of FDA-approved drug labeling information, containing 140,000+ structured product labels (SPLs) for prescription drugs, OTC medications, biologics, and vaccines. The REST API (v2) provides structured JSON/XML access to the full label content including indications, dosage, warnings, contraindications, adverse reactions, and packaging data — with no authentication required.
pip install requests pandas matplotlib
import requests
BASE = "https://dailymed.nlm.nih.gov/dailymed/services/v2"
# Search drug labels by name
r = requests.get(f"{BASE}/spls.json", params={"drug_name": "metformin", "pagesize": 5})
r.raise_for_status()
data = r.json()
print(f"Total labels found: {data['metadata']['total_elements']}")
for spl in data["data"][:3]:
print(f" {spl['title']!r:60s} setid={spl['setid']}")Search for structured product labels (SPLs) using drug name. Returns paginated list of matching labels with set IDs.
import requests
import pandas as pd
BASE = "https://dailymed.nlm.nih.gov/dailymed/services/v2"
def search_spls(drug_name, pagesize=20, page=1):
"""Search DailyMed SPLs by drug name. Returns list of label summaries."""
r = requests.get(f"{BASE}/spls.json",
params={"drug_name": drug_name, "pagesize": pagesize, "page": page},
timeout=15)
r.raise_for_status()
return r.json()
result = search_spls("atorvastatin", pagesize=10)
meta = result["metadata"]
print(f"Search: 'atorvastatin' → {meta['total_elements']} labels across {meta['total_pages']} pages")
df = pd.DataFrame(result["data"])
print(df[["setid", "title", "published_date"]].to_string(index=False))
# setid title published_date
# 8f6c7c7c-... ATORVASTATIN CALCIUM tablet 2024-03-15
# a4b7d3e1-... ATORVASTATIN CALCIUM tablet, film coated 2023-11-20Fetch the complete structured product label for a specific drug using its set ID. Returns all label sections including indications, warnings, dosage, and adverse reactions.
import requests
BASE = "https://dailymed.nlm.nih.gov/dailymed/services/v2"
def get_spl(setid):
"""Retrieve full SPL document by set ID. Returns label metadata and XML/JSON."""
r = requests.get(f"{BASE}/spls/{setid}.json", timeout=20)
r.raise_for_status()
return r.json()
# Use a known set ID from search results
setid = "8f6c7c7c-1f7f-4f1a-af86-8b2eef2a8b2c" # example atorvastatin label
label = get_spl(setid)
data = label["data"]
print(f"Title: {data.get('title')}")
print(f"Set ID: {data.get('setid')}")
print(f"Published: {data.get('published_date')}")
print(f"Version: {data.get('version')}")
# Access structured sections
if "sections" in data:
sections = data["sections"]
print(f"\nLabel sections ({len(sections)} total):")
for sec in sections[:5]:
print(f" [{sec.get('loinc_code', 'N/A')}] {sec.get('title', 'Untitled')}")Look up drug labels by National Drug Code (NDC) — useful when you have a product barcode or dispensing record.
import requests
BASE = "https://dailymed.nlm.nih.gov/dailymed/services/v2"
def search_by_ndc(ndc_code):
"""Find SPL by NDC code (formatted as XXXXX-XXXX-XX or without dashes)."""
r = requests.get(f"{BASE}/spls.json",
params={"ndc": ndc_code},
timeout=15)
r.raise_for_status()
return r.json()
# NDC for Lipitor 10mg (atorvastatin)
result = search_by_ndc("0071-0155-23")
if result["data"]:
spl = result["data"][0]
print(f"Drug: {spl['title']}")
print(f"Set ID: {spl['setid']}")
print(f"Published: {spl['published_date']}")
else:
print("No label found for this NDC")Get detailed packaging data (NDC codes, package types, quantities) for a specific drug label by set ID.
import requests
import pandas as pd
BASE = "https://dailymed.nlm.nih.gov/dailymed/services/v2"
def get_packaging(setid):
"""Retrieve packaging information for a label (NDC codes, dosage forms, quantities)."""
r = requests.get(f"{BASE}/spls/{setid}/packaging.jTurn your AI coding agent into a life sciences expert — 199 bioinformatics skills for Claude Code covering RNA-seq, single-cell analysis, genomics, proteomics, drug discovery, and more. Boosted BixBench from 65% to 92%. Open source.
Scaffold a new SciAgent-Skills entry. Picks pipeline/toolkit/database/guide template, creates skills/{category}/{name}/SKILL.md with valid frontmatter, appends…
Bayesian modeling with PyMC 5: priors, likelihood, NUTS/ADVI sampling, diagnostics (R-hat, ESS), LOO/WAIC comparison, prediction. Hierarchical, logistic, GP…
Time-to-event modeling with scikit-survival: Cox PH (elastic net), Random Survival Forests, Boosting, SVMs for censored data. C-index, Brier, time-dependent…
Guided statistical analysis: test choice, assumption checks, effect sizes, power, APA reporting. Pick tests, verify assumptions, or format results for…
Python statistical modeling: regression (OLS, WLS, GLM), discrete (Logit, Poisson, NegBin), time series (ARIMA, SARIMAX, VAR), with rigorous inference,…
DL cell/nucleus segmentation for fluorescence and brightfield microscopy. Pre-trained models (cyto3, nuclei, tissuenet) and a generalist flow-based algorithm…