Skip to content
Back to skills

Drugbank

ASecurity

Query a locally downloaded DrugBank database. Use whenever the user asks about drug information, drug targets, drug-drug interactions, drug categories, or wants to look up any entity (DrugBank ID, drug name, CAS number, synonym) in DrugBank.

  • 230 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 6, 2026
ai-agentspythongoapidatabase

Works with

  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 6, 2026

npx -y skills add BioTender-max/awesome-bio-agent-skills --skill drugbank --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Drugbank?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Drugbank
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/biotender-max-drugbank/badge)](https://www.skillsdirectory.com/skills/biotender-max-drugbank)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: drugbank-query
description: >
  Query a locally downloaded DrugBank database. Use whenever the user asks about
  drug information, drug targets, drug-drug interactions, drug categories, or wants
  to look up any entity (DrugBank ID, drug name, CAS number, synonym) in DrugBank.
---

# DrugBank Local Query Skill

Search local DrugBank data by any entity. Auto-detects query type:

| Input Pattern | Detected As | Match Logic |
|---|---|---|
| `DB00945` | DrugBank ID | exact on `drugbank_id` |
| anything else | free text | substring on `name`, `synonyms`, `cas_number` |

## Data

- **Base dir**: `resources_metadata/drug_knowledgebase/DrugBank/`
- **Files**:
  - `full database.xml` — rich fields: description, targets, interactions, categories, synonyms, groups
  - `drugbank vocabulary.csv` — lightweight: DrugBank ID, name, CAS, synonyms
- **Auto-select**: prefers XML if present, falls back to vocabulary CSV

## API

| Function | Input | Returns |
|---|---|---|
| `load(path)` | file path (XML or TSV/CSV, auto-detected) | `list[dict]` |
| `search(data, entity)` | single entity string | `list[dict]` |
| `search_batch(data, entities)` | list or comma-separated string | `dict[str, list[dict]]` |
| `summarize(hits, entity)` | hit list + label | compact text |
| `to_json(hits)` | hit list | JSON string |

## Usage

```python
from 07_DrugBank import load, search, search_batch, summarize, to_json

data = load()                              # auto-selects XML or CSV

# single query
hits = search(data, "aspirin")
print(summarize(hits, "aspirin"))

# batch query
results = search_batch(data, ["metformin", "DB00316", "ibuprofen"])
for entity, hits in results.items():
    print(summarize(hits, entity))

# JSON output
print(to_json(hits[:1]))
```

See `if __name__ == "__main__"` block in `07_DrugBank.py` for runnable examples.

Files in this skill

  • README.md1 KB
  • SKILL.md1.8 KB
  • __init__.py138 B
  • drugbank_skill.py7.6 KB
  • example.py7.8 KB
  • retrieve.py781 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.