$npx -y skills add QSong-github/DrugClaw --skill drugs_com_reviewsQuery the DrugLib.com Drug Review Dataset (UCI #461). Use whenever the user asks about patient drug reviews, drug effectiveness ratings, side-effect profiles, or condition-specific treatment experiences from DrugLib.com.
| 1 | # DrugLib Reviews Query Skill |
| 2 | |
| 3 | Search patient drug reviews by drug name or medical condition. Auto-detects |
| 4 | entity type and routes to the appropriate field. |
| 5 | |
| 6 | | Input Pattern | Detected As | Match Logic | |
| 7 | |---|---|---| |
| 8 | | single/two-word term (e.g. `lamictal`) | drug name | substring on `urlDrugName` | |
| 9 | | multi-word or medical keyword (e.g. `bipolar disorder`) | condition | substring on `condition` | |
| 10 | |
| 11 | Condition keywords that trigger condition routing: disease, disorder, syndrome, |
| 12 | infection, pain, cancer, diabetes, hypertension, depression, anxiety, asthma, |
| 13 | arthritis, migraine, allergy, insomnia, nausea, obesity, acne, gerd, copd. |
| 14 | |
| 15 | ## API |
| 16 | |
| 17 | | Function | Input | Returns | |
| 18 | |---|---|---| |
| 19 | | `load_reviews()` | — | list[dict] (cached) | |
| 20 | | `search(entity)` | single entity string | list[dict] | |
| 21 | | `search_batch(entities)` | list of entity strings | dict[str, list[dict]] | |
| 22 | | `summarize(hits, entity)` | list[dict] + label | compact LLM-readable text | |
| 23 | | `to_json(hits)` | list[dict] | list[dict] (JSON-serialisable) | |
| 24 | |
| 25 | ## Usage |
| 26 | |
| 27 | See `if __name__ == "__main__"` block in `16_DRUGLIB_REVIEWS.py` for runnable |
| 28 | examples covering: drug name search, condition search, batch search, and JSON |
| 29 | output. |
| 30 | |
| 31 | ## Data |
| 32 | |
| 33 | - **Source**: Drug Review Dataset (Druglib.com), UCI ML Repository #461 |
| 34 | - **Citation**: Kallumadi, S. & Gräßer, F. (2018). *Drug Reviews (Druglib.com)* [Dataset]. UCI Machine Learning Repository. https://doi.org/10.24432/C55G6J |
| 35 | - **License**: CC BY 4.0 |
| 36 | - **Files**: `drugLibTrain_raw.tsv`, `drugLibTest_raw.tsv` (TSV, merged at load) |
| 37 | - **Path**: `DATA_DIR` variable in `16_DRUGLIB_REVIEWS.py` |
| 38 | - **Columns**: |
| 39 | |
| 40 | | Column | Type | Description | |
| 41 | |---|---|---| |
| 42 | | `urlDrugName` | str | Drug name (lowercase, URL-style) | |
| 43 | | `rating` | int 0–9 | Overall patient satisfaction | |
| 44 | | `effectiveness` | str | Highly / Considerably / Moderately / Marginally Effective, Ineffective | |
| 45 | | `sideEffects` | str | No / Mild / Moderate / Severe / Extremely Severe Side Effects | |
| 46 | | `condition` | str | Medical condition being treated | |
| 47 | | `benefitsReview` | str | Free-text review of benefits | |
| 48 | | `sideEffectsReview` | str | Free-text review of side effects | |
| 49 | | `commentsReview` | str | Free-text general comments | |