ai

A command-line health analysis system that combines health records to produce analyses, risk estimates, trends, findings, suggestions, and text or optional HTML reports. It also provides health-related questions and report generation.

In plain words
What is it for?
Use it to analyze health data over a chosen time period, identify trends or unusual values, estimate listed risks, ask health questions, and generate a report.
Why use it?
It brings information from different health areas into one analysis instead of requiring separate manual reviews.

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

Made for: Claude Code.

Per session 20 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,146 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.00020 $0.03146
Opus 5 $0.00010 $0.01573
Sonnet 5 $0.00004 $0.00629
Haiku 4.5 $0.00002 $0.00315

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

Security

Grade A, and why

ai 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/ai.md · 429 lines

How it starts

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

AI健康助手

AI驱动的综合健康分析系统,提供智能健康洞察、风险预测和个性化建议。

命令格式

/ai <action> [target] [options]

可用操作

1. /ai analyze - AI综合健康分析

整合所有健康数据源,执行多维度分析,识别关键模式和趋势。

用法:

/ai analyze [time_range]

参数:

  • time_range: 时间范围(可选)
    • all - 所有数据(默认)
    • last_month - 上个月
    • last_quarter - 上季度(3个月,默认)
    • last_year - 去年
    • YYYY-MM-DD - 从指定日期至今
    • YYYY-MM-DD,YYYY-MM-DD - 自定义范围

示例:

/ai analyze                    # 分析过去3个月数据
/ai analyze last_month         # 分析上个月数据
/ai analyze 2025-01-01         # 分析从2025年1月1日至今
/ai analyze all                # 分析所有历史数据

执行步骤:

  1. 读取AI配置和用户档案
  2. 读取所有健康数据源(基础指标、生活方式、心理健康、医疗历史)
  3. 执行多维度分析:
    • 相关性分析(皮尔逊、斯皮尔曼)
    • 趋势分析(线性回归、移动平均)
    • 异常检测(CUSUM、Z-score)
  4. 生成个性化建议(Level 1-3)
  5. 输出文本报告
  6. 生成HTML报告(可选)

输出格式:

AI健康分析报告
═══════════════════════════════════
生成时间: 2025-01-08
分析周期: 过去90天

📊 总体评估
━━━━━━━━━━━━━━━━━━━━━━━━━━
健康指数: 72/100(良好)
改善中: 睡眠质量、运动水平
需关注: BMI、用药依从性

🎯 风险预测
━━━━━━━━━━━━━━━━━━━━━━━━━━
🔴 高血压风险: 32% (中等风险)
🟡 糖尿病风险: 18% (低风险)
🟢 心血管风险: 8% (低风险)

📈 关键趋势
━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ 体重: 70kg → 68kg (-2kg, 改善中)
⚠️ BMI: 24.5 → 24.9 (轻微上升)
✅ 睡眠时长: 6.2h → 7.1h (显著改善)

🔗 关键发现
━━━━━━━━━━━━━━━━━━━━━━━━━━
• 睡眠时长与情绪评分强相关 (r=0.78)
• 运动量增加与体重改善正相关 (r=0.65)
• 用药依从性与症状频率负相关 (r=-0.62)

💡 个性化建议
━━━━━━━━━━━━━━━━━━━━━━━━━━
[Level 1] 保持良好的睡眠习惯
[Level 2] 提高用药依从性
[Level 3] ⚠️ 体重管理需关注

═══════════════════════════════════
⚠️ 重要声明
本AI分析仅供参考,不构成医疗诊断。
请咨询医生获取专业医疗建议。

2. /ai predict - 健康风险预测

基于历史数据和循证医学模型,预测特定健康风险。

用法:

/ai predict <risk_type>

支持的风险类型:

  • hypertension - 高血压风险(10年)
  • diabetes - 糖尿病风险(10年)
  • cardiovascular - 心血管疾病风险(10年)
  • nutritional_deficiency - 营养缺乏风险
  • sleep_disorder - 睡眠障碍风险
  • all - 所有风险预测

示例:

/ai predict hypertension           # 预测高血压风险
/ai predict diabetes               # 预测糖尿病风险
/ai predict cardiovascular         # 预测心血管风险
/ai predict all                    # 预测所有风险

执行步骤:

  1. 读取用户档案和相关健康数据
  2. 提取风险因子(年龄、BMI、血压、血糖、家族史等)
  3. 应用风险预测模型:
    • Framingham风险评分(高血压、心血管)
    • ADA风险评分(糖尿病)
  4. 计算风险概率和等级
  5. 识别可修改风险因素
  6. 生成预防建议

Read the full file on GitHub · 429 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 · 429 lines · 20 tokens per session scan A 3542e6404ef1

Subscribe to this mod's changes

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