Pubchem Database
davila7/claude-code-templates
Query PubChem via PUG-REST API/PubChemPy (110M+ compounds). An agent skill from davila7/claude-code-templates.
Query FDA drug labels (DailyMed) via REST API. An agent skill from jaechang-hits/SciAgent-Skills.
$ npx skills add jaechang-hits/SciAgent-Skills --skill dailymed-database -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jaechang-hits/SciAgent-Skills dailymed-database --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/jaechang-hits/SciAgent-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/structural-biology-drug-discovery/dailymed-database .claude/skills/dailymed-database && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "dailymed-database" agent skill from https://github.com/jaechang-hits/SciAgent-Skills/tree/main/skills/structural-biology-drug-discovery/dailymed-database into .claude/skills/dailymed-database/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dailymed-database", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/jaechang-hits/SciAgent-Skills/tree/main/skills/structural-biology-drug-discovery/dailymed-databaseType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add jaechang-hits/SciAgent-Skills --skill dailymed-database -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jaechang-hits/SciAgent-Skills dailymed-database --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jaechang-hits/SciAgent-Skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/structural-biology-drug-discovery/dailymed-database .agents/skills/dailymed-database && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "dailymed-database" agent skill from https://github.com/jaechang-hits/SciAgent-Skills/tree/main/skills/structural-biology-drug-discovery/dailymed-database into .agents/skills/dailymed-database/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dailymed-database", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jaechang-hits/SciAgent-Skills --skill dailymed-database -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jaechang-hits/SciAgent-Skills dailymed-database --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jaechang-hits/SciAgent-Skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/structural-biology-drug-discovery/dailymed-database .cursor/skills/dailymed-database && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "dailymed-database" agent skill from https://github.com/jaechang-hits/SciAgent-Skills/tree/main/skills/structural-biology-drug-discovery/dailymed-database into .cursor/skills/dailymed-database/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dailymed-database", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/jaechang-hits/SciAgent-Skills.git --path skills/structural-biology-drug-discovery/dailymed-database--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add jaechang-hits/SciAgent-Skills --skill dailymed-database -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jaechang-hits/SciAgent-Skills dailymed-database --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jaechang-hits/SciAgent-Skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/structural-biology-drug-discovery/dailymed-database .gemini/skills/dailymed-database && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "dailymed-database" agent skill from https://github.com/jaechang-hits/SciAgent-Skills/tree/main/skills/structural-biology-drug-discovery/dailymed-database into .gemini/skills/dailymed-database/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dailymed-database", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install jaechang-hits/SciAgent-Skills dailymed-databaseInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add jaechang-hits/SciAgent-Skills --skill dailymed-database -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jaechang-hits/SciAgent-Skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/structural-biology-drug-discovery/dailymed-database .github/skills/dailymed-database && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "dailymed-database" agent skill from https://github.com/jaechang-hits/SciAgent-Skills/tree/main/skills/structural-biology-drug-discovery/dailymed-database into .github/skills/dailymed-database/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dailymed-database", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jaechang-hits/SciAgent-Skills --skill dailymed-database -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jaechang-hits/SciAgent-Skills dailymed-database --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jaechang-hits/SciAgent-Skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/structural-biology-drug-discovery/dailymed-database .opencode/skills/dailymed-database && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "dailymed-database" agent skill from https://github.com/jaechang-hits/SciAgent-Skills/tree/main/skills/structural-biology-drug-discovery/dailymed-database into .opencode/skills/dailymed-database/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dailymed-database", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
dailymed-databaseQuery FDA drug labels (DailyMed) via REST API. An agent skill from jaechang-hits/SciAgent-Skills.
Dailymed Database is an agent skill from jaechang-hits/SciAgent-Skills. 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.
Its SKILL.md is about 6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Research & Science, covering REST APIs, Drug discovery and cheminformatics and Protein structure and design. The repository describes itself as: 197 bioinformatics & life science skills for Claude Code and AI agents — BixBench 92.0% accuracy. RNA-seq, single-cell, drug discovery, proteomics, and more. Powers OmicsHorizon. The licence is CC0-1.0.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 82c862c. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
pipFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
dailymed.nlm.nih.govAlso links to:
hl7.orgloinc.orgFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Dailymed Database loads about 6k tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 1,141 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from jaechang-hits/SciAgent-Skills at commit 82c862c, republished under its CC0-1.0 licence (© jaechang-hits). 1,141 words, ~6,003 tokens.
.claude/skills/dailymed-database/SKILL.md (or your agent's skills folder).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.
fda-database instead; DailyMed contains label text, not post-market safety signalsddinter-database; DailyMed label text is unstructured for interactionsrequests, pandas, matplotlibtime.sleep(0.3) in batch loopspip install requests pandas matplotlibimport 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.json", timeout=15)
r.raise_for_status()
return r.json()
setid = "8f6c7c7c-1f7f-4f1a-af86-8b2eef2a8b2c" # example setid
pkg = get_packaging(setid)
if pkg["data"]:
packages = pkg["data"]
print(f"Packaging variants: {len(packages)}")
df = pd.DataFrame(packages)
# Common fields: ndc, dosage_form, route, marketing_status
for col in ["ndc", "dosage_form", "route", "marketing_status"]:
if col in df.columns:
print(f"\n{col.upper()}:")
print(df[col].value_counts().head(5))Retrieve drug labels using RxNorm Concept Unique Identifier (RxCUI) for integration with RxNorm-based clinical systems.
import requests
import time
BASE = "https://dailymed.nlm.nih.gov/dailymed/services/v2"
def get_spls_by_rxcui(rxcui):
"""Get all SPLs associated with an RxCUI. Returns list of set IDs and titles."""
r = requests.get(f"{BASE}/rxcuis/{rxcui}/spls.json", timeout=15)
r.raise_for_status()
return r.json()
# RxCUI for atorvastatin: 83367
rxcui = "83367"
result = get_spls_by_rxcui(rxcui)
print(f"SPLs for RxCUI {rxcui} (atorvastatin):")
for spl in result["data"][:5]:
print(f" {spl['setid']} | {spl['title'][:70]}")
print(f" Total: {result['metadata']['total_elements']} labels")List all standardized drug names in DailyMed — useful for name normalization and autocomplete in drug lookup pipelines.
import requests
BASE = "https://dailymed.nlm.nih.gov/dailymed/services/v2"
def search_drug_names(query, pagesize=20):
"""Search the DailyMed drug name index for name normalization."""
r = requests.get(f"{BASE}/drugnames.json",
params={"drug_name": query, "pagesize": pagesize},
timeout=15)
r.raise_for_status()
return r.json()
result = search_drug_names("metformin")
print(f"Drug name matches for 'metformin': {result['metadata']['total_elements']}")
for entry in result["data"][:8]:
print(f" {entry['drug_name']}")
# METFORMIN HYDROCHLORIDE
# METFORMIN HYDROCHLORIDE AND SITAGLIPTIN PHOSPHATE
# METFORMIN HYDROCHLORIDE AND SAXAGLIPTINExtract specific label sections (e.g., indications, warnings) from multiple drug labels for comparative analysis.
import requests
import time
import pandas as pd
BASE = "https://dailymed.nlm.nih.gov/dailymed/services/v2"
# LOINC codes for common SPL sections
SECTION_LOINC = {
"34067-9": "Indications and Usage",
"34068-7": "Dosage and Administration",
"34071-1": "Warnings",
"34084-4": "Adverse Reactions",
"34070-3": "Contraindications",
"43685-7": "Warnings and Precautions",
}
def get_label_sections(setid):
"""Extract structured sections from an SPL by set ID."""
r = requests.get(f"{BASE}/spls/{setid}.json", timeout=20)
r.raise_for_status()
data = r.json()["data"]
sections = {}
for sec in data.get("sections", []):
loinc = sec.get("loinc_code")
if loinc in SECTION_LOINC:
sections[SECTION_LOINC[loinc]] = sec.get("text", "")
return sections
# Get indications for two statin labels
statins = [
("Atorvastatin", "8f6c7c7c-1f7f-4f1a-af86-8b2eef2a8b2c"),
("Rosuvastatin", "a3b2c4d5-1234-5678-abcd-ef0123456789"), # example
]
records = []
for drug_name, setid in statins:
try:
sections = get_label_sections(setid)
records.append({"drug": drug_name, "indications_length": len(sections.get("Indications and Usage", ""))})
except Exception as e:
print(f"Warning: {drug_name} failed — {e}")
time.sleep(0.3)
df = pd.DataFrame(records)
print(df.to_string(index=False))An SPL is the official FDA-approved drug label in XML format, structured using Health Level 7 (HL7) Clinical Document Architecture (CDA). Each unique drug product label has a globally unique set ID (UUID format). Multiple versions of the same label share the same set ID but have different version numbers. Always use the most recent published version for current prescribing information.
DailyMed SPLs use standardized LOINC codes to identify label sections, enabling consistent programmatic extraction across all labels:
| LOINC Code | Section Name |
|---|---|
34067-9 | Indications and Usage |
34068-7 | Dosage and Administration |
34070-3 | Contraindications |
34071-1 | Warnings |
43685-7 | Warnings and Precautions |
34084-4 | Adverse Reactions |
34073-7 | Drug Interactions |
34076-0 | Patient Counseling Information |
42229-5 | Mechanism of Action |
34069-5 | How Supplied/Storage |
National Drug Codes (NDCs) identify drug products with a three-segment numeric format: labeler-product-package (e.g., 0071-0155-23). NDCs can also appear without dashes in some systems. DailyMed accepts both formats in API queries.
Goal: Retrieve and compare label content for all formulations of an active ingredient — useful for generic vs. brand name comparison.
import requests
import time
import pandas as pd
BASE = "https://dailymed.nlm.nih.gov/dailymed/services/v2"
def search_spls(drug_name, pagesize=50):
r = requests.get(f"{BASE}/spls.json",
params={"drug_name": drug_name, "pagesize": pagesize},
timeout=15)
r.raise_for_status()
return r.json()
def get_packaging(setid):
r = requests.get(f"{BASE}/spls/{setid}/packaging.json", timeout=15)
r.raise_for_status()
return r.json()
# Search for all metformin labels
result = search_spls("metformin", pagesize=20)
labels = result["data"]
print(f"Found {len(labels)} metformin labels")
rows = []
for label in labels[:10]: # limit for demo
setid = label["setid"]
try:
pkg = get_packaging(setid)
for item in pkg["data"][:2]:
rows.append({
"title": label["title"][:60],
"setid": setid,
"ndc": item.get("ndc"),
"dosage_form": item.get("dosage_form"),
"route": item.get("route"),
"marketing_status": item.get("marketing_status"),
"published_date": label.get("published_date"),
})
except Exception as e:
print(f"Skipping {setid}: {e}")
time.sleep(0.3)
df = pd.DataFrame(rows)
print(f"\nFormulations with packaging data: {len(df)}")
print(df[["title", "dosage_form", "route", "marketing_status"]].drop_duplicates().to_string(index=False))
df.to_csv("metformin_formulations.csv", index=False)
print("\nSaved: metformin_formulations.csv")Goal: Systematically extract structured warning and adverse reaction text from a set of drug labels for pharmacovigilance research.
import requests
import time
import pandas as pd
BASE = "https://dailymed.nlm.nih.gov/dailymed/services/v2"
TARGET_SECTIONS = {
"34071-1": "Warnings",
"43685-7": "Warnings_and_Precautions",
"34084-4": "Adverse_Reactions",
"34070-3": "Contraindications",
}
def search_and_get_sections(drug_name, max_labels=5):
"""Search for labels and extract safety-relevant sections."""
search_r = requests.get(f"{BASE}/spls.json",
params={"drug_name": drug_name, "pagesize": max_labels},
timeout=15)
search_r.raise_for_status()
labels = search_r.json()["data"][:max_labels]
records = []
for label in labels:
setid = label["setid"]
try:
label_r = requests.get(f"{BASE}/spls/{setid}.json", timeout=20)
label_r.raise_for_status()
spl_data = label_r.json()["data"]
row = {"drug_name": drug_name, "title": label["title"][:80], "setid": setid}
for loinc, col in TARGET_SECTIONS.items():
text = ""
for sec in spl_data.get("sections", []):
if sec.get("loinc_code") == loinc:
text = sec.get("text", "")[:500] # first 500 chars
break
row[col] = text
records.append(row)
except Exception as e:
print(f" Skipping {setid}: {e}")
time.sleep(0.3)
return pd.DataFrame(records)
# Compare safety sections across ACE inhibitor labels
drugs = ["lisinopril", "enalapril"]
all_records = []
for drug in drugs:
print(f"Processing: {drug}")
df = search_and_get_sections(drug, max_labels=3)
all_records.append(df)
combined = pd.concat(all_records, ignore_index=True)
print(f"\nExtracted safety sections: {len(combined)} labels")
print(combined[["drug_name", "title"]].to_string(index=False))
combined.to_csv("ace_inhibitor_safety_sections.csv", index=False)
print("Saved: ace_inhibitor_safety_sections.csv")Goal: Query multiple drugs in a class, count their labeled formulations, and visualize the distribution.
import requests
import time
import pandas as pd
import matplotlib.pyplot as plt
BASE = "https://dailymed.nlm.nih.gov/dailymed/services/v2"
def count_labels(drug_name):
"""Return total SPL count for a drug name."""
r = requests.get(f"{BASE}/spls.json",
params={"drug_name": drug_name, "pagesize": 1},
timeout=15)
r.raise_for_status()
return r.json()["metadata"]["total_elements"]
# Count labels for common statins
statins = {
"atorvastatin": "Atorvastatin",
"rosuvastatin": "Rosuvastatin",
"simvastatin": "Simvastatin",
"pravastatin": "Pravastatin",
"lovastatin": "Lovastatin",
"fluvastatin": "Fluvastatin",
"pitavastatin": "Pitavastatin",
}
counts = {}
for query, label in statins.items():
try:
counts[label] = count_labels(query)
print(f" {label}: {counts[label]} labels")
except Exception as e:
print(f" {label}: error — {e}")
time.sleep(0.3)
# Visualization
df = pd.DataFrame(list(counts.items()), columns=["Drug", "Label_Count"])
df = df.sort_values("Label_Count", ascending=True)
fig, ax = plt.subplots(figsize=(9, 5))
bars = ax.barh(df["Drug"], df["Label_Count"], color="#2196F3", edgecolor="white")
ax.bar_label(bars, fmt="%d", padding=4, fontsize=9)
ax.set_xlabel("Number of DailyMed SPL Entries")
ax.set_title("DailyMed: FDA Drug Label Count by Statin\n(includes brand + generic formulations)")
ax.set_xlim(0, df["Label_Count"].max() * 1.15)
plt.tight_layout()
plt.savefig("statin_label_counts.png", dpi=150, bbox_inches="tight")
print(f"Saved: statin_label_counts.png (total labels: {df['Label_Count'].sum()})")| Parameter | Endpoint | Default | Range / Options | Effect |
|---|---|---|---|---|
drug_name | /spls, /drugnames | — | any drug name string | Filter labels by drug name (partial match supported) |
ndc | /spls | — | NDC code string | Filter labels by National Drug Code |
pagesize | /spls, /drugnames | 20 | 1–100 | Results per page; max 100 |
page | /spls, /drugnames | 1 | positive integer | Page number for pagination |
setid | /spls/{setid}, /spls/{setid}/packaging | — | UUID string | Unique label identifier; required for direct access |
rxcui | /rxcuis/{rxcui}/spls | — | RxNorm concept ID | Look up labels by RxCUI for clinical system integration |
format | any endpoint | json | json, xml | Response format; JSON is default and preferred |
Resolve set IDs before batch processing: Use the /spls search to get set IDs, then fetch full labels by set ID. Do not construct set IDs from drug names — they are UUID identifiers assigned by FDA.
Add time.sleep(0.3) in batch loops: DailyMed has no published rate limits but is public NIH infrastructure. Polite delays prevent throttling.
import time
for drug in drug_list:
result = search_spls(drug)
time.sleep(0.3) # 200 requests/minute safe upper boundUse LOINC codes for section extraction, not text parsing: Label sections are indexed by LOINC code, providing consistent section access across all SPL documents without brittle regex on section headers.
Pagination for comprehensive results: The default pagesize=20 may miss formulations. Use metadata["total_elements"] to detect if pagination is needed:
meta = result["metadata"]
total_pages = meta["total_pages"]
if total_pages > 1:
for p in range(2, total_pages + 1):
result = search_spls(drug_name, page=p)Prefer RxCUI for clinical integration: When integrating with clinical systems (EHR, dispensing), use RxCUI-based lookups (/rxcuis/{rxcui}/spls) for standardized, unambiguous drug identification.
When to use: Quickly determine whether a drug carries the FDA's strongest warning level.
import requests
BASE = "https://dailymed.nlm.nih.gov/dailymed/services/v2"
BLACK_BOX_LOINC = "34066-1"
def has_black_box_warning(setid):
"""Return True and warning text if drug label has a black box (boxed) warning."""
r = requests.get(f"{BASE}/spls/{setid}.json", timeout=20)
r.raise_for_status()
sections = r.json()["data"].get("sections", [])
for sec in sections:
if sec.get("loinc_code") == BLACK_BOX_LOINC:
return True, sec.get("text", "")[:300]
return False, ""
# Example: check warfarin label
setid = "8b7c3d4e-5678-90ab-cdef-1234567890ab" # example warfarin setid
has_warning, text = has_black_box_warning(setid)
print(f"Black box warning: {has_warning}")
if has_warning:
print(f"Warning text (first 300 chars): {text}")When to use: Retrieve all matching labels for a drug when total count exceeds one page.
import requests
import time
BASE = "https://dailymed.nlm.nih.gov/dailymed/services/v2"
def search_all_spls(drug_name, pagesize=100, delay=0.3):
"""Retrieve all SPLs for a drug name across multiple pages."""
all_labels = []
page = 1
while True:
r = requests.get(f"{BASE}/spls.json",
params={"drug_name": drug_name, "pagesize": pagesize, "page": page},
timeout=15)
r.raise_for_status()
data = r.json()
all_labels.extend(data["data"])
if page >= data["metadata"]["total_pages"]:
break
page += 1
time.sleep(delay)
return all_labels
labels = search_all_spls("ibuprofen")
print(f"Total ibuprofen labels: {len(labels)}")When to use: Build a flat reference table of drug labels for offline analysis.
import requests
import pandas as pd
BASE = "https://dailymed.nlm.nih.gov/dailymed/services/v2"
def export_drug_labels(drug_name, pagesize=50):
"""Export label summaries for a drug name to DataFrame."""
r = requests.get(f"{BASE}/spls.json",
params={"drug_name": drug_name, "pagesize": pagesize},
timeout=15)
r.raise_for_status()
data = r.json()
df = pd.DataFrame(data["data"])
df["drug_query"] = drug_name
return df, data["metadata"]["total_elements"]
df, total = export_drug_labels("amoxicillin")
print(f"Retrieved {len(df)} of {total} amoxicillin labels")
df[["setid", "title", "published_date"]].to_csv("amoxicillin_labels.csv", index=False)
print(f"Saved: amoxicillin_labels.csv (columns: {list(df.columns[:5])})")| Problem | Cause | Solution |
|---|---|---|
404 Not Found on /spls/{setid} | Invalid or retired set ID | Re-search by drug name to get current set IDs |
Empty data list from search | Drug name not matching any labels | Try shorter name (e.g., "metformin" not "metformin HCl tablets"); check spelling |
| Missing sections in SPL JSON | Older labels may not have all LOINC-coded sections | Check len(sections) before iterating; fall back to XML format for legacy labels |
ConnectionError / timeout | DailyMed server overload | Retry with exponential backoff; increase timeout=30 |
| Pagination returning duplicates | Page boundary race condition | De-duplicate results by setid after all pages collected |
| Packaging endpoint returns empty | Label exists but has no packaging records | Some biologics and vaccines lack packaging data; use label data directly |
| RxCUI lookup returns no results | RxCUI not mapped in DailyMed | Verify RxCUI via RxNorm API before querying; some experimental drugs are not mapped |
fda-database — openFDA for adverse event reports (FAERS), drug recalls, and enforcement actionsddinter-database — drug-drug interaction severity and mechanisms from DDInterdrugbank-database-access — comprehensive drug information including targets, pathways, and chemical propertiesclinicaltrials-database-search — ClinicalTrials.gov for clinical trial data on drugs© jaechang-hits, CC0-1.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/structural-biology-drug-discovery/dailymed-database of jaechang-hits/SciAgent-Skills.
Open the folder on GitHubat commit 82c862c
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in jaechang-hits/SciAgent-Skills, which our catalogue first saw on October 7, 2026.
Dailymed Database next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Dailymed Database this skilljaechang-hits/SciAgent-Skills | 374 | 1 repos | ~6k | Automated safety check: Pass | CC0-1.0 | |
| Pubchem Databasedavila7/claude-code-templates | 33k | 11 repos | ~4.1k | Automated safety check: Pass | MIT | |
| DiffDock Molecular DockingK-Dense-AI/scientific-agent-skills | 48k | 1 repos | ~3k | Automated safety check: Notes | MIT | |
| Biopipelineslocbp-uzh/biopipelines | 109 | — | ~2.4k | Automated safety check: Pass | MIT | |
| Pdb Databasedavila7/claude-code-templates | 33k | 9 repos | ~2.3k | Automated safety check: Pass | MIT | |
| Tooluniverseynulihao/AgentSkillOS | 618 | 2 repos | ~2.5k | Automated safety check: Pass | None |
davila7/claude-code-templates
Query PubChem via PUG-REST API/PubChemPy (110M+ compounds). An agent skill from davila7/claude-code-templates.
K-Dense-AI/scientific-agent-skills
Predicts how small molecules bind to a protein with DiffDock, covering batch docking, pose ranking by confidence and checks on the results; not for binding affinity.
locbp-uzh/biopipelines
Design and run computational protein and ligand workflows on a GPU: binder and enzyme design, de novo backbone generation, inverse folding and sequence redesign, structure prediction, protein-ligand…
davila7/claude-code-templates
Access RCSB PDB for 3D protein/nucleic acid structures. An agent skill from davila7/claude-code-templates.
ynulihao/AgentSkillOS
A skill your agent uses when working with scientific research tools and workflows across bioinformatics, cheminformatics, genomics, structural biology, proteomics, and drug discovery.
JimLiu/science-skills
Structure prediction for protein, nucleic-acid, and small-molecule complexes with the Chai-1 foundation model (Chai Discovery 2024, github.com/chaidiscovery/chai-lab).
jaechang-hits/SciAgent-Skills
NEB-IRC activation energy pipeline for reaction barriers using GFN2-xTB and pysisyphus.
jaechang-hits/SciAgent-Skills
3Dmol.js WebGL molecular visualization emitted as self-contained HTML.
jaechang-hits/SciAgent-Skills
Constraint-based (COBRA) analysis of genome-scale metabolic models: FBA, FVA, knockouts, flux sampling, production envelopes, gapfilling, media optimization.
jaechang-hits/SciAgent-Skills
Read, write, and edit ChemDraw CDX/CDXML files with RDKit's rdkit.Chem.rdChemDraw plus direct XML editing, always paired with a rendered PNG.
jaechang-hits/SciAgent-Skills
Programmatic PubMed access via NCBI E-utilities REST API. An agent skill from jaechang-hits/SciAgent-Skills.
jaechang-hits/SciAgent-Skills
Scaffold a new SciAgent-Skills entry. An agent skill from jaechang-hits/SciAgent-Skills.
Categories
Query FDA drug labels (DailyMed) via REST API. An agent skill from jaechang-hits/SciAgent-Skills. Dailymed Database is an agent skill from jaechang-hits/SciAgent-Skills. Query FDA drug labels (DailyMed) via REST API.
Dailymed Database fits situations like: tasks that involve REST APIs; tasks that involve Drug discovery and cheminformatics; tasks that involve Protein structure and design.
Run `npx skills add jaechang-hits/SciAgent-Skills --skill dailymed-database -a claude-code`. Or copy the skill folder (skills/structural-biology-drug-discovery/dailymed-database in jaechang-hits/SciAgent-Skills) into .claude/skills/dailymed-database in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jaechang-hits/SciAgent-Skills --skill dailymed-database -a codex`. Or copy the skill folder (skills/structural-biology-drug-discovery/dailymed-database in jaechang-hits/SciAgent-Skills) into .agents/skills/dailymed-database in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jaechang-hits/SciAgent-Skills --skill dailymed-database -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dailymed-database, .gemini/skills/dailymed-database, .github/skills/dailymed-database and .opencode/skills/dailymed-database in your project.
Going by SKILL.md and its folder, Dailymed Database needs the command-line tools its instructions call (pip). Our summary lists: Python 3.
SKILL.md names 3 domains. In commands or code: dailymed.nlm.nih.gov; the agent is likely to contact it when it follows the instructions. As links in the text: hl7.org and loinc.org. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Dailymed Database is published under the CC0-1.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 6k tokens (SKILL.md is roughly 24k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Dailymed Database: Pubchem Database (davila7/claude-code-templates, 33k stars), DiffDock Molecular Docking (K-Dense-AI/scientific-agent-skills, 48k stars), Biopipelines (locbp-uzh/biopipelines, 109 stars) and Pdb Database (davila7/claude-code-templates, 33k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
jaechang-hits (a GitHub user) maintains it in jaechang-hits/SciAgent-Skills, which has 374 GitHub stars. The repository holds 169 skills in this directory. The repository was last updated on September 29, 2026.
Source: jaechang-hits/SciAgent-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.