agentleFS
PharMolixPharMolix/OpenBioMed/skills/drug-drug-interaction-analysis/SKILL.md

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

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the PharMolix/OpenBioMed repository that our weekly crawl found: only 1 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

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.

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
  1. Distinctive:

    Always consult clinical resources for patient-specific decisions

    line 152

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 None

Step 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 interactions

Step 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 info

Step 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

CodeSeverityDescription
CIContraindicatedShould not be used together
PPrecautionMonitor closely; adjust if needed
CCautionBe 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

  1. Drug not found: Try alternative names or SMILES lookup via PubChem
  2. No interactions: May indicate no known DDIs or drugs not in database
  3. API timeout: Retry with exponential backoff; max 10 requests/second
  4. 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.