$npx -y skills add QSong-github/DrugClaw --skill repurposedrugsQuery the RepurposeDrugs single-agent drug repurposing database. Use whenever the user asks about drug-disease repurposing associations, clinical trial phases for repurposed drugs, or wants to look up any entity (drug name, disease name, NCT ID) in RepurposeDrugs.
| 1 | # RepurposeDrugs Query Skill |
| 2 | |
| 3 | Search canonical drug-disease repurposing rows. Auto-detects query type by pattern: |
| 4 | |
| 5 | | Input Pattern | Detected As | Match Logic | |
| 6 | |---|---|---| |
| 7 | | `34567890` | PMID | exact on `pmid` | |
| 8 | | anything else | free text | substring on `drug` OR `disease` | |
| 9 | |
| 10 | ## API |
| 11 | |
| 12 | | Function | Input | Returns | |
| 13 | |---|---|---| |
| 14 | | `load_data(path)` | CSV path | `list[dict]` | |
| 15 | | `search(rows, entity)` | single entity string | `list[dict]` | |
| 16 | | `search_batch(rows, entities)` | list of entity strings | `dict[str, list[dict]]` | |
| 17 | | `summarize(hits, entity)` | rows + label | compact text | |
| 18 | | `to_json(hits)` | rows | `list[dict]` | |
| 19 | |
| 20 | ## Usage |
| 21 | |
| 22 | See `if __name__ == "__main__"` block in `example.py` for runnable examples. |
| 23 | |
| 24 | ## Data |
| 25 | |
| 26 | - **Source**: RepurposeDrugs normalized full-package output |
| 27 | - **URL**: <https://repurposedrugs.org/> |
| 28 | - **Local file**: `repurposedrugs.csv` |
| 29 | - **Columns**: `drug`, `disease`, `score`, `status`, `pmid` |
| 30 | - **Path**: `resources_metadata/drug_repurposing/RepurposeDrugs/repurposedrugs.csv` |