apple-watch
FreeRuns bundled scriptsNot checkedApple Watch health data sync via Health Auto Export app. Use when querying sleep, heart rate, steps, workouts, or any health metrics. Also use when setting up…
by modbender★ 21 GitHub starsAbout this skill
Agent Instructions
This 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.
Before setup: confirm prerequisites with user
Ask the user to confirm ALL of these before proceeding:
- Do you have an Apple Watch?
- Do you have an iPhone paired with it?
- Have you installed Health Auto Export app?
- Are your iPhone and PC on the same Wi-Fi?
If any is missing, help them resolve it first. Do NOT run setup.py until all are confirmed.
Setup flow
Step 1: Run setup.py
Run 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.
Step 2: Start server as a persistent background service
The 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.
Windows - register as a startup task:
$action = New-ScheduledTaskAction -Execute "pythonw.exe" -Argument "server.py" -WorkingDirectory "<health-sync-dir>"
$trigger = New-ScheduledTaskTrigger -AtLogon
Register-ScheduledTask -TaskName "HealthSyncServer" -Action $action -Trigger $trigger -RunLevel Highest -Force
Start-ScheduledTask -TaskName "HealthSyncServer"
macOS - use launchd plist:
cat > ~/Library/LaunchAgents/com.health-sync.server.plist << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key><string>com.health-sync.server</string>
<key>ProgramArguments</key><array>
<string>python3</string><string>server.py</string>
</array>
<key>WorkingDirectory</key><string>HEALTH_SYNC_DIR</string>
<key>RunAtLoad</key><true/>
<key>KeepAlive</key><true/>
<key>StandardOutPath</key><string>HEALTH_SYNC_DIR/server.log</string>
<key>StandardErrorPath</key><string>HEALTH_SYNC_DIR/server.log</string>
</dict>
</plist>
EOF
# replace HEALTH_SYNC_DIR with actual path, then:
launchctl load ~/Library/LaunchAgents/com.health-sync.server.plist
Quick start (if you just need it running now, not persistent):
# Windows
start /B pythonw.exe server.py
# macOS / Linux
nohup python3 server.py > server.log 2>&1 &
Before starting, kill anything already on port 3001:
# Windows
(Get-NetTCPConnection -LocalPort 3001 -State Listen -ErrorAction SilentlyContinue).OwningProcess | ForEach-Object { Stop-Process -Id $_ -Force }
# macOS / Linux
lsof -ti:3001 | xargs kill -9 2>/dev/null
Verify it's running:
curl.exe -s -H "api-key: <key>" http://localhost:3001/api/summary
Note: on Windows use curl.exe (not curl which is a PowerShell alias for Invoke-WebRequest).
Step 3: Phone side (YOU MUST GUIDE THE USER STEP by STEP,once confirm one step is ready then move on to the another)
After 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.
- Send 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. - Tell the user to open the file on iPhone to import into Health Auto Export. SEND
tutorial_imgs/step1.pngwith your message TO USER- This auto-fills URL, metrics, format, and sync settings.
- CRITICAL: Tell the user to manually add the API key header after import. SEND
tutorial_imgs/step2.png.with your message TO USER- Open the imported automation -> scroll to Headers -> tap "Add Header"
- Key (left field):
api-key - Value (right field): the API key from .env.json
- Template import does NOT set headers. The user MUST do this step manually.(format: Key:xxx, Value:sk-xxx)
- Tell the user to tap "Manual Export" to test. SEND
tutorial_imgs/step3.pngwith your message TO USER - Verify data arrives: check /api/summary or /dashboard.
- Only after data is confirmed arriving, tell the user setup is complete.
Fallback: 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.
If already set up
If server.py and .env.json already exist:
- Check if server is running on port 3001.
- If running, check if data is flowing (/api/summary).
- If yes, skip setup. If no, troubleshoot (server running? correct API key? phone on same WiFi?).
Querying health data for the user
When the user asks about their health (sleep, heart rate, steps, etc.):
- Read the API key from .env.json. 2
Install apple-watch in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
FAQ
What does the apple-watch skill do?
Apple Watch health data sync via Health Auto Export app. Use when querying sleep, heart rate, steps, workouts, or any health metrics. Also use when setting up or troubleshooting the health data pipeline.
How do I install the apple-watch skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the apple-watch skill run scripts?
Yes, this skill bundles executable scripts. Review the source before installing.
Related skills
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
by Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
by Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
by Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
by Anthropic