codybontecou/health-md/agentskills
Claude Code and agent skill by codybontecou/health-md
- community
Checking that the SKILL.md file is still in the repository.
Install and operate the standalone Health.md CLI and portable healthmd-mcp server on macOS, Linux, or Windows. Use when a user wants to pair an iPhone, configure Codex/Claude MCP, check direct readiness, query or chart typed health data, export Apple Health data, extract canonical JSON, manage durable jobs, automate safe runs, or troubleshoot machine-readable errors. This skill is for users, not Health.md developers.
Install
npx vskill@latest install codybontecou/health-md/agentskillsSKILL.md
Health.md CLI User Guide
The standalone CLI connects directly to iPhone. The Health.md macOS app is not required.
The CLI listens on the computer; the phone connects to the address entered in Direct CLI Access. Platform health reads always happen on the phone. Published alpha.6 binaries are wait-only; subsequent official builds can send one best-effort APNs notification when the selected iPhone is enrolled, while Android remains wait-only. A notification cannot authorize health access or bypass app activity, protected-data, permission, local-network, or quota controls.
Direct is the portable default. Do not add --backend mac-app: that adapter is reserved but unimplemented. The portable client supports Manual IP, including Tailscale addresses. Nearby is unsupported.
| Mobile source | Protocol; exact tag-SHA counterpart / unqualified floor | Portable operations | Public status | |
|---|---|---|---|---|
| Export-capable iPhone | 3 / v1; iOS 3.3.0 (202609032317) / 3.0.3 | Status, raw, extract, files, resume, cancel | Connectivity confirmed; full physical qualification pending | |
| Query-capable iPhone | 3 / v1 + v3; iOS 3.3.0 (202609032317) / 3.0.3 | V1 plus 19 fixed MCP tools | Connectivity confirmed; full physical qualification pending | |
| Android | 3 / v2; Android 1.8.2 (31) / 1.5.4 (25) | Status, native raw, files, resume, cancel | Connectivity confirmed; full physical qualification pending | |
| Android typed query | Not implemented | MCP query tools require iPhone v3 | Unsupported |
Basic physical iPhone and Android connectivity is confirmed, but no public CLI/mobile pair is fully qualified yet. Query v3 does not replace application v1 pairing/exports and Android never downgrades to v1. Record exact mobile build IDs during QA; matching versions alone are not full qualification evidence.
Bounded commands
On macOS/Linux, run the unfamiliar CLI non-interactively:
On Windows, use the automation host's process timeout. Pairing needs enough time for the user to enter the code on iPhone.
Install or verify
The formula installs matching healthmd and healthmd-mcp binaries. It does not qualify a CLI/mobile pair; use the exact mobile build named by release evidence. GitHub Releases also provide checksummed archives and installers. To build the same preview from source:
Do not install the old helper from the Mac app or use the monorepo's apps/apple/scripts/healthmd wrapper for normal operation; those target the legacy Swift compatibility client. Linux requires an unlocked freedesktop Secret Service provider such as GNOME Keyring or KWallet. The CLI never falls back to plaintext credentials.
For release archives, use the exact healthmd-cli/v<version> page rather than repository /releases/latest. Verify sha256.sum with its Sigstore bundle and expected workflow identity; require Developer ID/notarization on macOS. On Windows, require the documented Authenticode publisher/timestamp when the signing ledger is qualified; while it is deferred, verify the Sigstore-signed checksum closure and expect one SmartScreen prompt.
Upgrade both binaries together with brew update && brew upgrade healthmd, the exact versioned installer, or cargo install --locked --force healthmd-cli. Before uninstalling, finish/cancel jobs, unpair both sides, and use healthmd direct reset-trust --confirm only when all trust should be erased. brew uninstall healthmd, cargo uninstall healthmd-cli, or binary removal does not delete native credentials, durable state/spools, or exported files. Never erase unknown-outcome job state. Normal signed upgrades retain trust; moving from ad-hoc/unsigned macOS code to Developer ID requires one explicit unpair/re-pair.
For support, share only CLI/OS/architecture and exact mobile build versions, health-free error/status codes, job/request IDs, counts, and artifact digests. Never share raw health output, user paths, credentials, source records, routes, or user-data dates.
Pair once
While it waits:
- Read the six-digit code, candidate computer addresses, and port from stderr.
- On iPhone open Health.md → Sync → CLI.
- Enable Direct CLI Access, select Manual IP, and enter the computer's LAN/Tailscale address, port, and code.
- Keep Health.md foregrounded until stdout returns
healthmd.direct_pairing_resultwithstatus: successfor the intended iPhone.
The default port is 17647. If another port is saved on iPhone, pass it globally on every network command:
Pairing is one-time. Leave Direct CLI Access enabled and Health.md open for later commands. Use --device DEVICE_UUID when multiple iPhones are trusted.
Local trust commands do not contact iPhone:
Use healthmd direct reset-trust --confirm only to recover unusable local trust. It removes every local pairing; forget the paired CLI on each iPhone too.
Check readiness
Read the JSON:
backend == "direct"andmac_app == "bypassed": standalone path is active.iphone.connected == true: the intended iPhone authenticated.iphone.app_active == true: new work can begin.iphone.protected_data_available == true: protected export data is accessible.iphone.can_trigger_raw_exports == true: raw and extract are ready.iphone.can_trigger_exports == true: generated files are ready.iphone.active_job_id: another job may already own the service.direct_cli.paired == true: direct trust exists.
The direct status destination is intentionally unselected. File mode uses the explicit --destination; it never uses a Mac app bookmark.
Strict raw export
Choose exactly one range: --yesterday, --last N, --from/--to, or --all.
Without --output, validated health JSON streams to stdout. Prefer a protected output file. Strict raw returns healthmd.raw_result v1 with public schema-v7 healthmd.health_data documents and temporarily requests lossless records without changing saved iPhone settings.
Complete-empty is success. Missing, failed, cancelled, unsupported, skipped, or partial capture yields partial_success and a nonzero exit unless --allow-partial is explicit. That flag changes only exit status; diagnostics remain.
Canonical extraction
Use extract for selected health objects:
Extraction requires --metric, --category, a category-implying --object, or --all-metrics. Repeatable --object and --field /JSON/POINTER narrow output. Summary is default; archive/record selectors imply lossless. The canonical source is currently apple_health only.
JSON returns canonical documents or honest projections plus a receipt. JSONL writes its receipt to stderr, or OUTPUT.receipt.json with --output. Never interpret omitted fields as zero. Incomplete extraction emits no retained data unless --allow-partial is explicit.
Production-generated files
On macOS, Linux, or Windows, use an existing absolute non-symlink destination:
The iPhone uses production JSON/CSV/Markdown/ZIP/data-dictionary/roll-up/individual-record/Daily Note/provider exporters. The CLI validates manifests, digests, paths, symlinks, destination identity, and restart-safe overwrite/append/Markdown merge commits.
Default requested-date jobs keep saved formats, subfolder, templates, filenames, write mode, and Daily Note behavior while suppressing roll-ups and summary-only mode. Metric/category/detail selectors replace only that job's acquisition scope. --use-iphone-settings mirrors all saved behavior and cannot combine with selectors.
Protocol v1 treats the destination as an opaque immutable label on iPhone. The receiving host validates and durably binds the native absolute path before sending the request.
Codex and Claude MCP
For Codex, run healthmd setup codex. It safely preserves unrelated Codex settings, configures the absolute healthmd executable with arguments mcp serve, applies approval prompts to export mutations, and opens iPhone pairing when needed. Pairing and MCP deliberately use the same installed executable identity so native credentials never require a second Keychain ACL. healthmd-mcp remains a compatibility launcher: it execs the sibling healthmd on Unix, while Windows serves in-process and supervises its own same-file helper against the same fixed Credential Manager service/account. Do not run MCP serve mode as an interactive shell command.
The server exposes 19 fixed tools for direct readiness, Apple metric catalog, bounded typed queries, charts, sleep, workouts, comparison, coverage, evidence, and durable generated-file exports. Every query runs against the paired foreground iPhone; Health.md for Mac is not involved. Export, resume, and cancel calls require explicit user approval and an export needs an existing destination.
MCP Apps hosts negotiate io.modelcontextprotocol/ui and text/html;profile=mcp-app for the self-contained interactive view. Text/image hosts retain authoritative JSON and a portable PNG metric-chart fallback. Call healthmd_doctor first. Use all_pages: true for bounded automatic cursor traversal, or continue opaque cursors manually.
Use the fixed typed operation directly for analysis: healthmd_sleep_sessions for sleep, healthmd_workouts for workouts, and healthmd_metric_chart for metric series. tools/list supplies complete nested selectors and examples. The shell can run the identical operation as healthmd query TOOL_NAME --arguments 'JSON_OBJECT'; its canonical payload matches MCP before the MCP content envelope is added. Never substitute healthmd extract, which returns a different canonical source-data projection. healthmd mcp schema TOOL_NAME prints the generated shared schema without credentials, a listener, or iPhone access.
Durable jobs
Jobs persist for seven days. Timeout, Ctrl-C, process exit, network loss, or exhausted iOS background time does not cancel them.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingapps/apple/HealthMd/macOS/Resources/AgentSkills/healthmd-cli.skill.md
Popularity
- Repository stars
- 230
- Repository forks
- 18
- 7-day trend score
- 32
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/codybontecou/health-md/agentskills)