report

A command that creates printable HTML health reports with charts from stored medical information. HTML is the format used to display pages in a web browser.

In plain words
What is it for?
Use it for complete reports or separate analyses of blood-test trends, imaging, medicines, radiation exposure, allergies, symptoms, surgeries, and discharge summaries.
Why use it?
It gathers scattered health records into reports focused on a chosen time period and subject.

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/report
Clone the repo
git clone --depth 1 https://github.com/huifer/WellAlly-health

Made for: Claude Code.

Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,009 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.00017 $0.04009
Opus 5 $0.00009 $0.02005
Sonnet 5 $0.00003 $0.00802
Haiku 4.5 $0.00002 $0.00401

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

Security

Grade A, and why

report 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/report.md · 544 lines

How it starts

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

综合健康报告生成

生成专业的HTML格式健康报告,包含多种数据可视化图表,支持打印输出。

报告类型

1. 综合报告 - comprehensive

包含所有可用的健康数据章节,生成完整的健康报告。

默认包含的章节:

  • 患者概况
  • 生化检查分析
  • 影像检查汇总
  • 用药分析
  • 辐射剂量追踪
  • 过敏摘要
  • 症状历史
  • 手术记录
  • 出院小结

2. 生化趋势分析 - biochemical

专注于生化检查数据的趋势分析和可视化。

3. 影像汇总 - imaging

影像检查记录的汇总和统计。

4. 用药分析 - medication

用药计划、依从性分析和用药历史。

5. 自定义报告 - custom

用户自定义包含的章节和数据范围。

时间范围参数

参数 说明 示例
all 所有可用数据 /report comprehensive all
last_month 上个月(自然月) /report comprehensive last_month
last_quarter 上季度(3个月) /report comprehensive last_quarter
last_year 去年(12个月) /report comprehensive last_year
YYYY-MM-DD,YYYY-MM-DD 自定义起止日期 /report custom 2024-01-01,2024-12-31
YYYY-MM-DD 从某日期至今 /report custom 2024-06-01

章节选择

使用 custom 报告类型时,可以通过逗号分隔指定包含的章节:

章节代码 说明
profile 患者概况(年龄、BMI、体表面积等)
biochemical 生化检查趋势和统计
imaging 影像检查汇总
medication 用药分析和依从性
radiation 辐射剂量追踪
allergies 过敏摘要
symptoms 症状历史和模式
surgeries 手术记录
discharge 出院小结

输出文件

默认输出到 reports/health-report-YYYY-MM-DD.html

可以通过 output 参数指定自定义文件名:

/report comprehensive all all my-health-report.html

执行步骤

步骤 1: 解析参数并确定时间范围

  1. 解析 action 参数,确定报告类型
  2. 解析 date_range 参数,计算起止日期
  3. 解析 sections 参数,确定包含的章节
  4. 确定输出文件路径

步骤 2: 加载全局索引

读取 data/index.json,获取所有数据文件的索引信息。

如果索引文件不存在,扫描数据目录构建索引。

步骤 3: 收集数据

根据确定的章节,并行收集各类型数据:

3.1 收集患者概况

  • 读取 data/profile.json
  • 提取:年龄、身高、体重、BMI、体表面积

3.2 收集生化检查数据

  • 从索引中获取生化检查文件路径
  • 读取指定时间范围内的所有生化检查记录
  • 聚合指标数据,计算趋势
  • 统计异常指标数量和分布

3.3 收集影像检查数据

  • 从索引中获取影像检查文件路径
  • 读取指定时间范围内的所有影像检查记录
  • 统计检查类型、部位分布
  • 提取关键发现

3.4 收集用药数据

  • 读取 data/medications/medications.json(当前用药计划)
  • 读取 data/medication-logs/YYYY-MM/*.json(用药日志)
  • 计算用药依从性
  • 统计漏服情况

3.5 收集辐射记录

  • 读取 data/radiation-records.json
  • 计算累积剂量
  • 按月份统计剂量分布

3.6 收集过敏数据

  • 读取 data/allergies.json
  • 按严重程度分类
  • 统计过敏类型分布

Read the full file on GitHub · 544 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 · 544 lines · 17 tokens per session scan A 2d461854de40

Subscribe to this mod's changes

report is a command published in the GitHub repository huifer/WellAlly-health (935 stars, last pushed 1mo ago), licensed MIT. It adds 17 tokens to every session and 4,009 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.