codybontecou/health-md/v4
Claude Code and agent skill by codybontecou/health-md
- community
Checking that the SKILL.md file is still in the repository.
Safely install and use the Health.md CLI and MCP server to query user-authorized health data, chart typed metrics, inspect sleep and workouts, export scoped Apple Health or Health Connect data, and recover durable jobs on macOS, Linux, or Windows. Use for consumer workflows, not Health.md development.
Install
npx vskill@latest install codybontecou/health-md/v4SKILL.md
Health.md CLI
Use the standalone healthmd command. Health.md for Mac is not required.
The CLI listens on the computer; the phone connects to the displayed address. It cannot wake a phone, bypass app activity, permissions, protected-data controls, quotas, or OS background limits. Direct is the portable default. Do not add --backend mac-app or --transport nearby.
Authorization and privacy first
Treat the user's request as authority only for its stated device, operation, metrics/categories, dates, sources, detail, destination, and disclosure level. Ask before widening any of them.
- Default to the smallest useful date and metric scope.
- Get explicit approval before pairing, returning health values in chat, using
--all, requesting lossless records, enabling--allow-partial, writing generated files, changing trust, or deleting state. - Use a user-approved private absolute path outside a repository for health artifacts. Do not assume a synced or shared folder is private.
- Pairing QR images and fallback codes contain short-lived secrets. Render them only to the user; never transcribe, reconstruct, upload, or log them.
- Local stdio means Health.md itself needs no health-data cloud. It does not guarantee local model inference: the MCP host or model provider may process returned values under its own policies.
- Do not diagnose, recommend treatment, infer causation, or label a result healthy, harmful, better, or worse. Preserve exact metric IDs, statistics, units, dates/timezone, source, coverage, missingness, evidence, and limitations.
- Never merge HealthKit HRV SDNN with Health Connect or WHOOP HRV RMSSD.
Verify release compatibility
The 0.1.0-alpha.3 package is an explicitly unqualified public preview. No public CLI/mobile pair is physically qualified yet. Its source snapshot contains these exact counterparts:
| Mobile source | Protocol | Exact counterpart in the release snapshot | Portable operations | |
|---|---|---|---|---|
| iPhone exports | v1 | iOS 3.2.1 (build 202608300209) | status, raw, extract, files, resume, cancel | |
| iPhone typed queries | v1 + query v3 | iOS 3.2.1 (build 202608300209) | the export operations plus fixed typed query tools | |
| Android exports | v2 | Android 1.8.1 (versionCode 30) | status, provider-native raw, files, resume, cancel | |
| Android typed queries | unavailable | not implemented | do not claim support |
The unqualified protocol floors remain iOS 3.0.3 and Android 1.5.4 (versionCode 25), but protocol implementation is not release qualification. Check the exact package and mobile build before live work. Do not claim App Store or Play Store compatibility from a marketing version alone.
Authoritative ledger: <https://github.com/CodyBontecou/health-md/blob/main/apps/cli/docs/mobile-compatibility.md>
Install or verify
On macOS or Linux, install the matching preview binaries together:
For Windows or direct archive installation, use the exact healthmd-cli/v<version> GitHub Release—not repository /releases/latest—and follow that release's checksum, Sigstore, and publisher-verification instructions. Do not mix healthmd and healthmd-mcp versions.
Authorized preview testers may build the exact tag from source:
Do not use apps/apple/scripts/healthmd; it runs 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.
Bound unfamiliar commands
On macOS/Linux use non-interactive execution and a hard process timeout:
On Windows, use the automation host's process timeout. Give pairing and exports longer bounds than status. Command failures and results use JSON on stdout except help/version and explicit health streams/artifacts. Health-free progress and pairing instructions may use stderr. Parse the JSON or receipt; never infer success from exit status alone.
Pair once
Pairing creates durable export authority, so obtain approval first:
For iPhone:
- In foreground Health.md, open Sync → Direct CLI Access.
- Tap Scan Pairing QR and scan the displayed image. The in-app scan starts pairing; do not ask for a second Pair tap or open the QR as a custom URL.
- If scanning is unavailable, enable Manual IP and enter the printed address, port, and six-digit code.
For Android, open Settings → Direct CLI and use the Android address, port, and high-entropy pairing code shown by the command. Keep the selected app active through success.
Confirm stdout is healthmd.direct_pairing_result with status: success for the intended phone. After an unknown outcome, inspect healthmd direct devices; do not pair again blindly. Use global --device DEVICE_UUID when several phones are trusted and global --port PORT when the app saved a non-default port.
Local trust commands do not contact the phone:
Run healthmd direct reset-trust --confirm only with explicit approval. It removes every local pairing; the user must forget the CLI on each phone too.
Check readiness
Require the selected phone to be authenticated, active enough for new work, and ready for the requested operation. Respect active_job_id and all protected-data, permission, and capability fields. backend: direct and mac_app: bypassed confirm the standalone path. Direct generated-file mode always uses the explicit --destination; it never uses a Mac bookmark.
Query typed health data
Typed queries currently require a compatible foreground iPhone. For least privilege, pair outside the MCP host and configure:
This local stdio profile exposes only readiness, catalog, and typed-query tools. Use full healthmd mcp serve only when the user also approves in-host pairing or generated-file job authority. For Codex, healthmd setup codex configures the full local profile and can open pairing; review that broader authority with the user first.
Query workflow:
- Call
healthmd_doctorbefore reading health values. - Use
healthmd_metricsto obtain canonical IDs instead of guessing. - Resolve relative dates to exact inclusive dates in the user's intended calendar/timezone.
- Prefer
healthmd_metric_chartfor metric series,healthmd_sleep_sessionsfor sleep, andhealthmd_workoutsfor workouts. Use fixed comparison, coverage, alignment, or evidence tools when they match the question. - Set
all_pages: trueonly when complete bounded traversal is needed, or continue the exact opaquenext_cursorunchanged. - Report requested-scope completion separately from unrelated corpus warnings.
Inspect the exact schema offline before constructing shell arguments:
The shell can execute the identical fixed operation without an MCP envelope:
Dates are illustrative; resolve the user's actual request. healthmd extract is a source-data projection, not the typed query API.
Export or extract only approved scope
Choose exactly one date range: --yesterday, --last N, --from/--to, or --all. Prefer an approved protected absolute output path so health data does not enter stdout, transcripts, or a repository. In the examples, first set PRIVATE_HEALTH_DIR to an existing private absolute directory selected by the user; never guess or create that location silently.
iPhone strict raw and canonical extraction
Strict iPhone raw returns healthmd.raw_result v1 containing schema-v8 healthmd.health_data documents and temporarily requests canonical lossless records without changing saved settings. Extraction returns selected canonical documents or honest projections plus healthmd.extract_receipt. JSONL file output writes OUTPUT.receipt.json.
Complete-empty is success. Missing, failed, cancelled, unsupported, skipped, or partial requested capture yields partial_success and a nonzero exit unless the user explicitly accepts --allow-partial. Never interpret an omitted field as zero.
Android provider-native raw
Android raw remains provider-native. Never relabel it as HealthKit-shaped healthmd.health_data, and never fabricate typed-query or canonical-extraction support.
Production-generated files
Use an existing user-approved absolute non-symlink destination:
--output is for raw/extract; --destination is for generated files. --use-device-settings mirrors the selected phone's saved behavior and cannot combine with selectors. A profile resolves frozen mobile output settings while --destination remains the required explicit computer folder. Android generated-file jobs use saved settings or a profile; iPhone-only metric/category/detail selectors must not be sent to Android.
The CLI validates manifests, digests, paths, symlinks, destination identity, and restart-safe overwrite/append/Markdown merge commits. Do not manually repair generated files after an interrupted job.
Recover durable jobs
Jobs persist for seven days. Timeout, Ctrl-C, process exit, disconnect, or exhausted phone background time does not cancel them.
Inspect status before deciding what to do. Resume the same immutable request against the same phone; never create a duplicate after an unknown outcome. Cancel only on request. Cancellation is terminal only after phone acknowledgement.
Report safely
Unless the user explicitly asked for health values, report only:
- operation and exact approved scope;
- status and durable job ID;
- requested, processed, and retained dates/counts;
- schema, source, detail, and traversal completion;
- files written and explicit destination;
- missing/partial diagnostics, limitations, and error code/message.
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/website/docs-src/public/agents/skills/healthmd-cli/v4/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/v4)