# Send HealthKit Sync to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- 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.
## Suggested prompts
### New install

```text
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.
```
### Upgrade existing

```text
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.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "healthkit-sync",
    "name": "HealthKit Sync",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/mneves75/healthkit-sync",
    "canonicalUrl": "https://clawhub.ai/mneves75/healthkit-sync",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/healthkit-sync",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=healthkit-sync",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "references/ARCHITECTURE.md",
      "references/CLI-REFERENCE.md",
      "references/SECURITY.md",
      "TESTING.md",
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "healthkit-sync",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-04T03:06:29.531Z",
      "expiresAt": "2026-05-11T03:06:29.531Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=healthkit-sync",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=healthkit-sync",
        "contentDisposition": "attachment; filename=\"healthkit-sync-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "healthkit-sync"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/healthkit-sync"
    },
    "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."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/healthkit-sync",
    "downloadUrl": "https://openagent3.xyz/downloads/healthkit-sync",
    "agentUrl": "https://openagent3.xyz/skills/healthkit-sync/agent",
    "manifestUrl": "https://openagent3.xyz/skills/healthkit-sync/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/healthkit-sync/agent.md"
  }
}
```
## Documentation

### HealthKit Sync CLI

Securely sync Apple HealthKit data from iPhone to Mac over local network using mTLS.

### When to Use This Skill

User asks about syncing health data from iPhone
User mentions healthsync CLI commands
User wants to fetch steps, heart rate, sleep, or workout data
User needs to pair a Mac with an iOS device
User asks about the iOS Health Sync project architecture
User mentions certificate pinning or mTLS patterns

### Pairing Flow (First Time)

# 1. Discover devices on local network
healthsync discover

# 2. On iOS app: tap "Share" to generate QR code, then "Copy"
# 3. Scan QR from clipboard (Universal Clipboard)
healthsync scan

# Alternative: scan from image file
healthsync scan --file ~/Desktop/qr.png

### Fetching Health Data

# Check connection status
healthsync status

# List enabled data types
healthsync types

# Fetch data as CSV (default)
healthsync fetch --start 2026-01-01T00:00:00Z --end 2026-12-31T23:59:59Z --types steps

# Fetch multiple types as JSON
healthsync fetch --start 2026-01-01T00:00:00Z --end 2026-12-31T23:59:59Z \\
  --types steps,heartRate,sleepAnalysis --format json | jq

# Pipe to file
healthsync fetch --start 2026-01-01T00:00:00Z --end 2026-12-31T23:59:59Z \\
  --types steps > steps.csv

### Available Health Data Types

Activity: steps, distanceWalkingRunning, distanceCycling, activeEnergyBurned, basalEnergyBurned, exerciseTime, standHours, flightsClimbed, workouts

Heart: heartRate, restingHeartRate, walkingHeartRateAverage, heartRateVariability

Vitals: bloodPressureSystolic, bloodPressureDiastolic, bloodOxygen, respiratoryRate, bodyTemperature, vo2Max

Sleep: sleepAnalysis, sleepInBed, sleepAsleep, sleepAwake, sleepREM, sleepCore, sleepDeep

Body: weight, height, bodyMassIndex, bodyFatPercentage, leanBodyMass

### Configuration

Config stored at ~/.healthsync/config.json (permissions: 0600):

{
  "host": "192.168.1.x",
  "port": 8443,
  "fingerprint": "sha256-certificate-fingerprint"
}

Token stored in macOS Keychain under service org.mvneves.healthsync.cli.

### Certificate Pinning

The CLI validates server certificates by SHA256 fingerprint (TOFU model):

First pairing stores fingerprint from QR code
Subsequent connections verify fingerprint matches
Mismatch = connection rejected (MITM protection)

### Local Network Only

Host validation restricts connections to:

localhost, *.local domains
Private IPv4: 192.168.*, 10.*, 172.16-31.*
IPv6 loopback: ::1, link-local: fe80::

### Keychain Storage

Tokens never stored in config file - always in Keychain with:

kSecAttrAccessibleWhenUnlocked protection class
Service: org.mvneves.healthsync.cli
Account: token-{host}

### Project Structure

ai-health-sync-ios-clawdbot/
├── iOS Health Sync App/          # Swift 6 iOS app
│   ├── Services/Security/        # CertificateService, KeychainStore, PairingService
│   ├── Services/HealthKit/       # HealthKitService, HealthSampleMapper
│   ├── Services/Network/         # NetworkServer (TLS), HTTPTypes
│   └── Services/Audit/           # AuditService (SwiftData)
└── macOS/HealthSyncCLI/          # Swift Package CLI

### Troubleshooting

"No devices found":

Ensure iOS app is running with sharing enabled
Both devices must be on same Wi-Fi network
Check firewall isn't blocking mDNS (port 5353)

"Pairing code expired":

Generate new QR code on iOS app (codes expire in 5 minutes)

"Certificate mismatch":

Delete ~/.healthsync/config.json and re-pair
Server certificate may have been regenerated

"Connection refused":

iOS app server may not be running
Run healthsync status --dry-run to test without connecting

### See Also

CLI Reference - Detailed command documentation
Security Patterns - mTLS and certificate pinning patterns
Architecture - iOS app architecture details
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: mneves75
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-04T03:06:29.531Z
- Expires at: 2026-05-11T03:06:29.531Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/healthkit-sync)
- [Send to Agent page](https://openagent3.xyz/skills/healthkit-sync/agent)
- [JSON manifest](https://openagent3.xyz/skills/healthkit-sync/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/healthkit-sync/agent.md)
- [Download page](https://openagent3.xyz/downloads/healthkit-sync)