WellAlly-health: Command for Claude Code

.claude/commands/query.md

query is a command for Claude Code from huifer/WellAlly-health. It costs 4 tokens per session (792 once invoked), scanned A, original, MIT.

A command for searching a personal medical-record data store by type, date, recency, or abnormal results. It reads an index and related JSON files, then presents the matching records and summary counts.

In plain words
What is it for?
Use it to list all records, biochemical tests, imaging reports, recent entries, date-specific entries, or abnormal biochemical results.
Why use it?
It avoids manually opening and sorting separate medical-record files, while making normal and abnormal test results easier to review.

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/query.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 query

README.md
[![agentmods](https://agentmods.dev/badge/commands/huifer/wellally-health/query/github.svg)](https://agentmods.dev/commands/huifer/wellally-health/query)
Your own site
<a href="https://agentmods.dev/commands/huifer/wellally-health/query"><img src="https://agentmods.dev/badge/commands/huifer/wellally-health/query/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 query

Your own site · 80×15
<a href="https://agentmods.dev/commands/huifer/wellally-health/query"><img src="https://agentmods.dev/badge/commands/huifer/wellally-health/query.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 792 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.00004 $0.00792
Opus 5.5 $0.00002 $0.00317
Sonnet 5.5 $0.00001 $0.00158
Haiku 4.5 $0.00000 $0.00079

Measured 1mo ago against content hash b45b5353f7af, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

query 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 1mo 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/query.md · 104 lines

What it actually says

查询医疗记录

你需要查询个人医疗数据中心中的记录。

查询类型

1. 查询所有记录 - all

列出所有已保存的检查记录,按时间倒序排列。

2. 查询生化检查 - biochemical

只查询生化检查类记录。

3. 查询影像检查 - imaging

只查询影像检查类记录。

4. 查询最近N条记录 - recent [数量]

查询最近N条记录,默认10条。

5. 按日期查询 - date [日期]

查询指定日期的记录,格式:YYYY-MM-DD 或 YYYY-MM。

6. 查询异常指标 - abnormal

查询所有生化检查中的异常指标。

执行步骤

  1. 读取索引文件

    • 读取 data/index.json
    • 如果文件不存在,返回"暂无医疗记录"
  2. 筛选记录 根据查询类型筛选记录:

    • 读取对应的 JSON 文件
    • 应用筛选条件
  3. 格式化输出 以清晰的表格或列表形式展示查询结果

    生化检查输出格式:

    日期:YYYY-MM-DD
    检查类型:血液常规
    ━━━━━━━━━━━━━━━━━━━━━━━━━━
    检查项目          | 数值  | 单位    | 参考范围    | 状态
    ────────────────────────────────────────
    白细胞计数        | 6.5   | ×10^9/L | 3.5-9.5     | ✅ 正常
    血红蛋白          | 145   | g/L     | 130-175     | ✅ 正常
    血小板计数        | 189   | ×10^9/L | 125-350     | ✅ 正常
    

    影像检查输出格式:

    日期:YYYY-MM-DD
    检查类型:B超
    检查部位:腹部
    ━━━━━━━━━━━━━━━━━━━━━━━━━━
    检查所见:
    [描述内容]
    
    测量数据:
    - 尺寸:XXX
    
    检查结论:
    [结论内容]
    
  4. 统计摘要 在查询结果后添加统计信息:

    • 总记录数
    • 生化检查数量
    • 影像检查数量
    • 时间跨度

注意事项

  • 日期格式统一为 YYYY-MM-DD
  • 异常指标用 ❌ 标记,正常用 ✅ 标记
  • 如果记录过多,分页显示,每页20条
  • 保持输出简洁清晰
  • 如果查询结果为空,明确告知用户

示例用法

/query all                    # 查询所有记录
/query biochemical            # 查询所有生化检查
/query imaging                # 查询所有影像检查
/query recent 5               # 查询最近5条记录
/query date 2025-12           # 查询2025年12月的记录
/query date 2025-12-31        # 查询2025-12-31的记录
/query abnormal               # 查询所有异常指标
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. 1mo ago First seen · 104 lines · 4 tokens per session scan A b45b5353f7af

Subscribe to this mod's changes

query is a command published in the GitHub repository huifer/WellAlly-health (963 stars, last pushed 3mo ago), licensed MIT. It adds 4 tokens to every session and 792 once invoked, about $0.0000 per session on Opus 5.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.