drug-drug-interaction-analysis
Skill1.1k starsChanged 8 months agoMITView on GitHub
Analyze potential drug-drug interactions (DDI) for up to 5 drugs using KEGG DDI database. Use this skill when: (1) Checking interactions between multiple medications, (2) Assessing DDI risk for drug combinations, (3) Understanding interaction mechanisms and severity, (4) Analyzing CYP enzyme involvement in DDIs.
Trending
Quiet this year.thin dataabout the whole repository
Who's talking about PharMolix/OpenBioMed
The biggest 1 of 1 mention linking to the repository that our crawl found. Each line is their own headline.
In this repository45 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- admet-predictionSkill
- antibody-design-iggmSkill
- antibody-structure-prediction-tfoldSkill
- binding-affinity-prediction-prodigySkill
- biomedical-literature-searchSkill
- biomed-skill-creatorSkill
- biomed-skill-routerSkill
- cellxgene-census-querySkill
- chembl-querySkill
- disease-drug-intelligenceSkill
- drug-candidate-discoverySkill
- drug-lead-analysisSkill
- functional-protein-designSkill
- iupac-name-identification-biot5Skill
- kegg-querySkill
- molecule-biochemical-significance-query-biot5Skill
- mutation-design-aavSkill
- mutation-design-gfpSkill
- ppi-string-querySkill
- protein-function-predictionSkill
- protein-ligand-binding-analysis-plipSkill
- protein-mutation-analysisSkill
- protein-structure-design-boltzgenSkill
- protein-subcellular-localization-prediction-biot5Skill
- pubchem-querySkill
- retrosynthesis-planningSkill
- similar-protein-retrievalSkill
- single-cell-atac-seq-peak-calling-annotaionSkill
- single-cell-atac-seq-qc-processingSkill
- single-cell-foundation-model-geneformerSkill
- single-cell-foundation-model-langcellSkill
- single-cell-foundation-model-scgptSkill
- single-cell-multi-omics-analysis-scviSkill
- single-cell-multi-omics-data-harmonizationSkill
- single-cell-proteomics-data-processingSkill
- single-cell-proteomics-peptide-identificationSkill
- single-cell-scrna-seq-analysis-scanpySkill
- single-cell-foundation-model-stofmSkill
- spatial-transcriptomics-spatial-data-ioSkill
- structure-prediction-boltz-2Skill
- target-based-lead-designSkill
- target-drug-reportSkill
- text-based-molecule-editingSkill
- uniprot-querySkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 152
Always consult clinical resources for patient-specific decisions
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Drug-Drug Interaction Analysis
Analyze potential drug-drug interactions (DDI) for medication safety assessment.
When to Use
- Checking interactions between prescribed medications
- Evaluating DDI risk for polypharmacy patients
- Understanding interaction mechanisms (CYP enzymes, shared targets)
- Clinical decision support for drug combinations
Workflow
Step 1: Resolve Drug Names to KEGG IDs
import requests
KEGG_API = "https://rest.kegg.jp"
def find_drug_id(drug_name: str) -> str:
"""Find KEGG drug ID from drug name."""
response = requests.get(f"{KEGG_API}/find/drug/{drug_name}")
if response.ok and response.text.strip():
# Parse first result: "dr:D00109\tAspirin..."
line = response.text.strip().split('\n')[0]
return line.split('\t')[0] # Returns "dr:D00109"
return NoneStep 2: Query KEGG DDI API
def get_ddi(drug_ids: list) -> list:
"""Query KEGG DDI for multiple drugs."""
ids = "+".join(drug_ids)
response = requests.get(f"{KEGG_API}/ddi/{ids}")
interactions = []
for line in response.text.strip().split('\n'):
if line:
parts = line.split('\t')
interactions.append({
"drug_a": parts[0],
"drug_b": parts[1],
"severity": parts[2],
"mechanism": parts[3] if len(parts) > 3 else ""
})
return interactionsStep 3: Get Detailed Drug Information
def get_drug_info(drug_id: str) -> dict:
"""Get detailed drug information from KEGG."""
response = requests.get(f"{KEGG_API}/get/{drug_id}")
info = {"id": drug_id, "targets": [], "enzymes": []}
for line in response.text.split('\n'):
if line.startswith("NAME"):
info["name"] = line.split(maxsplit=1)[1].strip()
elif line.startswith("TARGET"):
info["targets"].append(line.split(maxsplit=1)[1])
elif line.startswith("METABOLISM"):
info["enzymes"].append(line.split(maxsplit=1)[1])
return infoStep 4: Analyze and Report
def analyze_ddi(drugs: list) -> dict:
"""Full DDI analysis workflow."""
# Resolve drug IDs
drug_ids = [find_drug_id(d) for d in drugs]
# Get interactions
interactions = get_ddi([d.replace("dr:", "") for d in drug_ids if d])
# Get drug details for context
drug_info = {d: get_drug_info(d) for d in drug_ids if d}
return {
"drugs_analyzed": drugs,
"drug_ids": drug_ids,
"interactions": interactions,
"drug_details": drug_info
}Expected Outputs
Interaction Result Structure
{
"drugs_analyzed": ["aspirin", "ibuprofen"],
"total_pairs": 1,
"interactions_found": 1,
"results": [
{
"drug_a": "Aspirin (D00109)",
"drug_b": "Ibuprofen (D00126)",
"severity": "Precaution (P)",
"mechanism": "Shared target: PTGS1 PTGS2 (COX enzymes)",
"clinical_note": "Ibuprofen may interfere with aspirin's antiplatelet effect"
}
]
}Severity Levels
| Code | Severity | Description |
| CI | Contraindicated | Should not be used together |
| P | Precaution | Monitor closely; adjust if needed |
| C | Caution | Be aware; may need intervention |
Mechanism Types
- Target overlap: Both drugs act on same protein targets
- CYP interaction: One drug affects metabolism of another
- Pharmacodynamic: Additive or opposing effects
- Pharmacokinetic: Absorption/distribution/excretion effects
Error Handling
- Drug not found: Try alternative names or SMILES lookup via PubChem
- No interactions: May indicate no known DDIs or drugs not in database
- API timeout: Retry with exponential backoff; max 10 requests/second
- Invalid input: Validate drug names/SMILES before processing
Limitations
- KEGG DDI covers approved drugs only
- Novel compounds require predictive models (Way2Drug DDI-Pred)
- Severity classifications are database-defined
- Always consult clinical resources for patient-specific decisions
References
- KEGG DDI API: https://rest.kegg.jp/ddi/
- KEGG Drug Database: https://www.kegg.jp/kegg/drug/
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

