CareMax Health Indicators
Requires caremax-auth as a sibling directory (../caremax-auth/, same layout as skills/caremax-auth + skills/caremax-indicators in this repo, or under ~/.agents/skills/). If missing: npx skills add KittenYang/caremax-skills and select caremax-auth.
What end users can do (plain language)
- - Browse and analyze their saved indicators: lists, categories, trends over time (labs and long-term metrics).
- Quickly add a single reading for common day-to-day metrics — the same idea as the app’s 「快捷记一笔」: pick a familiar item (often things like 身高、体重、血压、心率、体温、腰围等,具体有哪些以当前账号下列出的可选项为准), enter a value and date, and it is stored like a normal indicator data point. No upload or report file required.
Agents should describe this in user-friendly terms (“帮你记一笔今天的体重”“看看现在能快捷记录哪些项目”) and only use the API steps below to implement it after the user is authenticated.
This skill also covers the agent/skill indicator endpoints under /api/skill/indicators/* for listing, categories, and trends.
Prerequisites — Auto-Auth (MANDATORY)
Working directory: this skill’s root folder (caremax-indicators/, sibling of caremax-auth/). Scripts in auth are reached with ../caremax-auth/scripts/.
CODEBLOCK0
If any script returns {"error":"no_credentials",...} → immediately run bash ../caremax-auth/scripts/auth-flow.sh [base_url] in background. If the user specified a custom URL (e.g., http://localhost:8788), pass it as the argument. It opens the browser and auto-polls. Tell the user "please authorize in browser". Once it outputs authorized, retry.
List All Indicators
CODEBLOCK1
Response fields: id (UUID, needed for trend), canonical_name, display_name, canonical_unit, category, latest_value, INLINECODE20
Get Indicator Categories
CODEBLOCK2
Get Indicator Trend
Important: Get the indicator UUID from the list endpoint first.
CODEBLOCK3
Returns time-series: date, value, unit, reference_range, is_abnormal (0/1)
Quick log — same feature as 「快捷记一笔」 (authenticated user only)
Prefer the dedicated scripts (wrap api-call.sh with the same OAuth user token). Do not hand-roll curl.
Typical user intents: “记一下体重 70”“今天身高 175”“帮妈妈记血压 120/80” — always run list-system-presets.sh first so you use a valid preset_key and know default units; use --member when logging for a family profile.
1) List what the user can quick-log right now
CODEBLOCK4
Response: presets[] — use preset_key for quick-log.sh; show display_name / canonical_unit when confirming with the user. Do not assume a fixed list of metrics in prose.
2) Save one value
CODEBLOCK5
- - Positional:
preset_key, value (required). - Optional:
--unit, --date YYYY-MM-DD (omit date → server default today), --member (family member UUID).
Lower-level equivalent (only if you need custom JSON)
CODEBLOCK6
Recommended workflow (quick log)
CODEBLOCK7
Get Trends by Category
CODEBLOCK8
Recommended Workflow
When user asks "show my creatinine trend":
CODEBLOCK9
When user asks "what are my abnormal indicators":
CODEBLOCK10
Display Guidelines
- - Always show values with units (e.g., "98 μmol/L" not just "98")
- Include reference ranges when available
- Flag abnormal values clearly
- For trends, show dates in chronological order
- Chinese indicator names are standard — display them as-is
CareMax 健康指标
需要将 caremax-auth 作为同级目录(../caremax-auth/,布局与本仓库中 skills/caremax-auth + skills/caremax-indicators 相同,或位于 ~/.agents/skills/ 下)。如果缺失:运行 npx skills add KittenYang/caremax-skills 并选择 caremax-auth。
终端用户可执行的操作(通俗语言)
- - 浏览和分析已保存的指标:列表、分类、随时间变化的趋势(化验指标和长期指标)。
- 快速添加单次读数,用于常见的日常指标——与应用的 「快捷记一笔」 功能相同:选择一个熟悉的项目(通常是 身高、体重、血压、心率、体温、腰围 等,具体有哪些以当前账号下列出的可选项为准),输入数值和日期,即可像普通指标数据点一样存储。无需上传或报告文件。
智能体应以用户友好的方式描述(“帮你记一笔今天的体重”“看看现在能快捷记录哪些项目”),并且仅在用户完成身份验证后使用以下 API 步骤来实现。
该技能还涵盖 /api/skill/indicators/* 下的智能体/技能指标端点,用于列表、分类和趋势。
前置条件——自动认证(必须)
工作目录: 本技能的根文件夹(caremax-indicators/,与 caremax-auth/ 同级)。认证脚本通过 ../caremax-auth/scripts/ 访问。
bash
简写——在 caremax-indicators/ 目录下运行
APICALL=bash ../caremax-auth/scripts/api-call.sh
LIST_PRESETS=bash ../caremax-auth/scripts/list-system-presets.sh
QUICK_LOG=bash ../caremax-auth/scripts/quick-log.sh
如果任何脚本返回 {error:nocredentials,...} → 立即在后台运行 bash ../caremax-auth/scripts/auth-flow.sh [baseurl]。如果用户指定了自定义 URL(例如 http://localhost:8788),将其作为参数传入。该脚本会打开浏览器并自动轮询。告知用户“请在浏览器中授权”。一旦输出 authorized,重试。
列出所有指标
bash
$APICALL GET /api/skill/indicators
带分类筛选:
$APICALL GET /api/skill/indicators?category=血常规
响应字段:id(UUID,用于趋势查询)、canonicalname、displayname、canonicalunit、category、latestvalue、data_count
获取指标分类
bash
$APICALL GET /api/skill/indicators/categories
获取指标趋势
重要提示:先从列表接口获取指标的 UUID。
bash
$APICALL GET /api/skill/indicators/trend?id={indicator_uuid}
返回时间序列数据:date、value、unit、referencerange、isabnormal(0/1)
快速记录——与「快捷记一笔」功能相同(仅限已认证用户)
优先使用专用脚本(使用相同的 OAuth 用户令牌封装 api-call.sh)。不要手动编写 curl 命令。
典型用户意图: “记一下体重 70”“今天身高 175”“帮妈妈记血压 120/80”——始终先运行 list-system-presets.sh,以便使用有效的 preset_key 并了解默认单位;为家庭成员记录时使用 --member。
1) 列出用户当前可快速记录的项目
bash
$LIST_PRESETS
响应:presets[]——使用 presetkey 作为 quick-log.sh 的参数;在与用户确认时显示 displayname / canonical_unit。不要假设固定的指标列表。
2) 保存一个数值
bash
$QUICK_LOG weight 72.5 --unit kg --date 2026-03-28
$QUICKLOG height 175 --member member_uuid>
- - 位置参数:preset_key、value(必填)。
- 可选参数:--unit、--date YYYY-MM-DD(省略日期 → 服务器默认今天)、--member(家庭成员 UUID)。
底层等效方法(仅在需要自定义 JSON 时使用)
bash
$APICALL GET /api/indicators/system-presets
$APICALL POST /api/indicators/quick-log {presetkey:weight,value:72.5,unit:kg,testdate:2026-03-28,member_id:...}
推荐工作流程(快速记录)
bash
用户:“帮我记身高” / “quick log my weight”
$LIST_PRESETS
将用户表述与 preset_key 匹配(如有歧义则询问)
$QUICK
LOG key> [--date ...] [--member ...]
口头确认:数值、单位、日期、所属档案
按分类获取趋势
bash
$APICALL GET /api/skill/indicators/trends-by-category?category={category_name}
推荐工作流程
当用户询问“显示我的肌酐趋势”时:
bash
1. 列出所有指标,找到匹配项
$APICALL GET /api/skill/indicators
2. 从响应中提取匹配指标的 id(UUID)
3. 获取趋势数据
$APICALL GET /api/skill/indicators/trend?id={uuid}
4. 展示日期、数值、单位,突出显示异常值
当用户询问“我的哪些指标异常”时:
bash
1. 获取所有指标
$APICALL GET /api/skill/indicators
2. 筛选出最新值异常的响应项
3. 展示数值和参考范围
展示指南
- - 始终显示带单位的数值(例如“98 μmol/L”而非仅“98”)
- 尽可能包含参考范围
- 明确标记异常值
- 对于趋势,按时间顺序显示日期
- 中文指标名称为标准名称——按原样显示