Healthmd CLI Development
CodyBontecou/health-md
Develop or debug the standalone Rust Health.md CLI, portable healthmd-mcp server, and iPhone direct service.
A skill your agent uses when a task needs a real iPhone — operating iOS apps that have no API (Apple Health, banking, IM apps), exporting on-phone data, tapping/typing/scrolling on the phone, or…
$ npx skills add leeguooooo/iphone-use --skill iphone-use -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install leeguooooo/iphone-use iphone-use --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/leeguooooo/iphone-use.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/iphone-use .claude/skills/iphone-use && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "iphone-use" agent skill from https://github.com/leeguooooo/iphone-use/tree/main/skills/iphone-use into .claude/skills/iphone-use/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "iphone-use", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/leeguooooo/iphone-use/tree/main/skills/iphone-useType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add leeguooooo/iphone-use --skill iphone-use -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install leeguooooo/iphone-use iphone-use --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/leeguooooo/iphone-use.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/iphone-use .agents/skills/iphone-use && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "iphone-use" agent skill from https://github.com/leeguooooo/iphone-use/tree/main/skills/iphone-use into .agents/skills/iphone-use/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "iphone-use", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add leeguooooo/iphone-use --skill iphone-use -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install leeguooooo/iphone-use iphone-use --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/leeguooooo/iphone-use.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/iphone-use .cursor/skills/iphone-use && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "iphone-use" agent skill from https://github.com/leeguooooo/iphone-use/tree/main/skills/iphone-use into .cursor/skills/iphone-use/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "iphone-use", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/leeguooooo/iphone-use.git --path skills/iphone-use--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add leeguooooo/iphone-use --skill iphone-use -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install leeguooooo/iphone-use iphone-use --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/leeguooooo/iphone-use.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/iphone-use .gemini/skills/iphone-use && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "iphone-use" agent skill from https://github.com/leeguooooo/iphone-use/tree/main/skills/iphone-use into .gemini/skills/iphone-use/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "iphone-use", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install leeguooooo/iphone-use iphone-useInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add leeguooooo/iphone-use --skill iphone-use -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/leeguooooo/iphone-use.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/iphone-use .github/skills/iphone-use && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "iphone-use" agent skill from https://github.com/leeguooooo/iphone-use/tree/main/skills/iphone-use into .github/skills/iphone-use/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "iphone-use", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add leeguooooo/iphone-use --skill iphone-use -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install leeguooooo/iphone-use iphone-use --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/leeguooooo/iphone-use.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/iphone-use .opencode/skills/iphone-use && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "iphone-use" agent skill from https://github.com/leeguooooo/iphone-use/tree/main/skills/iphone-use into .opencode/skills/iphone-use/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "iphone-use", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
iphone-useA skill your agent uses when a task needs a real iPhone — operating iOS apps that have no API (Apple Health, banking, IM apps), exporting on-phone data, tapping/typing/scrolling on the phone, or…
Iphone Use is an agent skill from leeguooooo/iphone-use. Use when a task needs a real iPhone — operating iOS apps that have no API (Apple Health, banking, IM apps), exporting on-phone data, tapping/typing/scrolling on the phone, or taking phone screenshots. Replays saved per-app flows from the iphone-use-flows registry in one call and offers to save new ones after multi-step tasks. Drives the iphone-use daemon through its custom XCTest device runner, HTTP agent API or MCP server.
Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Agent Workflows, covering MCP servers and iOS development. It works with Model Context Protocol, iOS, Rust and macOS. The repository describes itself as: Open-source real iPhone control for AI agents: screen text, tap/type/swipe, custom XCTest runner, CLI + HTTP API + MCP, browser takeover and replayable flows. Rust, self-hosted… The licence is MIT.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit e014d5e. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
curlFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use curl, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
PHONE_REMOTE_TOKENPHONE_REMOTE_AGENT_TOKENFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Iphone Use loads about 2.7k tokens when it runs. Until then it costs about 110 tokens; SKILL.md has 1,183 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from leeguooooo/iphone-use at commit e014d5e, republished under its MIT licence (© leeguooooo). 1,183 words, ~2,671 tokens.
.claude/skills/iphone-use/SKILL.md (or your agent's skills folder).The iphone-use daemon drives a
physical iPhone through its own XCTest device runner. This runner replaced
WebDriverAgent in v0.14.0; it does not use iPhone Mirroring. The HTTP interface
is WebDriverAgent-compatible, and legacy "WDA" field names refer to this runner. It never touches the Mac's screen or
cursor. Use the HTTP API below or the bundled MCP server (phone_* tools); the
loop is the same. Details live in the reference: curl -s -H "$AUTH" "$HOST/agent/reference" serves the copy that matches the running daemon
(sections below are named by heading; also
docs/agent-reference.md).
HOST="${PHONE_REMOTE_URL:-http://127.0.0.1:44321}"
AUTH="Authorization: Bearer $PHONE_REMOTE_TOKEN" # daemon password or PHONE_REMOTE_AGENT_TOKEN
MUTATION="X-Phone-Control: 1" # required on every state-changing POST
OWNER="X-Phone-Owner: <your-session-name>" # MCP sends this for you
curl -s -H "$AUTH" "$HOST/agent/status" # probe first; on failure stop and reportProbe. GET /agent/status / phone_status. Act only when
drivable:true. Otherwise report hint and stop. Reconnect once
(phone_reconnect / POST /agent/mode {"mode":"agent"}) only when the
user's current task needs the phone, never for a health check: each runner
launch can make the operator type the passcode. If owner is another
session, do not drive. → reference: Phone states and recovery
Look for a saved flow first. Entering an app — a launch_app response,
or the first /agent/elements read in a newly entered app — carries a
registry block listing the saved flows for it. If one does the task, run
it: one call instead of dozens, no screenshots. phone_flow_list /
iphone-use-mcp flow list --app <bundle> shows them all. Check risk and
compat before running. → reference: Flows
"$HOME/Applications/iPhoneUse.app/Contents/MacOS/iphone-use-mcp" flow run system/spotlight-search --input query=HealthNo flow? Hand a clear goal to Jev. phone_jev_run /
iphone-use-mcp jev run --goal "…" [--app <bundle>] runs a fast on-phone
agent (TypeSafe's Jev picks each step, ~1–2 s/step, no model turns) and
returns done / blocked with its step history. Confirm goals that send,
pay or delete with the user first; check the end screen yourself.
Otherwise act in batches, not taps. Every call costs you a full turn;
the phone takes ~0.5 s. Open the app with launch_app, read
GET /agent/elements once, then send everything you can already see how to
do as ONE batch (POST /agent/actions / phone_run_steps, up to 24 steps,
wait_for after each screen change) with observe:true (MCP default): the
reply carries the screen the batch ended on, so you decide the next batch
without another read. Single taps (element + snapshot, unique label,
locator) are for exploring a screen you have not read yet; after three in a
row the daemon says so (batch_hint).
Verify each step against your postcondition: MCP act tools observe by
default (HTTP: ?return=delta) and return the settled change in the same
call; the settled screen is captured too, and phone_screenshot returns it
instantly — look only when the text is not enough. ok:true means
the action was sent, not that it achieved anything.
→ reference: Reading results
Offer to save it. When a response carries flow_suggestion, or you
finish a multi-step task that no flow covered, ask the user whether to
keep it as a flow. Only if they agree: get the draft
(phone_flow_draft(save_as=…) / flow draft --out … /
GET /agent/flow/draft), fix its todo list, validate it, and run the file
once. Publishing opens a public PR, so ask again before
phone_flow_publish(confirm=true). → reference: Saving a flow
When the task is done, release the phone: phone_release_owner /
POST /agent/owner {"release":true}. If a response carried agent_focus, the
phone is on Do Not Disturb for your session: tell the user, and releasing turns
it off again.
| What | HTTP /agent/input type | MCP | Flow / batch step kind |
|---|---|---|---|
| Open an app | launch_app bundle (or name for built-ins: 健康, Settings…) | phone_run_steps step | launch_app |
| Read the screen | GET /agent/elements | phone_elements | wait_for (application, present, absent) |
| Tap an element | tap + element + snapshot | phone_tap_element | tap_locator (durable) |
| Tap a unique label | tap + label | phone_tap_label | tap_label |
| Tap by locator | tap_locator + locator | phone_run_steps step | tap_locator |
| Tap a point | tap + x,y | phone_tap | tap |
| Type | text (into the focused field) | phone_type | type (input names a runtime value) |
| Key | key return… | phone_key | key |
| Home / Spotlight | shortcut | phone_shortcut | shortcut |
| Scroll | scroll dy (80 ≈ 15% of a screen, 400 ≈ 75%) | phone_scroll | scroll |
| System alert | alert button / action | phone_run_steps step | alert |
| App asks you to log in | POST /agent/login (iphone-use auth login --bwu) | phone_login | — |
| Switch / slider | perform toggle / adjust | — (not in MCP) | — |
All actions, including swipe, drag, picker, set_value and the scroll variants, are listed in the reference: Actions catalogue.
curl -s -H "$AUTH" -H "$MUTATION" -H "$OWNER" -X POST "$HOST/agent/input" \
-d '{"type":"launch_app","bundle":"com.apple.Health"}' # response may carry `registry`
curl -s -m 40 -H "$AUTH" "$HOST/agent/elements" # give it ≥40s
curl -s -H "$AUTH" -H "$MUTATION" -H "$OWNER" -X POST "$HOST/agent/input?return=delta" \
-d '{"type":"tap","element":3,"snapshot":"<from that read>"}'
curl -s -H "$AUTH" -H "$MUTATION" -H "$OWNER" -X POST "$HOST/agent/actions" -d '{"steps":[
{"kind":"action","action":{"type":"tap_locator","locator":{"label":"资料","kind":"Button"}}},
{"kind":"wait_for","expect":{"present":[{"label":"导出所有健康数据"}]},"timeout_ms":8000}]}'| Don't | Do instead |
|---|---|
| Tap coordinates guessed from a screenshot | Read phone_elements, tap by element + snapshot or by label |
| Take a screenshot after every step | observe:true / ?return=delta returns the change |
| One tap per call when the next steps are visible | One phone_run_steps / /agent/actions batch with wait_for |
sleep a fixed number of seconds | wait_for with present / absent / application |
| Tap a system alert's button | The alert action (button or action) |
| Tap a switch or slider | perform toggle / adjust (HTTP) |
Resend after outcome_unknown or retry_safe:false | Read the screen first; the phone may already have acted |
Repeat an action that came back no_progress | Re-read the screen, then a different control or a wait_for |
| Reconnect to check health | phone_status; reconnect only when the task needs the phone |
| Type without checking focus | Confirm the foreground app and focused field, then type |
| Repeat a label that was not found | Use the did you mean label the error offers, or re-read |
Task metrics: iphone-use metrics / GET /agent/metrics count HTTP calls, not
model turns. To count one task exactly, wrap it in phone_run_start /
phone_run_end (HTTP: POST /agent/run). GET /agent/elements?scope=app
(or interactive, focused, changed&since=…) returns a smaller view of the
same read; ?image=auto adds a screenshot only when the tree is unusable.
→ reference: Task metrics, runs and advice
{
"version": 1,
"name": "New note",
"app": "com.apple.mobilenotes",
"risk": "navigation",
"locale": "zh-CN",
"inputs": { "body": { "type": "string", "description": "note text" } },
"steps": [
{ "kind": "launch_app", "bundle": "com.apple.mobilenotes" },
{ "kind": "wait_for", "expect": { "application": "备忘录" }, "timeout_ms": 15000 },
{ "kind": "tap_locator", "locator": { "label": "新建备忘录", "kind": "Button" } },
{ "kind": "type", "input": "body" }
]
}The full field list, compat values, and publish and report steps are in reference: Flows.
retry_safe:false or outcome_unknown means do not replay. The phone may
already have acted. Read the screen first; never resend text, send, pay or
delete blindly. The same applies to a failed flow.risk: side_effect and destructive taps need the user's explicit OK on
the exact target and inputs (confirm=true / --confirm). Never operate
payment or 2FA screens unattended.alert action. Taps on alert buttons ACK but often
do nothing. Switches need perform toggle (HTTP only). Verify the new
value either way.X-Phone-Owner. On 409 phone_owned, wait;
never take over unless the user says the other session is abandoned. Release
your lease when done.phone_login / iphone-use auth login --bwu. It
fills the user's own vault entry inside the daemon. Never ask for, type or
repeat a password or code yourself; never sign up, change a password or pay.If the screen changes under you (app_changed, a banner, a person using the
phone), stop and re-read before continuing the old plan. If the skill
disagrees with the live API, it is probably stale; see
reference: Upgrade. If something in iphone-use itself is broken or
confusing, offer to file an issue (reference: Filing issues).
© leeguooooo, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/iphone-use of leeguooooo/iphone-use.
Open the folder on GitHubat commit e014d5e
Iphone Use next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Iphone Use this skillleeguooooo/iphone-use | 104 | — | ~2.7k | Automated safety check: Pass | MIT | |
| Healthmd CLI DevelopmentCodyBontecou/health-md | 230 | — | ~4.3k | Automated safety check: Pass | AGPL-3.0 | |
| AgentSquad for Swift2FastLabs/agent-squad | 7.8k | — | ~3.5k | Automated safety check: Pass | Apache-2.0 | |
| Healthmd CLI QACodyBontecou/health-md | 230 | — | ~4k | Automated safety check: Pass | AGPL-3.0 | |
| iOS Simulator Workflowsconorluddy/xclaude-plugin | 183 | — | ~3.3k | Automated safety check: Pass | MIT | |
| Xcodebuildmcpw-winter/dot314 | 139 | — | ~196 | Automated safety check: Pass | MIT |
CodyBontecou/health-md
Develop or debug the standalone Rust Health.md CLI, portable healthmd-mcp server, and iPhone direct service.
2FastLabs/agent-squad
Guides building on-device multi-agent apps in Swift with the AgentSquad framework: which agent, orchestrator, classifier, storage or voice type fits each situation.
CodyBontecou/health-md
Test the standalone Health.md CLI, portable healthmd-mcp server, and direct mobile paths.
conorluddy/xclaude-plugin
Manages iOS Simulator devices and apps through the execute_simulator_command MCP tool instead of raw simctl: boot, create and delete devices, install and launch apps, screenshots and diagnostics.
w-winter/dot314
Build/test Xcode projects via the XcodeBuildMCP MCP server using a local CLI wrapper for pi (no MCP support).
pzep1/xcode-build-skill
Build and run iOS/macOS apps using xcodebuild and xcrun simctl directly.
Works with
Categories
A skill your agent uses when a task needs a real iPhone — operating iOS apps that have no API (Apple Health, banking, IM apps), exporting on-phone data, tapping/typing/scrolling on the phone, or…. Iphone Use is an agent skill from leeguooooo/iphone-use. Use when a task needs a real iPhone — operating iOS apps that have no API (Apple Health, banking, IM apps), exporting on-phone data, tapping/typing/scrolling on the phone, or taking phone screenshots.
Iphone Use fits situations like: A task needs a real iPhone — operating iOS apps that have no API (Apple Health; exporting on-phone data; tapping/typing/scrolling on the phone; taking phone screenshots.
Run `npx skills add leeguooooo/iphone-use --skill iphone-use -a claude-code`. Or copy the skill folder (skills/iphone-use in leeguooooo/iphone-use) into .claude/skills/iphone-use in your project. Claude Code loads it when a task matches its description.
Run `npx skills add leeguooooo/iphone-use --skill iphone-use -a codex`. Or copy the skill folder (skills/iphone-use in leeguooooo/iphone-use) into .agents/skills/iphone-use in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add leeguooooo/iphone-use --skill iphone-use -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/iphone-use, .gemini/skills/iphone-use, .github/skills/iphone-use and .opencode/skills/iphone-use in your project.
Going by SKILL.md and its folder, Iphone Use needs the command-line tools its instructions call (curl) and credentials named PHONE_REMOTE_TOKEN and PHONE_REMOTE_AGENT_TOKEN. Our summary lists: A credential in PHONE_REMOTE_TOKEN; A credential in PHONE_REMOTE_AGENT_TOKEN.
SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Iphone Use is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Iphone Use: Healthmd CLI Development (CodyBontecou/health-md, 230 stars), AgentSquad for Swift (2FastLabs/agent-squad, 7.8k stars), Healthmd CLI QA (CodyBontecou/health-md, 230 stars) and iOS Simulator Workflows (conorluddy/xclaude-plugin, 183 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
leeguooooo (a GitHub user) maintains it in leeguooooo/iphone-use, which has 104 GitHub stars. The repository was last updated on October 8, 2026.
Source: leeguooooo/iphone-use on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.