$npx -y skills add QSong-github/DrugClaw --skill ddinterQuery the DDInter drug-drug interaction database. Use whenever the user asks about drug-drug interactions, DDI severity levels, or wants to look up interactions for a drug name or DDInter ID.
| 1 | # DDInter Query Skill |
| 2 | |
| 3 | Search DDInter interaction records by drug name or DDInter ID. Auto-detects input type: |
| 4 | |
| 5 | | Input Pattern | Detected As | Match Logic | |
| 6 | |---|---|---| |
| 7 | | `DDInter582` | DDInter ID | exact on `DDInterID_A` or `DDInterID_B` | |
| 8 | | anything else | drug name | exact then substring on `Drug_A` / `Drug_B` | |
| 9 | |
| 10 | ## API |
| 11 | |
| 12 | | Function | Input | Returns | |
| 13 | |---|---|---| |
| 14 | | `search(entity)` | drug name or DDInter ID | `list[dict]` | |
| 15 | | `search_batch(entities)` | list of entity strings | `dict[str, list[dict]]` | |
| 16 | | `get_interactions_between(drug_a, drug_b)` | two drug names | `list[dict]` | |
| 17 | | `summarize(hits, entity)` | hit list + label | compact text | |
| 18 | | `to_json(hits)` | hit list | `list[dict]` | |
| 19 | | `list_drugs()` | — | sorted unique drug names | |
| 20 | |
| 21 | ## Usage |
| 22 | |
| 23 | See `if __name__ == "__main__"` block in `20_DDInter.py` for runnable examples covering: single drug search, DDInter ID lookup, pairwise interaction check, batch search, and JSON output. |
| 24 | |
| 25 | ## Key Fields |
| 26 | |
| 27 | Each interaction row contains: `DDInterID_A`, `Drug_A`, `DDInterID_B`, `Drug_B`, `Level` (Major / Moderate / Minor). |
| 28 | |
| 29 | ## Data |
| 30 | |
| 31 | - **Source**: 8 CSV files partitioned by ATC code (`ddinter_downloads_code_{A,B,D,H,L,P,R,V}.csv`) |
| 32 | - **Path**: `resources_metadata/ddi/DDInter/` |
| 33 | - **Citation**: Xiong G, et al. *Nucleic Acids Res.* 2025;53(D1):D1356. DDInter 2.0. |