$npx -y skills add QSong-github/DrugClaw --skill webmdQuery the WebMD Drug Reviews dataset (~362 k patient reviews, 2007–2020). Use whenever the user asks about patient-reported drug effectiveness, ease of use, satisfaction ratings, side effects, or reviews for a specific drug or medical condition.
| 1 | # WebMD Drug Reviews Query Skill |
| 2 | |
| 3 | Search patient reviews by drug name or medical condition. Auto-fallback: if no drug matches, searches conditions. |
| 4 | |
| 5 | | Input Example | Match Logic | |
| 6 | |---|---| |
| 7 | | `Lipitor` | substring on `Drug` column | |
| 8 | | `High Blood Pressure` | substring on `Condition` column | |
| 9 | | any text | try `Drug` first → fall back to `Condition` | |
| 10 | |
| 11 | ## API |
| 12 | |
| 13 | | Function | Input | Returns | |
| 14 | |---|---|---| |
| 15 | | `load_reviews(path)` | CSV path (default `DATA_PATH`) | list[dict] | |
| 16 | | `search(rows, entity)` | single entity string | list[dict] | |
| 17 | | `search_by_drug(rows, drug)` | drug name string | list[dict] | |
| 18 | | `search_by_condition(rows, cond)` | condition string | list[dict] | |
| 19 | | `search_batch(rows, entities)` | list of entity strings | dict[str, list[dict]] | |
| 20 | | `summarize(hits, entity)` | matched rows + label | compact text (counts, avg ratings, top conditions/drugs) | |
| 21 | | `to_json(hits)` | matched rows | list[dict] | |
| 22 | |
| 23 | ## Usage |
| 24 | |
| 25 | See `if __name__ == "__main__"` block in `10_WebMD_Drug_Reviews.py` for runnable examples covering: single drug lookup, single condition lookup, batch search, and JSON output. |
| 26 | |
| 27 | ## Data |
| 28 | |
| 29 | - **Source**: `webmd.csv` (Kaggle – rohanharode07/webmd-drug-reviews-dataset) |
| 30 | - **Columns**: `Drug`, `Condition`, `Reviews`, `Side`, `Age`, `Sex`, `Effectiveness`, `EaseofUse`, `Satisfaction` |
| 31 | - **Ratings**: 1-5 star scale for Effectiveness, EaseofUse, Satisfaction |
| 32 | - **Path**: `DATA_PATH` variable in `10_WebMD_Drug_Reviews.py` |
| 33 | (`resources_metadata/drug_review/WebMDDrugReviews/webmd.csv`) |