iOS HealthKit 数据同步 CLI 命令和模式。在使用 healthsync CLI、获取 Apple Health 数据(步数、心率、睡眠、锻炼)、通过本地网络配对 iOS 设备或了解 iOS Health Sync 项目架构(包括 mTLS 证书固定、钥匙串存储)时使用
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install healthkit-sync或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install healthkit-sync⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/healthkit-sync/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: healthkit-sync description: iOS HealthKit data sync CLI commands and patterns. Use when working with healthsync CLI, fetching Apple Health data (steps, heart rate, sleep, workouts), pairing iOS devices over local network, or understanding the iOS Health Sync project architecture including mTLS certificate pinning, Keychain storage, and audit logging. license: Apache-2.0 compatibility: macOS with healthsync CLI installed (~/.healthsync/config.json) metadata: category: development platforms: ios,macos author: mneves ---
Securely sync Apple HealthKit data from iPhone to Mac over local network using mTLS.
healthsync CLI commands# 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
# 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
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
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.
The CLI validates server certificates by SHA256 fingerprint (TOFU model):
Host validation restricts connections to:
localhost, *.local domains192.168., 10., 172.16-31.*::1, link-local: fe80::Tokens never stored in config file - always in Keychain with:
kSecAttrAccessibleWhenUnlocked protection classorg.mvneves.healthsync.clitoken-{host}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
"No devices found":
"Pairing code expired":
"Certificate mismatch":
~/.healthsync/config.json and re-pair"Connection refused":
healthsync status --dry-run to test without connecting安装 健康套件同步 后,可以对 AI 说这些话来触发它
Help me get started with HealthKit Sync
Explains what HealthKit Sync does, walks through the setup, and runs a quick demo based on your current project
Use HealthKit Sync to iOS HealthKit data sync CLI commands and patterns
Invokes HealthKit Sync with the right parameters and returns the result directly in the conversation
What can I do with HealthKit Sync in my developer & devops workflow?
Lists the top use cases for HealthKit Sync, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/healthkit-sync/ 目录(个人级,所有项目可用),或 .claude/skills/healthkit-sync/(项目级)。重启 AI 客户端后,用 /healthkit-sync 主动调用,或让 AI 根据上下文自动发现并使用。
健康套件同步 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
健康套件同步 可免费安装使用。请查阅仓库了解许可证信息。
iOS HealthKit 数据同步 CLI 命令和模式。在使用 healthsync CLI、获取 Apple Health 数据(步数、心率、睡眠、锻炼)、通过本地网络配对 iOS 设备或了解 iOS Health Sync 项目架构(包括 mTLS 证书固定、钥匙串存储)时使用
健康套件同步 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using HealthKit Sync
Identifies repetitive steps in your workflow and sets up HealthKit Sync to handle them automatically