$npx -y skills add QSong-github/DrugClaw --skill repodbQuery the RepoDB drug repurposing database. Use whenever the user asks about drug-disease associations, drug repurposing candidates, or wants to look up any entity (drug name, indication, DrugBank ID, UMLS CUI, NCT ID) in RepoDB.
| 1 | # RepoDB Query Skill |
| 2 | |
| 3 | Search RepoDB records by any entity. Auto-detects type by prefix: |
| 4 | |
| 5 | | Input Pattern | Detected As | Match Logic | |
| 6 | |---|---|---| |
| 7 | | `DB00584` | DrugBank ID | exact on `drugbank_id` | |
| 8 | | `C0020538` | UMLS CUI | exact on `ind_id` | |
| 9 | | `NCT00001234` | Trial ID | exact on `NCT` | |
| 10 | | anything else | free text | substring on `drug_name` OR `ind_name` | |
| 11 | |
| 12 | ## API |
| 13 | |
| 14 | | Function | Input | Returns | |
| 15 | |---|---|---| |
| 16 | | `load_repodb(path)` | CSV path | DataFrame | |
| 17 | | `search(df, entity)` | single entity string | DataFrame | |
| 18 | | `search_batch(df, entities)` | list of entity strings | dict[str, DataFrame] | |
| 19 | | `summarize(hits, entity)` | DataFrame + label | compact text | |
| 20 | | `to_json(hits)` | DataFrame | list[dict] | |
| 21 | |
| 22 | ## Usage |
| 23 | |
| 24 | See `if __name__ == "__main__"` block in `repodb_query.py` for runnable examples covering: drug name, DrugBank ID, UMLS CUI, indication name, batch search, and JSON output. |
| 25 | |
| 26 | ## Data |
| 27 | |
| 28 | - **Source**: `full.csv` (comma or tab separated, auto-detected) |
| 29 | - **Columns**: `drug_name`, `drugbank_id`, `ind_name`, `ind_id`, `NCT`, `status`, `phase`, `DetailedStatus` |
| 30 | - **Path**: `DATA_PATH` variable in `repodb_query.py` |