{
  "schemaVersion": "1.0",
  "item": {
    "slug": "apple-watch",
    "name": "Apple Watch Health Sync",
    "source": "tencent",
    "type": "skill",
    "category": "数据分析",
    "sourceUrl": "https://clawhub.ai/LainNet-42/apple-watch",
    "canonicalUrl": "https://clawhub.ai/LainNet-42/apple-watch",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/apple-watch",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=apple-watch",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "scripts/setup.py",
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/apple-watch"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/apple-watch",
    "agentPageUrl": "https://openagent3.xyz/skills/apple-watch/agent",
    "manifestUrl": "https://openagent3.xyz/skills/apple-watch/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/apple-watch/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Agent Instructions",
        "body": "This skill has TWO parts: PC setup (automated) and Phone setup (requires user action).\nDo NOT just run setup.py and say \"done\". You MUST walk the user through the full flow."
      },
      {
        "title": "Before setup: confirm prerequisites with user",
        "body": "Ask the user to confirm ALL of these before proceeding:\n\nDo you have an Apple Watch?\n Do you have an iPhone paired with it?\n Have you installed Health Auto Export app?\n Are your iPhone and PC on the same Wi-Fi?\n\nIf any is missing, help them resolve it first. Do NOT run setup.py until all are confirmed."
      },
      {
        "title": "Step 1: Run setup.py",
        "body": "Run python scripts/setup.py - generates server, dashboard, API key, and phone templates.\nsetup.py does NOT start the server. You must start it yourself in step 2."
      },
      {
        "title": "Step 2: Start server as a persistent background service",
        "body": "The server MUST run independently of any agent session. Do NOT start it in an exec session\nthat will get killed by heartbeat or session recycling.\n\nWindows - register as a startup task:\n\n$action = New-ScheduledTaskAction -Execute \"pythonw.exe\" -Argument \"server.py\" -WorkingDirectory \"<health-sync-dir>\"\n$trigger = New-ScheduledTaskTrigger -AtLogon\nRegister-ScheduledTask -TaskName \"HealthSyncServer\" -Action $action -Trigger $trigger -RunLevel Highest -Force\nStart-ScheduledTask -TaskName \"HealthSyncServer\"\n\nmacOS - use launchd plist:\n\ncat > ~/Library/LaunchAgents/com.health-sync.server.plist << 'EOF'\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n  <key>Label</key><string>com.health-sync.server</string>\n  <key>ProgramArguments</key><array>\n    <string>python3</string><string>server.py</string>\n  </array>\n  <key>WorkingDirectory</key><string>HEALTH_SYNC_DIR</string>\n  <key>RunAtLoad</key><true/>\n  <key>KeepAlive</key><true/>\n  <key>StandardOutPath</key><string>HEALTH_SYNC_DIR/server.log</string>\n  <key>StandardErrorPath</key><string>HEALTH_SYNC_DIR/server.log</string>\n</dict>\n</plist>\nEOF\n# replace HEALTH_SYNC_DIR with actual path, then:\nlaunchctl load ~/Library/LaunchAgents/com.health-sync.server.plist\n\nQuick start (if you just need it running now, not persistent):\n\n# Windows\nstart /B pythonw.exe server.py\n# macOS / Linux\nnohup python3 server.py > server.log 2>&1 &\n\nBefore starting, kill anything already on port 3001:\n\n# Windows\n(Get-NetTCPConnection -LocalPort 3001 -State Listen -ErrorAction SilentlyContinue).OwningProcess | ForEach-Object { Stop-Process -Id $_ -Force }\n\n# macOS / Linux\nlsof -ti:3001 | xargs kill -9 2>/dev/null\n\nVerify it's running:\n\ncurl.exe -s -H \"api-key: <key>\" http://localhost:3001/api/summary\n\nNote: on Windows use curl.exe (not curl which is a PowerShell alias for Invoke-WebRequest)."
      },
      {
        "title": "Step 3: Phone side (YOU MUST GUIDE THE USER STEP by STEP，once confirm one step is ready then move on to the another)",
        "body": "After server is running, walk the user through phone configuration.\nRead the API key from .env.json first - you will need to tell the user. SEND THE FILE TO USER.\n\nSend the template JSON from templates/ to the user's iPhone. If your IM channel supports file attachments, send the file directly. Otherwise, paste the key settings as text.\nTell the user to open the file on iPhone to import into Health Auto Export. SEND tutorial_imgs/step1.png with your message TO USER\n\nThis auto-fills URL, metrics, format, and sync settings.\n\n\nCRITICAL: Tell the user to manually add the API key header after import. SEND tutorial_imgs/step2.png.with your message TO USER\n\nOpen the imported automation -> scroll to Headers -> tap \"Add Header\"\nKey (left field): api-key\nValue (right field): the API key from .env.json\nTemplate import does NOT set headers. The user MUST do this step manually.(format: Key：xxx, Value：sk-xxx)\n\n\nTell the user to tap \"Manual Export\" to test. SEND tutorial_imgs/step3.pngwith your message TO USER\nVerify data arrives: check /api/summary or /dashboard.\nOnly after data is confirmed arriving, tell the user setup is complete.\n\nFallback: if the user is confused by the template import flow, fall back to fully manual setup (Automations -> + -> REST API -> enter URL and header by hand). Only use this fallback when necessary."
      },
      {
        "title": "If already set up",
        "body": "If server.py and .env.json already exist:\n\nCheck if server is running on port 3001.\nIf running, check if data is flowing (/api/summary).\nIf yes, skip setup. If no, troubleshoot (server running? correct API key? phone on same WiFi?)."
      },
      {
        "title": "Querying health data for the user",
        "body": "When the user asks about their health (sleep, heart rate, steps, etc.):\n\nRead the API key from .env.json.\nQuery the API using curl.exe (NOT curl on Windows):\n\ncurl.exe -s -H \"api-key: <KEY>\" \"http://localhost:3001/api/latest/metrics/sleep_analysis?n=3\"\ncurl.exe -s -H \"api-key: <KEY>\" \"http://localhost:3001/api/latest/metrics/heart_rate?n=5\"\ncurl.exe -s -H \"api-key: <KEY>\" http://localhost:3001/api/summary\n\nSummarize the data in a readable format for the user."
      },
      {
        "title": "Dashboard screenshots",
        "body": "When the user wants to see their health stats visually, or you want to proactively show a summary:\n\nOpen http://localhost:3001/dashboard in a browser or take a screenshot.\nThe dashboard shows cards for each metric with latest values and record counts.\nScreenshot the dashboard and send it to the user as a visual health summary."
      },
      {
        "title": "Heartbeat integration",
        "body": "You can use your native heartbeat capability to periodically check the user's health data (e.g. detect wake-up, monitor heart rate). Add health check tasks to HEARTBEAT.md.\n\nExample HEARTBEAT.md entry:\n\n## Health Check\n- Query: curl.exe -s -H \"api-key: <KEY>\" \"http://localhost:3001/api/latest/metrics/sleep_analysis?n=1\"\n- Query: curl.exe -s -H \"api-key: <KEY>\" \"http://localhost:3001/api/latest/metrics/heart_rate?n=1\"\n- If sleep ended within last 2 hours: send wake-up greeting with sleep duration\n- If no data or server not responding: reply HEARTBEAT_OK (do NOT try to restart server)\n\nIMPORTANT for heartbeat:\n\nUse curl.exe not curl on Windows (avoid PowerShell alias issues).\nDo NOT start/restart the server from heartbeat. Server should be a persistent background service.\nKeep heartbeat health checks lightweight: 1-2 API calls max per heartbeat."
      },
      {
        "title": "Health Sync",
        "body": "Sync Apple Watch health data to your PC in real time."
      },
      {
        "title": "What you need",
        "body": "Hardware:\n\nApple Watch (any model with watchOS 9+)\niPhone (paired with the Apple Watch)\nA PC/Mac on the same Wi-Fi as your iPhone\n\nSoftware (phone side):\n\nHealth Auto Export app ($24.99 lifetime, one-time purchase)\n\nThis is the bridge: it reads Apple HealthKit data and pushes it over HTTP to your server\nFree tier only does manual export; Premium enables automatic background sync\n\nSoftware (PC side):\n\nPython 3.8+ (that's it, setup handles the rest)"
      },
      {
        "title": "How it works",
        "body": "Apple Watch -> iPhone HealthKit -> Health Auto Export app -> HTTP POST -> Python server -> JSONL files\n\nYour iPhone periodically sends health data as JSON to a lightweight Python server running on your PC.\nThe server stores everything as append-only JSONL files, queryable via REST API."
      },
      {
        "title": "One Click Setup",
        "body": "python scripts/setup.py\n\nNo git account needed. No Docker needed. Flask is auto-installed if missing.\n\nSetup will:\n\nAuto-install flask (if not already installed)\nGenerate a random API key -> .env.json (gitignored)\nDownload upstream repo (reference + optional Grafana dashboards)\nGenerate lightweight Python server\nGenerate web dashboard\nLet you pick data types, generate phone automation templates\nPrint step-by-step phone configuration"
      },
      {
        "title": "Phone Setup (after running setup.py)",
        "body": "Send the template JSON from templates/ to your iPhone (AirDrop, email, etc.)\nOpen the file on iPhone -> import into Health Auto Export\n\nThis sets URL, metrics, format, sync interval etc. automatically\n\n\nManually add the API key header (template import does NOT set headers):\n\nOpen the imported automation -> scroll to Headers -> tap \"Add Header\"\nKey (left field): api-key\nValue (right field): your API key from .env.json (setup.py prints this)\n\n\nTap Manual Export to test\nCheck http://localhost:3001/dashboard for data"
      },
      {
        "title": "Keep server running",
        "body": "The server must stay running to receive data from your phone.\n\nWindows - scheduled task (survives reboot):\n\n$action = New-ScheduledTaskAction -Execute \"pythonw.exe\" -Argument \"server.py\" -WorkingDirectory \"<health-sync-dir>\"\n$trigger = New-ScheduledTaskTrigger -AtLogon\nRegister-ScheduledTask -TaskName \"HealthSyncServer\" -Action $action -Trigger $trigger -RunLevel Highest -Force\n\nmacOS - launchd (survives reboot):\n\n# create plist at ~/Library/LaunchAgents/com.health-sync.server.plist\n# see Agent Instructions section for full plist template\nlaunchctl load ~/Library/LaunchAgents/com.health-sync.server.plist\n\nQuick (non-persistent):\n\n# Windows\nstart /B pythonw.exe server.py\n# macOS / Linux\nnohup python3 server.py > server.log 2>&1 &"
      },
      {
        "title": "Directory Structure",
        "body": "health-sync/\n  SKILL.md           <- this file\n  scripts/setup.py   <- one click setup\n  server.py          <- receiver server (generated)\n  dashboard.html     <- web dashboard (generated)\n  .env.json          <- API key (auto-generated, gitignored)\n  .gitignore         <- ignores .env.json, data/, upstream/\n  data/              <- received health data\n    metrics/         <- heart_rate.jsonl, sleep_analysis.jsonl, ...\n    workouts/        <- workouts.jsonl\n  templates/         <- phone automation config JSONs (importable)\n  upstream/          <- original repo (Grafana dashboards, Docker setup)"
      },
      {
        "title": "Server",
        "body": "python server.py\n\nReceives JSON POST on port 3001\nDashboard at http://localhost:3001/dashboard\nAPI key: auto-generated on first setup, stored in .env.json"
      },
      {
        "title": "Query data",
        "body": "API key is in .env.json (generated by setup.py). Use curl.exe on Windows:\n\n# get your api key\npython -c \"import json; print(json.load(open('.env.json'))['api_key'])\"\n\n# summary of all data\ncurl.exe -s -H \"api-key: YOUR_KEY\" http://localhost:3001/api/summary\n\n# latest N records\ncurl.exe -s -H \"api-key: YOUR_KEY\" \"http://localhost:3001/api/latest/metrics/sleep_analysis?n=5\"\ncurl.exe -s -H \"api-key: YOUR_KEY\" \"http://localhost:3001/api/latest/metrics/heart_rate?n=10\"\ncurl.exe -s -H \"api-key: YOUR_KEY\" \"http://localhost:3001/api/latest/metrics/step_count?n=10\""
      },
      {
        "title": "Key metrics",
        "body": "sleep_analysis (sleep start/end, deep/rem/core/awake)\nheart_rate (min/avg/max bpm)\nresting_heart_rate\nstep_count\nactive_energy / basal_energy_burned\nheart_rate_variability\nblood_oxygen_saturation\ntime_in_daylight\nheadphone_audio_exposure"
      },
      {
        "title": "Visualization",
        "body": "Dashboard: http://localhost:3001/dashboard (auto-refresh every 30s, dark theme, card layout)\nCan screenshot the dashboard to send to user as visual health summary\nGrafana (optional, heavy): see upstream/README.md (requires Docker + MongoDB)"
      },
      {
        "title": "Limitations",
        "body": "iPhone must be unlocked for background auto-sync (iOS restriction)\nPhone and PC must be on the same Wi-Fi / LAN\nServer must be running on PC to receive data\nHealth Auto Export Premium required for automatic sync ($24.99 lifetime), but they have a trail version"
      }
    ],
    "body": "Agent Instructions\n\nThis skill has TWO parts: PC setup (automated) and Phone setup (requires user action). Do NOT just run setup.py and say \"done\". You MUST walk the user through the full flow.\n\nBefore setup: confirm prerequisites with user\n\nAsk the user to confirm ALL of these before proceeding:\n\n Do you have an Apple Watch?\n Do you have an iPhone paired with it?\n Have you installed Health Auto Export app?\n Are your iPhone and PC on the same Wi-Fi?\n\nIf any is missing, help them resolve it first. Do NOT run setup.py until all are confirmed.\n\nSetup flow\nStep 1: Run setup.py\n\nRun python scripts/setup.py - generates server, dashboard, API key, and phone templates. setup.py does NOT start the server. You must start it yourself in step 2.\n\nStep 2: Start server as a persistent background service\n\nThe server MUST run independently of any agent session. Do NOT start it in an exec session that will get killed by heartbeat or session recycling.\n\nWindows - register as a startup task:\n\n$action = New-ScheduledTaskAction -Execute \"pythonw.exe\" -Argument \"server.py\" -WorkingDirectory \"<health-sync-dir>\"\n$trigger = New-ScheduledTaskTrigger -AtLogon\nRegister-ScheduledTask -TaskName \"HealthSyncServer\" -Action $action -Trigger $trigger -RunLevel Highest -Force\nStart-ScheduledTask -TaskName \"HealthSyncServer\"\n\n\nmacOS - use launchd plist:\n\ncat > ~/Library/LaunchAgents/com.health-sync.server.plist << 'EOF'\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n  <key>Label</key><string>com.health-sync.server</string>\n  <key>ProgramArguments</key><array>\n    <string>python3</string><string>server.py</string>\n  </array>\n  <key>WorkingDirectory</key><string>HEALTH_SYNC_DIR</string>\n  <key>RunAtLoad</key><true/>\n  <key>KeepAlive</key><true/>\n  <key>StandardOutPath</key><string>HEALTH_SYNC_DIR/server.log</string>\n  <key>StandardErrorPath</key><string>HEALTH_SYNC_DIR/server.log</string>\n</dict>\n</plist>\nEOF\n# replace HEALTH_SYNC_DIR with actual path, then:\nlaunchctl load ~/Library/LaunchAgents/com.health-sync.server.plist\n\n\nQuick start (if you just need it running now, not persistent):\n\n# Windows\nstart /B pythonw.exe server.py\n# macOS / Linux\nnohup python3 server.py > server.log 2>&1 &\n\n\nBefore starting, kill anything already on port 3001:\n\n# Windows\n(Get-NetTCPConnection -LocalPort 3001 -State Listen -ErrorAction SilentlyContinue).OwningProcess | ForEach-Object { Stop-Process -Id $_ -Force }\n\n# macOS / Linux\nlsof -ti:3001 | xargs kill -9 2>/dev/null\n\n\nVerify it's running:\n\ncurl.exe -s -H \"api-key: <key>\" http://localhost:3001/api/summary\n\n\nNote: on Windows use curl.exe (not curl which is a PowerShell alias for Invoke-WebRequest).\n\nStep 3: Phone side (YOU MUST GUIDE THE USER STEP by STEP，once confirm one step is ready then move on to the another)\n\nAfter server is running, walk the user through phone configuration. Read the API key from .env.json first - you will need to tell the user. SEND THE FILE TO USER.\n\nSend the template JSON from templates/ to the user's iPhone. If your IM channel supports file attachments, send the file directly. Otherwise, paste the key settings as text.\nTell the user to open the file on iPhone to import into Health Auto Export. SEND tutorial_imgs/step1.png with your message TO USER\nThis auto-fills URL, metrics, format, and sync settings.\nCRITICAL: Tell the user to manually add the API key header after import. SEND tutorial_imgs/step2.png.with your message TO USER\nOpen the imported automation -> scroll to Headers -> tap \"Add Header\"\nKey (left field): api-key\nValue (right field): the API key from .env.json\nTemplate import does NOT set headers. The user MUST do this step manually.(format: Key：xxx, Value：sk-xxx)\nTell the user to tap \"Manual Export\" to test. SEND tutorial_imgs/step3.pngwith your message TO USER\nVerify data arrives: check /api/summary or /dashboard.\nOnly after data is confirmed arriving, tell the user setup is complete.\n\nFallback: if the user is confused by the template import flow, fall back to fully manual setup (Automations -> + -> REST API -> enter URL and header by hand). Only use this fallback when necessary.\n\nIf already set up\n\nIf server.py and .env.json already exist:\n\nCheck if server is running on port 3001.\nIf running, check if data is flowing (/api/summary).\nIf yes, skip setup. If no, troubleshoot (server running? correct API key? phone on same WiFi?).\nQuerying health data for the user\n\nWhen the user asks about their health (sleep, heart rate, steps, etc.):\n\nRead the API key from .env.json.\nQuery the API using curl.exe (NOT curl on Windows):\ncurl.exe -s -H \"api-key: <KEY>\" \"http://localhost:3001/api/latest/metrics/sleep_analysis?n=3\"\ncurl.exe -s -H \"api-key: <KEY>\" \"http://localhost:3001/api/latest/metrics/heart_rate?n=5\"\ncurl.exe -s -H \"api-key: <KEY>\" http://localhost:3001/api/summary\n\nSummarize the data in a readable format for the user.\nDashboard screenshots\n\nWhen the user wants to see their health stats visually, or you want to proactively show a summary:\n\nOpen http://localhost:3001/dashboard in a browser or take a screenshot.\nThe dashboard shows cards for each metric with latest values and record counts.\nScreenshot the dashboard and send it to the user as a visual health summary.\nHeartbeat integration\n\nYou can use your native heartbeat capability to periodically check the user's health data (e.g. detect wake-up, monitor heart rate). Add health check tasks to HEARTBEAT.md.\n\nExample HEARTBEAT.md entry:\n\n## Health Check\n- Query: curl.exe -s -H \"api-key: <KEY>\" \"http://localhost:3001/api/latest/metrics/sleep_analysis?n=1\"\n- Query: curl.exe -s -H \"api-key: <KEY>\" \"http://localhost:3001/api/latest/metrics/heart_rate?n=1\"\n- If sleep ended within last 2 hours: send wake-up greeting with sleep duration\n- If no data or server not responding: reply HEARTBEAT_OK (do NOT try to restart server)\n\n\nIMPORTANT for heartbeat:\n\nUse curl.exe not curl on Windows (avoid PowerShell alias issues).\nDo NOT start/restart the server from heartbeat. Server should be a persistent background service.\nKeep heartbeat health checks lightweight: 1-2 API calls max per heartbeat.\nHealth Sync\n\nSync Apple Watch health data to your PC in real time.\n\nWhat you need\n\nHardware:\n\nApple Watch (any model with watchOS 9+)\niPhone (paired with the Apple Watch)\nA PC/Mac on the same Wi-Fi as your iPhone\n\nSoftware (phone side):\n\nHealth Auto Export app ($24.99 lifetime, one-time purchase)\nThis is the bridge: it reads Apple HealthKit data and pushes it over HTTP to your server\nFree tier only does manual export; Premium enables automatic background sync\n\nSoftware (PC side):\n\nPython 3.8+ (that's it, setup handles the rest)\nHow it works\nApple Watch -> iPhone HealthKit -> Health Auto Export app -> HTTP POST -> Python server -> JSONL files\n\n\nYour iPhone periodically sends health data as JSON to a lightweight Python server running on your PC. The server stores everything as append-only JSONL files, queryable via REST API.\n\nOne Click Setup\npython scripts/setup.py\n\n\nNo git account needed. No Docker needed. Flask is auto-installed if missing.\n\nSetup will:\n\nAuto-install flask (if not already installed)\nGenerate a random API key -> .env.json (gitignored)\nDownload upstream repo (reference + optional Grafana dashboards)\nGenerate lightweight Python server\nGenerate web dashboard\nLet you pick data types, generate phone automation templates\nPrint step-by-step phone configuration\nPhone Setup (after running setup.py)\nSend the template JSON from templates/ to your iPhone (AirDrop, email, etc.)\nOpen the file on iPhone -> import into Health Auto Export\nThis sets URL, metrics, format, sync interval etc. automatically\nManually add the API key header (template import does NOT set headers):\nOpen the imported automation -> scroll to Headers -> tap \"Add Header\"\nKey (left field): api-key\nValue (right field): your API key from .env.json (setup.py prints this)\nTap Manual Export to test\nCheck http://localhost:3001/dashboard for data\nKeep server running\n\nThe server must stay running to receive data from your phone.\n\nWindows - scheduled task (survives reboot):\n\n$action = New-ScheduledTaskAction -Execute \"pythonw.exe\" -Argument \"server.py\" -WorkingDirectory \"<health-sync-dir>\"\n$trigger = New-ScheduledTaskTrigger -AtLogon\nRegister-ScheduledTask -TaskName \"HealthSyncServer\" -Action $action -Trigger $trigger -RunLevel Highest -Force\n\n\nmacOS - launchd (survives reboot):\n\n# create plist at ~/Library/LaunchAgents/com.health-sync.server.plist\n# see Agent Instructions section for full plist template\nlaunchctl load ~/Library/LaunchAgents/com.health-sync.server.plist\n\n\nQuick (non-persistent):\n\n# Windows\nstart /B pythonw.exe server.py\n# macOS / Linux\nnohup python3 server.py > server.log 2>&1 &\n\nDirectory Structure\nhealth-sync/\n  SKILL.md           <- this file\n  scripts/setup.py   <- one click setup\n  server.py          <- receiver server (generated)\n  dashboard.html     <- web dashboard (generated)\n  .env.json          <- API key (auto-generated, gitignored)\n  .gitignore         <- ignores .env.json, data/, upstream/\n  data/              <- received health data\n    metrics/         <- heart_rate.jsonl, sleep_analysis.jsonl, ...\n    workouts/        <- workouts.jsonl\n  templates/         <- phone automation config JSONs (importable)\n  upstream/          <- original repo (Grafana dashboards, Docker setup)\n\nServer\npython server.py\n\nReceives JSON POST on port 3001\nDashboard at http://localhost:3001/dashboard\nAPI key: auto-generated on first setup, stored in .env.json\nQuery data\n\nAPI key is in .env.json (generated by setup.py). Use curl.exe on Windows:\n\n# get your api key\npython -c \"import json; print(json.load(open('.env.json'))['api_key'])\"\n\n# summary of all data\ncurl.exe -s -H \"api-key: YOUR_KEY\" http://localhost:3001/api/summary\n\n# latest N records\ncurl.exe -s -H \"api-key: YOUR_KEY\" \"http://localhost:3001/api/latest/metrics/sleep_analysis?n=5\"\ncurl.exe -s -H \"api-key: YOUR_KEY\" \"http://localhost:3001/api/latest/metrics/heart_rate?n=10\"\ncurl.exe -s -H \"api-key: YOUR_KEY\" \"http://localhost:3001/api/latest/metrics/step_count?n=10\"\n\nKey metrics\nsleep_analysis (sleep start/end, deep/rem/core/awake)\nheart_rate (min/avg/max bpm)\nresting_heart_rate\nstep_count\nactive_energy / basal_energy_burned\nheart_rate_variability\nblood_oxygen_saturation\ntime_in_daylight\nheadphone_audio_exposure\nVisualization\nDashboard: http://localhost:3001/dashboard (auto-refresh every 30s, dark theme, card layout)\nCan screenshot the dashboard to send to user as visual health summary\nGrafana (optional, heavy): see upstream/README.md (requires Docker + MongoDB)\nLimitations\niPhone must be unlocked for background auto-sync (iOS restriction)\nPhone and PC must be on the same Wi-Fi / LAN\nServer must be running on PC to receive data\nHealth Auto Export Premium required for automatic sync ($24.99 lifetime), but they have a trail version"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/LainNet-42/apple-watch",
    "publisherUrl": "https://clawhub.ai/LainNet-42/apple-watch",
    "owner": "LainNet-42",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/apple-watch",
    "downloadUrl": "https://openagent3.xyz/downloads/apple-watch",
    "agentUrl": "https://openagent3.xyz/skills/apple-watch/agent",
    "manifestUrl": "https://openagent3.xyz/skills/apple-watch/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/apple-watch/agent.md"
  }
}