apple-health-sync

Receive, store, and analyze Apple Health data synced from iPhone. Auto-ingests incoming health snapshots and answers health queries in Chinese.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "apple-health-sync" with this command: npx skills add reffwu/health-to-openclaw

Apple Health Sync

This skill manages health data pushed from the companion iOS app (Health Sync for OpenClaw). It stores all incoming snapshots in a local SQLite database and answers health-related questions from that data.

Data Flow

iPhone (Health Sync app)
    ↓  POST /api/sessions/main/messages
OpenClaw Gateway
    ↓  agent receives message
This skill: ingest → SQLite → respond

When to Use (Auto-trigger)

Activate this skill automatically whenever a message arrives that starts with 🍎 Apple Health 数据更新. This is the standard header sent by the Health Sync iOS app.

Do NOT ask the user to confirm or describe the data — just ingest it silently and reply with a one-line acknowledgment.

When to Use (User Query)

Activate when the user asks about their health, fitness, or body data:

  • "今天走了多少步?"
  • "最近心率怎么样?"
  • "给我看看本周健康数据"
  • "我的睡眠质量"
  • "健康摘要"
  • "体重趋势"
  • Or any question about steps, heart rate, sleep, calories, weight, workouts, HRV, SpO2, etc.

When NOT to Use

  • User asks about medical advice → always defer to a doctor
  • User asks about app installation → refer to the iOS app README
  • Data is from a source other than Apple Health

Ingesting Incoming Data

When a message starts with 🍎 Apple Health 数据更新, run this command to store the data:

python3 ~/.openclaw/skills/apple-health-sync/ingest.py << 'HEALTH_EOF'
[paste the full message here]
HEALTH_EOF

Then reply with a brief acknowledgment in the format:

✅ 已存储 [N] 条 [类型] 数据([时间])

Keep it to one line. Do not repeat or summarize the raw data.

Important: The ingestion script is idempotent — running it twice on the same data is safe. If the script fails, tell the user and show the error.


Answering Health Queries

When the user asks about their health data, run the query script:

python3 ~/.openclaw/skills/apple-health-sync/query.py --type "[data_type]" --period "[today|week|month|all]"

Common type mappings (translate user intent → identifier):

User says--type value
步数 / 步 / stepsstepCount
心率 / heart rateheartRate
HRV / 心率变异heartRateVariabilitySDNN
血氧 / SpO2oxygenSaturation
体重 / weightbodyMass
睡眠 / sleepsleepAnalysis
卡路里 / 热量 / caloriesactiveEnergyBurned
运动 / workoutworkout
呼吸率 / respiratoryrespiratoryRate
体温 / temperaturebodyTemperature
血压收缩bloodPressureSystolic
血压舒张bloodPressureDiastolic
血糖bloodGlucose

If the user asks for a summary or doesn't specify a type, run:

python3 ~/.openclaw/skills/apple-health-sync/query.py --summary --period "[today|week|month]"

Format the query output into a clean, readable reply in Chinese. Do not dump raw JSON — interpret it naturally.


Database Location

All data is stored at ~/.apple-health-sync/health.db (SQLite). The scripts create this automatically on first run.

To check database status:

python3 ~/.openclaw/skills/apple-health-sync/query.py --status

Example Interactions

Incoming data (auto-ingest):

User: 🍎 Apple Health 数据更新
时间:2026-05-08 10:30:00
类型:步数
条数:5
---
• 05-08 08:00: 3,421 步
• 05-08 09:00: 1,892 步
...

Response: ✅ 已存储 5 条步数数据(05-08 10:30)

User query:

User: 今天走了多少步?

Action: Run query.py --type stepCount --period today, then reply naturally:

今天共走了 12,847 步,相当于约 9.3 公里。最活跃时段是上午 10-11 点。

Weekly summary:

User: 给我本周的健康摘要

Action: Run query.py --summary --period week, then format as a structured summary with emojis for each category.


Rules

  1. Always ingest before responding — run the ingest script first if the message is health data.
  2. Never fabricate data — only report what's in the database. If no data exists for a period, say so clearly.
  3. Be concise — health data responses should be scannable, not walls of text.
  4. Use Chinese for all responses (the data comes from a Chinese-configured iOS app).
  5. Respect privacy — don't log or repeat health values beyond what the user asked.
  6. Dates are local time — interpret all timestamps as the user's local timezone.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Fitness & Workout Manager

运动健康管家 Pro — 专为 Open Claw + 飞书生态打造的 AI 健身管家。双模式打卡(事后总结 / 边练边记)、3 层 Session 防丢失、飞书云文档同步、极致 Token 优化。Route to this skill when the user mentions workouts, logs...

Registry SourceRecently Updated
4820Profile unavailable
General

Mediwise Health Suite

Family health management suite: health records, diet tracking, weight management, wearable sync. Local SQLite storage by default; optional cloud features req...

Registry SourceRecently Updated
7501Profile unavailable
General

ClawCoach Core

AI health coach with dual personality modes (Supportive Mentor or Savage Roaster). Tracks nutrition from food photos, provides data-driven coaching, and hold...

Registry SourceRecently Updated
6030Profile unavailable
General

Garmin

Integrate with Garmin Connect to fetch and analyze deep fitness metrics including sleep, body battery, resting heart rate, stress, and training status. Use t...

Registry SourceRecently Updated
5740Profile unavailable