Health-Mate
Health-Mate is an executable OpenClaw skill, not a prompt-only package.
It reads structured Markdown logs from MEMORY_DIR, generates localized PDF reports, and can optionally deliver the final message to external services.
What It Does
- - Parses meals, hydration, exercise, symptoms, medication, and custom monitoring sections
- Generates daily reports with scoring, detail sections, AI insight, risk alerts, and next-day actions
- Generates weekly reports with rings, paired trend charts, audience-specific insight modules, weekly review, and next-week plan
- Generates monthly reports with radar, branch-aware heatmaps, 30-day weight and BMR trend, specialty charts, follow-up reminders, and clinic suggestions
- Supports explicit report routing through
report_preferences.population_branch, while the setup wizard still auto-suggests lifestyle vs disease mode from the primary goal - Switches
balanced / fat_loss reports into a lifestyle-review path with activity heatmaps, energy-balance, habit-progression, and lean-mass/fat-mass charts while skipping hospital lookup - Supports multi-condition management in both LLM and local fallback paths
- Keeps core parsing, scoring, and PDF rendering local
Installation
CODEBLOCK0
Dependencies:
- - INLINECODE4
- INLINECODE5
- INLINECODE6
Required Runtime Setup
Required:
Optional:
- - INLINECODE8
- INLINECODE9
- INLINECODE10
- INLINECODE11
- INLINECODE12
- INLINECODE13
- INLINECODE14
- INLINECODE15
- INLINECODE16
- INLINECODE17
- INLINECODE18
- INLINECODE19
For ClawHub manual folder upload:
- -
config/.env.example may be missing from the uploaded package - use the top-level
env block inside config/user_config.example.json as the upload-safe reference template - the setup wizard can create a commented project-local
config/.env template if the file does not already exist - runtime scripts still read project-local INLINECODE24
- keep only the keys you intend this skill to read inside project-local INLINECODE25
Upgrade And Backup Notice
Before upgrading or reinstalling this skill, back up:
- - INLINECODE26
- INLINECODE27
- any local font file you manually placed under INLINECODE28
Important:
- - some platform upgrade or reinstall flows may overwrite, reset, or remove local configuration files
- after an upgrade, re-check
MEMORY_DIR, report preferences, scoring modules, webhook settings, and Tavily settings before running scheduled jobs again - if needed, also verify
report_preferences.population_branch in INLINECODE31
Local And Network Behavior
Expected local file I/O:
- - reads Markdown logs from INLINECODE32
- reads project-local
config/.env when shell runners are used and the file exists - the setup wizard may create a commented project-local
config/.env template when the file is missing - may rely on
config/user_config.example.json as the upload-safe env reference during manual installation - writes PDFs into INLINECODE36
- writes logs into INLINECODE37
- may create a temporary English memory mirror for rendering fallback
Expected network I/O:
- - Tavily only when
TAVILY_API_KEY is configured - webhook delivery only when the matching delivery credentials are configured
- runtime font download only when INLINECODE39
Important:
- - there is no implicit default
MEMORY_DIR fallback in the shell runners - the skill exits if
MEMORY_DIR is missing - shell runners use
NVM_DIR and CRON_PATH from the environment or project-local config/.env, with built-in defaults when those keys are missing - the Python local-LLM resolver uses
OPENCLAW_BIN first and then tries common install paths without hardcoding a single fixed cron INLINECODE46
Commands
Daily report
Weekly report
Monthly report
Memory Write Protocol
When writing into MEMORY_DIR, the model must act like a strict recorder.
Hard rules:
- 1. Never write commentary, advice, summaries, emoji, or chat filler into the file.
- Meals, hydration, medication events, and exercise events must use level-3 headings with time markers.
- Hydration blocks must remain minimal and structured.
- Step totals must stay in one dedicated level-2 block.
- Monitoring modules must use stable level-2 headings.
- Use one language per block.
Core template:
CODEBLOCK1
Chinese core template:
CODEBLOCK2
Chinese monitoring-module constraints:
- -
## 血压记录 / ## 血糖记录 / ## 体成分 / ## 生化记录 must stay as stable level-2 titles - numeric monitoring blocks should use stable item labels such as
- 血压:128/82 mmHg, - 血糖:7.1 mmol/L, INLINECODE57 - do not mix commentary into monitoring blocks
- do not turn monitoring blocks into tables
- do not rename the same monitoring module on different days unless the user intentionally changed the module name
Recommended LLM instruction:
- - paste the English or Chinese template above directly into your system prompt,
soul.md, or memory-write policy so the model stays inside the parser-safe structure - if custom modules are enabled in
user_config.json, add their exact section titles to the LLM write protocol and keep those titles stable across days
Expandable monitoring modules:
CODEBLOCK3
Forbidden content:
- - INLINECODE60
- INLINECODE61
- INLINECODE62
- motivational filler
- debug notes
- system logs
- tables inside daily memory files
Monthly Report Expectations
The monthly report now includes:
- - macro adherence radar
- healthy-day donut chart based on the full calendar month
- symptom and medication heatmap
- 30-day weight and BMR trend
- condition-specific specialty charts
- lifestyle-mode specialty charts for
balanced / fat_loss: energy balance, four-week habit progression, and lean-mass/fat-mass composition - AI monthly review
- follow-up reminders or periodic screening suggestions, depending on the active monthly mode
- residence-aware hospital-and-doctor suggestions with grouped recommendations, grades, booking hints, and optional fee / schedule fields for disease-management modes
If the user manages multiple conditions, the monthly report should combine them instead of collapsing to a single narrow perspective.
Font Fallback
Preferred CJK font paths:
- - INLINECODE65
- INLINECODE66
If one of them is missing:
- - the skill may switch to an English-compatible rendering path
- the output adds a rendering notice
- users who need Chinese PDF output should place
NotoSansSC-VF.ttf into INLINECODE68 - users who need Japanese PDF output should place
NotoSansJP-VF.ttf into INLINECODE70
Changelog
v1.5.4 - 2026-04-01
- - Enhanced PDF visual styling with refined layout and improved readability
- Fixed minor formatting issues in daily, weekly, and monthly report generators
- Optimized symbol rendering for better cross-platform compatibility
v1.5.3 - 2026-03-29
- - Sanitized local-LLM stdout before AI commentary is embedded into push text or PDFs, preventing OpenClaw plugin-registration logs from leaking into reports
- Added a second daily-PDF commentary filter as a defensive fallback for unexpected plugin log fragments
- Aligned direct Python execution with the shell runners by auto-loading project-local config/.env when variables are not already exported
v1.5.2 - 2026-03-25
- - Updated the upload-safe env example with OpenClaw default
MEMORY_DIR, sanitized web-publish placeholders, and the shared LOG_FILE example - Extended
init_config.py so first-time setup can create a commented project-local config/.env template without overwriting an existing one - Clarified SKILL metadata and runtime notes around project-local
.env, cron PATH helpers, and optional-network behavior - Verified that the setup wizard really creates the commented
config/.env template when the file is missing - Added a monthly lifestyle-review split for
balanced / fat_loss, including new charts, renamed section titles, screening suggestions, and hospital-lookup bypass
v1.5.1 - 2026-03-24
- - Optimized Cron environment configuration for reliable LLM invocation in scheduled tasks
- Embedded the upload-safe env reference into INLINECODE79
- Kept
daily_health_report_pro.sh, weekly_health_report_pro.sh, and monthly_health_report_pro.sh loading environment variables from INLINECODE83 - Changed all shell script comments to English for better internationalization
- Ensures scheduled daily/weekly/monthly reports can successfully call local LLM for AI insights
v1.5.0 - 2026-03-23
- - Removed the legacy
scripts/health_report_pro.py and scripts/pdf_generator.py wrappers - Extended
init_config.py to cover INLINECODE87 - Clarified env-first local LLM resolution through
OPENCLAW_BIN and common-path auto-discovery - Added explicit Japanese font fallback guidance and English-fallback notice behavior
v1.4.0 - 2026-03-21
- - Added monthly reporting
- Added weekly and monthly symptom and medication heatmaps
- Added monthly weight and BMR trend output
- Added residence-aware monthly medical planning
- Refreshed README, README_ZH, SKILL metadata, and package metadata
Health-Mate
Health-Mate 是一个可执行的 OpenClaw 技能,而非纯提示词包。
它从 MEMORY_DIR 读取结构化 Markdown 日志,生成本地化 PDF 报告,并可选择将最终消息发送到外部服务。
功能说明
- - 解析饮食、饮水、运动、症状、用药和自定义监测模块
- 生成包含评分、详细模块、AI 洞察、风险预警和次日行动建议的日报
- 生成包含环形图、配对趋势图、受众特定洞察模块、周度回顾和下周计划的周报
- 生成包含雷达图、分支感知热力图、30天体脂和基础代谢率趋势、专业图表、随访提醒和就诊建议的月报
- 通过 reportpreferences.populationbranch 支持显式报告路由,同时设置向导仍会根据主要目标自动建议生活方式模式或疾病模式
- 将 balanced / fat_loss 报告切换为生活方式回顾路径,包含活动热力图、能量平衡、习惯进展和瘦体重/脂肪量图表,同时跳过医院查询
- 在 LLM 和本地回退路径中均支持多病症管理
- 核心解析、评分和 PDF 渲染保持在本地运行
安装
bash
pip install -r requirements.txt
依赖项:
- - reportlab
- pillow
- matplotlib
必需运行时配置
必需:
可选:
- - NVMDIR
- CRONPATH
- OPENCLAWBIN
- TAVILYAPIKEY
- DINGTALKWEBHOOK
- FEISHUWEBHOOK
- TELEGRAMBOTTOKEN
- TELEGRAMCHATID
- LOGFILE
- REPORTWEBDIR
- REPORTBASEURL
- ALLOWRUNTIMEFONT_DOWNLOAD
关于 ClawHub 手动文件夹上传:
- - config/.env.example 可能在上传包中缺失
- 使用 config/user_config.example.json 中的顶层 env 块作为上传安全的参考模板
- 如果文件不存在,设置向导可以创建一个带注释的项目本地 config/.env 模板
- 运行时脚本仍读取项目本地的 config/.env
- 在项目本地的 config/.env 中仅保留你希望此技能读取的键
升级和备份说明
在升级或重新安装此技能之前,请备份:
- - config/user_config.json
- config/.env
- 你手动放置在 assets/ 下的任何本地字体文件
重要提示:
- - 某些平台的升级或重新安装流程可能会覆盖、重置或删除本地配置文件
- 升级后,在再次运行定时任务之前,请重新检查 MEMORYDIR、报告偏好、评分模块、Webhook 设置和 Tavily 设置
- 如有需要,还需验证 config/userconfig.json 中的 reportpreferences.populationbranch
本地和网络行为
预期的本地文件 I/O:
- - 从 MEMORYDIR 读取 Markdown 日志
- 当使用 Shell 运行器且文件存在时,读取项目本地的 config/.env
- 当文件缺失时,设置向导可能会创建一个带注释的项目本地 config/.env 模板
- 在手动安装期间,可能依赖 config/userconfig.example.json 作为上传安全的环境变量参考
- 将 PDF 写入 reports/
- 将日志写入 logs/
- 可能会创建一个临时的英文记忆镜像用于渲染回退
预期的网络 I/O:
- - 仅在配置了 TAVILYAPIKEY 时使用 Tavily
- 仅在配置了匹配的投递凭证时进行 Webhook 投递
- 仅在 ALLOWRUNTIMEFONT_DOWNLOAD=true 时进行运行时字体下载
重要提示:
- - Shell 运行器中没有隐式的默认 MEMORYDIR 回退
- 如果 MEMORYDIR 缺失,技能将退出
- Shell 运行器从环境变量或项目本地的 config/.env 中使用 NVMDIR 和 CRONPATH,当这些键缺失时使用内置默认值
- Python 本地 LLM 解析器首先使用 OPENCLAW_BIN,然后尝试常见的安装路径,而不硬编码单个固定的 cron PATH
命令
日报
周报
月报
记忆写入协议
当写入 MEMORY_DIR 时,模型必须像严格的记录器一样工作。
硬性规则:
- 1. 切勿在文件中写入评论、建议、摘要、表情符号或聊天填充内容。
- 饮食、饮水、用药事件和运动事件必须使用带时间标记的三级标题。
- 饮水块必须保持最小化和结构化。
- 步数总计必须放在一个专用的二级块中。
- 监测模块必须使用稳定的二级标题。
- 每个块使用一种语言。
核心模板:
markdown
2026-03-20 Health Log
Meals
Breakfast (around 08:30)
- - Oatmeal 50g -> approx. 190kcal
- Skim milk 250ml -> approx. 87kcal
Hydration
Morning (around 09:45)
- - Water intake: 300ml
- Cumulative: 300ml/2000ml
Exercise
Afternoon Cycling (around 17:17)
- - Distance: 10km
- Duration: 47min
- Burn: approx. 300kcal
Today Steps
- - Total steps: 8500 steps
中文核心模板:
markdown
2026-03-20 健康记录
体重记录
饮水记录
上午(约 08:45)
- - 饮水量:300ml
- 累计:300ml/2000ml
饮食记录
早餐(约 08:50)
- - 燕麦片 50g -> 约 190kcal
- 脱脂牛奶 250ml -> 约 87kcal
运动记录
下午骑行(约 17:10)
- - 距离:10.2km
- 耗时:42min
- 消耗:约 290kcal
今日步数
用药记录
中文监测模块约束:
- - ## 血压记录 / ## 血糖记录 / ## 体成分 / ## 生化记录 必须保持为稳定的二级标题
- 数值监测块应使用稳定的项目标签,如 - 血压:128/82 mmHg、- 血糖:7.1 mmol/L、- ALT:34 U/L
- 不要在监测块中混入评论
- 不要将监测块转换为表格
- 除非用户有意更改模块名称,否则不要在不同日期重命名同一监测模块
推荐的 LLM 指令:
- - 将上述英文或中文模板直接粘贴到你的系统提示词、soul.md 或记忆写入策略中,使模型保持在解析器安全的结构内
- 如果在 user_config.json 中启用了自定义模块,请将其确切的章节标题添加到 LLM 写入协议中,并保持这些标题在不同日期之间稳定
可扩展的监测模块:
markdown
Blood Pressure
Morning (around 08:00)
- - Blood Pressure: 128/82 mmHg
- Heart Rate: 72 bpm
Glucose Record
After Breakfast (around 10:10)
- - Glucose: 7.1 mmol/L
- Timing: 2h after breakfast
Body Composition
- - Weight: 64.4kg
- Body Fat: 18.6%
Biochemistry
禁止内容:
- - Assessment
- Status
- Summary
- 激励性填充内容
- 调试笔记
- 系统日志
- 每日记忆文件中的表格
月报预期
月报现在包括:
- - 宏观依从性雷达图
- 基于完整日历月的健康天数环形图
- 症状和用药热力图
- 30天体重和基础代谢率趋势
- 病症特定专业图表
- balanced / fat_loss 的生活方式模式专业图表:能量平衡、四周习惯进展和瘦体重/脂肪量组成
- AI 月度回顾
- 随访提醒或定期筛查建议,取决于活跃的月度模式
- 基于居住地的医院和医生建议,包含分组推荐、评级、预约提示和疾病管理模式的可选费用/排班字段
如果用户管理多种病症,月报应将其合并,而不是缩减为单一狭窄视角。
字体回退
首选 CJK 字体路径:
- - assets/NotoSansSC-VF.ttf
- assets/NotoSansJP-VF.ttf
如果其中一个缺失: