polypharmacy

A Chinese-language command for managing a list of medicines and screening it for issues such as unsuitable medicines or drug interactions. The Beers criteria are guidelines for medicines that may be risky for older adults.

In plain words
What is it for?
Use it to add or review medicines, check medicine-medicine and medicine-condition interactions, assess anticholinergic burden, review adherence, and prepare a discussion about reducing medicines with a clinician.
Why use it?
It helps reveal possible medication conflicts and safety concerns without asking the user to change doses or stop treatment alone.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/huifer/wellally-health/polypharmacy
Clone the repo
git clone --depth 1 https://github.com/huifer/WellAlly-health

Made for: Claude Code.

Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,122 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00027 $0.03122
Opus 5 $0.00014 $0.01561
Sonnet 5 $0.00005 $0.00624
Haiku 4.5 $0.00003 $0.00312

Measured yesterday against content hash 897b0ee28755, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

polypharmacy scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/polypharmacy.md · 437 lines

How it starts

The opening of the file, as written. The whole thing — 437 lines — stays where its author put it; the contents beside it link to each section on GitHub.

多重用药管理命令 (Polypharmacy Management)

功能概述

用于管理老年人多重用药,包括用药清单管理、Beers标准筛查、药物相互作用检查和用药精简计划。


⚠️ 安全红线

  1. 不调整药物剂量或停药

    • 不建议具体药物剂量调整
    • 不建议自行停药
    • 调整需医生评估
  2. 不替代医生/药师的专业评估

    • 系统仅提供筛查和建议
    • 用药调整需医疗专业人员
  3. 不推荐具体用药方案

    • 不推荐具体药物品牌
    • 不开处方药
    • 用药方案需医生决定

✅ 系统能做到的

  • 用药清单管理
  • 不适当用药筛查(Beers标准)
  • 药物-药物相互作用检查
  • 药物-疾病相互作用检查
  • 抗胆碱能药物负荷评估
  • 用药精简计划建议
  • 用药依从性评估

可用操作

1. 添加用药 - add

添加新的用药信息。

参数说明:

  • info: 用药信息(必填)
    • 药物名称
    • 剂量(如100mg, 5mg等)
    • 用法频次(qd/bid/tid/qid/prn等)
    • 适应症(可选)
  • date: 开始用药日期(可选,默认今天)

执行步骤:

1. 参数识别
  • 从info中提取药物名称、剂量、用法
  • 格式: (\w+)[\s]+([\d.]+mg)[\s]+(\w+)
  • 示例: "阿司匹林 100mg qd"
2. 记录更新
  • 更新 data/polypharmacy-management.json
  • 添加到 medication_list 数组
  • 更新用药计数
3. 自动筛查
  • 自动进行Beers标准筛查
  • 自动检查药物相互作用
  • 更新抗胆碱能负荷
4. 输出确认
  • 显示新添加的用药信息
  • 显示Beers标准筛查结果
  • 显示药物相互作用(如有)
  • 显示当前用药总数

示例:

/polypharmacy add 阿司匹林 100mg qd 心血管保护
/polypharmacy add 氨氯地平 5mg qd 高血压

2. 查看用药清单 - list

查看当前所有用药。

执行步骤:

1. 读取数据
  • 读取 data/polypharmacy-management.json
  • 提取 medication_list 数组
2. 显示用药清单
  • 药物名称
  • 剂量和用法
  • 适应症
  • 开始日期
  • 是否适当(根据Beers标准)
3. 统计信息
  • 总用药数
  • 处方药数
  • 非处方药数
  • 不适当用药数

示例:

/polypharmacy list

3. Beers标准筛查 - beers

根据Beers标准筛查不适当用药。

执行步骤:

1. 读取用药清单
  • 读取 data/polypharmacy-management.json
2. Beers标准筛查
  • 逐一对照Beers标准(2019版)
  • 识别老年人潜在不适当用药
  • 识别老年人应谨慎使用的药物
  • 识别药物-疾病相互作用
3. 更新记录
  • 更新 beers_criteria_violations 数组
  • 标记不适当用药
4. 显示筛查结果
  • 不适当用药列表
  • 每种药的问题
  • 严重程度
  • 替代建议

常见Beers标准不适当用药:

  • 苯二氮卓类(跌倒、过度镇静)
  • 抗胆碱能药(认知障碍、便秘)
  • 第一代抗组胺药(镇静、抗胆碱能)
  • 非甾体抗炎药(消化道出血、肾功能不全)
  • 糖皮质激素(长期使用)
  • 华法林(出血风险,需谨慎)

示例:

/polypharmacy beers

4. 查看不适当用药 - inappropriate

查看Beers标准筛查出的不适当用药。

执行步骤:

1. 读取筛查结果
  • 读取 beers_criteria_violations 数组
2. 显示不适当用药报告
  • 药物名称
  • 违反的Beers标准
  • 严重程度(high/moderate/low)
  • 建议措施
  • 替代药物

示例:

/polypharmacy inappropriate

5. 药物相互作用检查 - interaction

Read the full file on GitHub · 437 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 437 lines · 27 tokens per session scan A 897b0ee28755

Subscribe to this mod's changes

polypharmacy is a command published in the GitHub repository huifer/WellAlly-health (935 stars, last pushed 1mo ago), licensed MIT. It adds 27 tokens to every session and 3,122 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.