WellAlly-health: Command for Claude Code

.claude/commands/medication.md

medication is a command for Claude Code from huifer/WellAlly-health. It costs 9 tokens per session (12,150 once invoked), scanned A, original, MIT.

A Chinese-language command for managing medicines and medication schedules. It records prescribed doses and timing, logs whether a dose was taken or missed, and shows medication history and adherence statistics.

In plain words
What is it for?
It helps add medicines, record taken or missed doses, list current schedules, review history by date or period, and view adherence status.
Why use it?
It replaces scattered notes with a structured record of planned and actual medicine use.

Command for Claude Code

Written for Claude Code: arguments in frontmatter.

This is huifer/WellAlly-health's own configuration. It tells Claude Code how to work on WellAlly-health itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything WellAlly-health configures →

Reuse

Borrowing it

Nothing to install: this file belongs to huifer/WellAlly-health. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/huifer/WellAlly-health/main/.claude/commands/medication.md
Clone the repo
git clone --depth 1 https://github.com/huifer/WellAlly-health

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for medication

README.md
[![agentmods](https://agentmods.dev/badge/commands/huifer/wellally-health/medication/github.svg)](https://agentmods.dev/commands/huifer/wellally-health/medication)
Your own site
<a href="https://agentmods.dev/commands/huifer/wellally-health/medication"><img src="https://agentmods.dev/badge/commands/huifer/wellally-health/medication/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for medication

Your own site · 80×15
<a href="https://agentmods.dev/commands/huifer/wellally-health/medication"><img src="https://agentmods.dev/badge/commands/huifer/wellally-health/medication.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 12,150 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00009 $0.12150
Opus 5 $0.00005 $0.06075
Sonnet 5 $0.00002 $0.02430
Haiku 4.5 $0.00001 $0.01215

Measured 10d ago against content hash af505a21bf4e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

medication 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 10d ago.

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/medication.md · 1,533 lines

How it starts

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

用药记录管理

管理药物和用药计划,记录每日用药情况,追踪药物依从性。

操作类型

1. 添加药物 - add

添加新药物及其用药计划。

参数说明:

  • info: 药物信息(必填),使用自然语言描述

示例:

/medication add 阿司匹林 100mg 每天1次 早餐后服用
/medication add 氨氯地平 5mg 每天早晚各1次
/medication add 二甲双胍 500mg 每天3次 餐后服用
/medication add 维生素D 1000IU 每周1次

支持的描述格式:

  • 药物名称 + 剂量 + 频率 + 用药时间
  • 频率关键词:每天、每日、每周、隔天、按需
  • 时间关键词:早餐前、早餐后、午餐前、午餐后、晚餐前、晚餐后、睡前、早晚各一次等

2. 记录用药 - log

记录实际用药情况。

参数说明:

  • info: 用药记录(必填),使用自然语言描述

示例:

/medication log 已服用 阿司匹林
/medication log 阿司匹林 已服
/medication log 忘记服用 氨氯地平
/medication log 氨氯地平 漏服
/medication log 阿司匹林 早上8点已服

自动识别:

  • ✅ 已服用、已服、服了、吃了 - 正常用药
  • ❌ 忘记、漏服、未服 - 漏服记录
  • ⏰ 计划 - 预定提醒

3. 查看药物列表 - list

查看所有已添加的药物及用药计划。

示例:

/medication list

4. 查看用药历史 - history

查看用药记录历史。

示例:

/medication history
/medication history today
/medication history 2025-12-31
/medication history week

5. 查看用药统计 - status

查看用药依从性统计。

示例:

/medication status
/medication status today
/medication status week
/medication status month

执行步骤

添加药物 (add)

1. 解析药物信息

从自然语言中提取:

  • 药物名称:通用名或商品名
  • 剂量:数值 + 单位(mg、g、ml、IU、片、粒等)
  • 频率:每天次数、每周次数等
  • 用药时间:具体的服药时间点
  • 特殊说明:餐前、餐后、睡前等
2. 生成用药计划

核心规则:schedule 数组必须为每周的每一天(1-7)明确生成用药计划记录

频率映射规则:

用户输入 频率类型 schedule 记录数 生成规则
每天1次、每日1次 daily 7条 每天1条,周一至周日
每天2次、每日2次、早晚各一次 daily 14条 每天2条,周一至周日
每天3次、每日3次、一日三次 daily 21条 每天3条,周一至周日
每周1次 weekly 1条 仅指定星期几
隔天1次 every_other_day 4条 周一、三、五、日 或 二、四、六
按需 as_needed 0条 无固定计划

schedule 生成算法:

// 伪代码示例
function generateSchedule(frequency, times, timeSlots) {
  const schedule = [];

  if (frequency === 'daily') {
    // 每天 N 次:为每周7天每天生成 N 条记录
    for (let weekday = 1; weekday <= 7; weekday++) {
      for (const timeSlot of timeSlots) {
        schedule.push({
          weekday: weekday,
          time: timeSlot.time,
          timing_label: timeSlot.label,
          dose: {
            value: timeSlot.dose.value,
            unit: timeSlot.dose.unit
          }
        });
      }
    }
  } else if (frequency === 'weekly') {
    // 每周一次:仅生成1条记录(默认周一,可通过用户输入指定)
    schedule.push({
      weekday: 1,  // 或用户指定的星期几
      time: timeSlots[0].time,
      timing_label: timeSlots[0].label,
      dose: {
        value: timeSlots[0].dose.value,
        unit: timeSlots[0].dose.unit
      }
    });
  } else if (frequency === 'every_other_day') {
    // 隔天一次:生成4条记录(1,3,5,7 或 2,4,6)
    const days = [1, 3, 5, 7];  // 或 [2, 4, 6]
    for (const weekday of days) {
      schedule.push({
        weekday: weekday,
        time: timeSlots[0].time,
        timing_label: timeSlots[0].label,
        dose: {
          value: timeSlots[0].dose.value,
          unit: timeSlots[0].dose.unit
        }
      });
    }
  }

  return schedule;
}

Read the full file on GitHub · 1,533 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. 10d ago First seen · 1,533 lines · 9 tokens per session scan A af505a21bf4e

Subscribe to this mod's changes

medication is a command published in the GitHub repository huifer/WellAlly-health (943 stars, last pushed 1mo ago), licensed MIT. It adds 9 tokens to every session and 12,150 once invoked, about $0.0000 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.