跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
浏览器与自动化

apple-health-analyst

Analyze Apple Health export ZIP. Run local prepare to generate structured insights, then produce complementary health and training reports with long-term context.

RuochenLyu · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add RuochenLyu/apple-health-analyst --skill apple-health-analyst

技能说明


name: apple-health-analyst description: Analyze Apple Health export ZIP. Run local prepare to generate structured insights, then produce complementary health and training reports with long-term context.

Apple Health Advisor

Use this skill when a user wants to analyze an Apple Health export ZIP. The ZIP is too large to fit directly into context, so the skill uses a local CLI pipeline to parse and structure the data first.

This is one skill that ships two complementary reports:

  • Default (recommended): generate BOTH reports — health report + training report, rendered into the same output/ folder and cross-linked via an in-page link in the topbar. prepare runs once, then render runs twice.
  • Explicit health-only: user says "只要健康报告" / "health report only" / similar → skip training render.
  • Explicit training-only: user says "只要运动报告" / "training report only" / similar → skip health render. Naming a sport without saying "only" still produces both reports and prioritizes that sport in the training narrative.

Language Detection

Detect the user's language from their message:

  • If the user writes in Chinese, use --lang zh
  • For all other languages, use --lang en

The narrative language must match the language declared in insights.json:

  • Health report: narrativeContext.language
  • Training report: training.narrativeContext.language

Intent Routing

Default: generate both health + training reports. Only drop one when the user is explicit.

  • Default (both) examples:
    • Analyze my Apple Health export
    • 帮我分析 Apple Health 导出
    • Generate a report from my Apple Health export
  • Health-only examples (skip training render):
    • Only generate the health report
    • 只要健康报告
    • 不用生成运动报告
  • Training-only examples (skip health render):
    • Only generate the training report
    • 只要运动报告
    • 只生成运动报告,重点分析拳击
    • Only generate the training report for running and cycling
  • Named-sport examples that still default to both:
    • 重点分析拳击训练状态
    • 分析跑步和骑行训练趋势

Ambiguous-but-lean-training keywords still default to both reports (the training report alone is rarely enough context). The keywords below only matter as hints — they do NOT suppress the health report unless the user also says "只" / "only":

  • training, workout, 运动, 训练, 专项
  • named sports such as boxing, running, cycling, walking, hiking, strength training, 拳击, 跑步, 骑行, 力量训练

Your Role

Two roles share the same pipeline:

  1. Health management advisor:
    • Integrate sleep, recovery, activity, and body metrics into an overall health view
    • Prioritize cross-metric reasoning over metric-by-metric reporting
  2. Training status advisor:
    • Judge load, recovery support, consistency, and sport-specific trends
    • Give actionable training-management advice without pretending to be Garmin or a coach writing a periodized plan

Workflow

  1. Confirm the input is an official Apple Health export ZIP and that the main XML has HealthData as its root node.
  2. Run local prepare once with the correct --lang, producing summary.json and insights.json. Raw ZIP/XML parsing stays local. If the active agent uses a hosted model for the narrative, the structured JSON it reads may be processed by that model provider; follow the provider's data controls and the repository privacy notice.
  3. Read summary.json, then insights.json.
  4. Decide which reports to produce (default = both unless the user is explicit; see Intent Routing).
  5. For each selected report, write the narrative JSON:
    • health: report.llm.json
    • training: training.report.llm.json
  6. Run render for each selected report:
    • health: default render
    • training: render --type training
  7. Both HTML reports share the same output/ folder. The topbar carries a cross-link between them, so the user can jump back and forth. File names are fixed (report.html ↔ training.report.html) — do not rename.

insights.json Keys You Must Use

Shared

KeyWhat it contains
metadatatool, version, language, schemaVersion, generatedAt
historicalContextRecent 30d, baseline 90d, trailing 180d, all-time context
charts[]Health chart groups
crossMetricCross-metric health reasoning
riskFlags[]Health risks with evidence
notableChanges[]Significant changes
dataGaps[]Missing or sparse data warnings
sourceConfidence[]Device/source reliability signals

Health report

KeyWhat it contains
analysis.sleepSleep duration, stages, timing, regularity
analysis.recoveryRHR, HRV, blood oxygen, respiratory rate, VO2 max
analysis.activityActive energy, exercise minutes, stand hours, workouts
analysis.bodyCompositionWeight, body fat %
analysis.menstrualCycleCycle analysis if present
narrativeContextHealth-report audience, goal, schema version, boundaries

Training report

KeyWhat it contains
training.summaryTraining state, readiness, recent load, recovery support, primary sport
training.summary.trainingLoadMET-minute EWMA load snapshot (42-day CTL baseline, 7-day ATL recent load, TSB load balance) + relative 30-day & 90-day changes; null when < 28 days of data or < 6 load-bearing workouts
training.sports[]Top sports (dormant ones filtered, topSportCount configurable via --top-sports, default 5) with recent/baseline/trailing/all-time windows, recovery-after-workout, consistency, tags
training.charts[]training_load (CTL/ATL monthly curve), training_recovery, and sport_<slug>_trend charts
training.narrativeContextTraining-report audience, goal, schema version, boundaries

Commands

Default flow — prepare once, render twice so the folder contains both report sets. Pass --with-cross-link to both render calls so

阅读完整来源 ↗