Skip to content
Back to skills

Atc

ASecurity

Query the WHO ATC/DDD Classification System. Use whenever the user asks about ATC codes, drug classification hierarchy, Defined Daily Doses (DDD), or wants to look up drugs by ATC class or find the ATC code for a drug name.

  • 230 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 6, 2026
ai-agentspythongoapi

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 atc --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Atc?

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

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

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: 27_ATC_DDD
description: >
  Query the WHO ATC/DDD Classification System. Use whenever the user asks about
  ATC codes, drug classification hierarchy, Defined Daily Doses (DDD), or wants
  to look up drugs by ATC class or find the ATC code for a drug name.
---

# ATC/DDD Query Skill

Look up ATC classification and DDD data for drugs. Auto-detects entity type:

| Input Pattern | Detected As | Query Path |
|---|---|---|
| `N02BA` `A10BA02` `C09XX01` | ATC code | local DDD lookup + RxNav member drugs |
| `aspirin` `metformin` | drug name | RxNav ATC classification + local DDD match |

ATC code regex: `^[A-Z]\d{2}([A-Z]{1,2}\d{0,2})?$`

## API

| Function | Input | Returns |
|---|---|---|
| `load_local(path)` | Excel path | `list[dict]` — cached ATC/DDD records |
| `search(entity)` | single string | `dict` with `entity`, `entity_type`, `local_hits`, `api_hits` |
| `search_batch(entities)` | list of strings | `dict[str, dict]` — keyed by entity |
| `summarize(result)` | search result dict | compact LLM-readable text |
| `to_json(result)` | search result dict | JSON string |

All functions accept `use_api=True|False` to toggle RxNav queries (default: on).

## Usage

See `if __name__ == "__main__"` block in `27_ATC_DDD.py` for runnable examples:

```python
from importlib import import_module
atc = import_module("27_ATC_DDD")

# Drug name → ATC classes
r = atc.search("aspirin")
print(atc.summarize(r))

# ATC code → member drugs + DDD
r = atc.search("N02BA")
print(atc.summarize(r))

# Batch
results = atc.search_batch(["metformin", "A10BA02", "C09XX01"])

# JSON for pipeline
print(atc.to_json(atc.search("sparsentan")))
```

## Data

- **Local file**: `ATC_DDD_new and alterations 2026_final.xlsx`
- **Columns**: `atc_code`, `atc_level_name`, `new_ddd`, `unit`, `adm_route`, `note`
- **Path**: `DATA_DIR` / `XLSX_PATH` in `27_ATC_DDD.py`
- **Remote API**: RxNav RxClass (`rxnav.nlm.nih.gov/REST/rxclass/`)
- **Citation**: WHOCC — WHO Collaborating Centre for Drug Statistics Methodology, ATC/DDD Index 2026. https://atcddd.fhi.no/atc_ddd_index/

Files in this skill

  • README.md990 B
  • SKILL.md2 KB
  • __init__.py118 B
  • atc_skill.py3.3 KB
  • example.py8.9 KB
  • retrieve.py784 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.