← 返回 Skills 市场
ajde0606

apple-health-skills

作者 ajde0606 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
81
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install apple-health-skills
功能描述
Use this skill when the user asks for Apple Health summaries, trends, alerts, or check-ins from the local collector. Validate collector connectivity over HTT...
使用说明 (SKILL.md)

Apple Health Query Skill

Use this skill to analyze Apple Health data already synced into local SQLite by the collector.

Tools to use

  • Shell tool: run scripts/query_health.py to pull fresh JSON data.
  • HTTP tool: optionally verify collector availability with /healthz before troubleshooting missing data.

Workflow

  1. (Optional health check) Verify collector is reachable when user reports stale/missing data:
    • curl -fsS http://\x3Ccollector-host>:8443/healthz
    • if TLS is enabled: curl -fsS https://\x3Ccollector-host>:8443/healthz
  2. Query the local database via shell (preferred default):
    • python scripts/query_health.py --window-hours 24 --sleep-nights 7 --types heart_rate,glucose,sleep_stage
  3. Adjust parameters to user intent:
    • Short check-in: --window-hours 1
    • Daily review: --window-hours 24 --sleep-nights 7
    • Alert follow-up: keep --types narrow to requested metrics.
  4. Summarize with numbers and timestamps, then give practical next steps.
  5. Always include safety framing: informational only, not medical advice; suggest clinician contact for extreme/persistent readings.

Output expectations

Base your answer on the returned JSON fields:

  • generated_at, user_id, window_hours
  • quantity.\x3Cmetric>[] entries with {ts, value, unit, source, device}
  • sleep[] entries with {start_ts, end_ts, category, source, device}

Response style guardrails

  • Cite the exact time window used (for example: “last 24 hours” and “last 7 nights”).
  • Highlight notable thresholds carefully (e.g., glucose outside typical 70–180 mg/dL range).
  • Tie suggestions to observed values; avoid generic advice.
  • Never hardcode user IDs or DB paths—scripts/query_health.py already reads .env.

Live Heart Rate

The collector stores real-time BLE heart rate events from Wahoo HR straps (and compatible sensors) in the live_events table. Use this for workout monitoring, recent-activity check-ins, or comparing live readings against resting baseline.

Tools to use

  • Shell tool: run scripts/query_live_hr.py to pull live HR events and per-session summaries.

Workflow

  1. Query recent live HR events (default: last 60 minutes):
    • python scripts/query_live_hr.py --window-minutes 60
  2. Narrow to the last workout or a specific timeframe:
    • python scripts/query_live_hr.py --window-minutes 120
  3. Filter to a specific session (use a session UUID from a previous query):
    • python scripts/query_live_hr.py --session-id \x3Cuuid> --window-minutes 180
  4. Filter to a specific device (useful when multiple sensors are paired):
    • python scripts/query_live_hr.py --device-id \x3Cdevice_id> --window-minutes 60

Output fields

Base your answer on the returned JSON:

  • summary — aggregate stats for the queried window:
    • count — total event count
    • latest_bpm, min_bpm, max_bpm, avg_bpm, median_bpm, stddev_bpm
    • latest_zone — heart rate zone: resting (\x3C60), normal (60–99), elevated (100–139), high (≥140)
  • sessions[] — per-session breakdown with session_id, event_count, start_ts, end_ts, device_name, avg_bpm, min_bpm, max_bpm
  • events[] — individual readings with ts, value (BPM), session_id, seq, device_id, source_device_name

Guidance

  • Workout summary: report avg_bpm, max_bpm, and duration (start_tsend_ts of the session).
  • Zone coaching: map latest_zone to practical advice (e.g., elevated zone during recovery warrants attention).
  • Unusual readings: flag sustained HR >150 or \x3C40 bpm; recommend clinician contact if persistent.
  • Data freshness: if count is 0, the sensor may not be paired or the session may not have started — advise the user to open the Live HR screen on their iPhone.
安全使用建议
This skill will run bundled Python scripts that open a local SQLite health database and read a .env file from the repository root. Before installing or invoking it: (1) verify whether you have a .env in the working directory and inspect it for any secrets (client IDs, tokens, passwords). Remove or relocate any sensitive entries you don't want the skill to see (e.g., WHOOP_CLIENT_SECRET). (2) Confirm you are comfortable the agent may include values like AHB_USER_ID in the JSON it returns (these are printed by the scripts). (3) If you prefer tighter control, run the scripts yourself locally and paste only the redacted JSON into the agent instead of giving it raw execution access. (4) Be aware the bundle contains Whoop setup instructions referencing OAuth secrets though the setup scripts are not included here; if you don't use Whoop this part is extraneous. If you want to proceed, require the agent to run this skill only after manual review and avoid running it in environments that contain unrelated secrets.
功能分析
Type: OpenClaw Skill Name: apple-health-skills Version: 1.0.0 The skill bundle provides a set of tools for querying and analyzing Apple Health and Whoop data stored in a local SQLite database. The Python scripts (query_health.py, query_live_hr.py, and query_whoop.py) perform standard data retrieval and statistical calculations using the sqlite3 and statistics modules, with no evidence of data exfiltration, obfuscation, or malicious execution. The instructions in SKILL.md and WHOOP_SKILL.md are well-aligned with the stated purpose of health coaching and include appropriate safety disclaimers regarding medical advice.
能力评估
Purpose & Capability
The skill is presented as an Apple Health query tool and the scripts do query local SQLite health data as described. However the bundle also contains WHOOP-specific documentation and scripts (Whoop workflow references), which is additional scope not mentioned in the top-level description; that may be intentional (aggregator for multiple sources) but is an unexpected inclusion.
Instruction Scope
SKILL.md instructs the agent to run local Python scripts and an optional curl to a collector healthz endpoint. The scripts read a .env file from the repo root and then open local SQLite DBs and print JSON. That behavior is consistent with the stated task but grants the skill access to any values present in the local .env and the database contents — data that may include identifiers or secrets. The instructions also permit use of an open 'curl http://<collector-host>:8443/healthz' which requires the agent to reach a network host the user must supply; this is expected but worth noting.
Install Mechanism
No install spec: the skill is instruction-only and executes bundled scripts via the shell tool. Nothing is downloaded or installed by the skill itself.
Credentials
The registry lists no required env vars, but all three scripts attempt to load repo_root/.env and expect (or require) AHB_USER_ID and optionally AHB_DB_PATH (and WHOOP docs reference WHOOP_CLIENT_ID/SECRET). Those environment/config expectations are not declared in the metadata. Loading a .env and injecting its keys into process env means any secrets stored there (client secrets, tokens, identifiers) could be read by the scripts and included in outputs sent back to the agent/model.
Persistence & Privilege
The skill does not request always: true, does not modify other skills or system-wide settings, and has no install-time persistence. It only runs bundled scripts when invoked.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install apple-health-skills
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /apple-health-skills 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
apple-health-query skill v1.0.0 - Initial release with support for querying Apple Health data collected locally via shell and HTTP tools. - Summarizes key health metrics (heart rate, glucose, sleep) from recent time windows, with coaching-style guidance and safety framing. - Provides special workflows and summaries for live Bluetooth heart rate data, including workout and recovery monitoring. - Clear output guardrails to ensure contextualized, user-specific advice, always emphasizing non-medical guidance and clinician contact for extreme/persistent values.
元数据
Slug apple-health-skills
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

apple-health-skills 是什么?

Use this skill when the user asks for Apple Health summaries, trends, alerts, or check-ins from the local collector. Validate collector connectivity over HTT... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 81 次。

如何安装 apple-health-skills?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install apple-health-skills」即可一键安装,无需额外配置。

apple-health-skills 是免费的吗?

是的,apple-health-skills 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

apple-health-skills 支持哪些平台?

apple-health-skills 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 apple-health-skills?

由 ajde0606(@ajde0606)开发并维护,当前版本 v1.0.0。

💬 留言讨论