Agent skill

Iphone Use

by leeguooooo in leeguooooo/iphone-use

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…

MITAuto-check passedAgent Workflows

Install Iphone Use

skills CLI
$ npx skills add leeguooooo/iphone-use --skill iphone-use -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install leeguooooo/iphone-use iphone-use --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ 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-src

Use ~/.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/

Facts

Skill name
iphone-use
GitHub stars
104
Token cost
~2.7k tokens
SKILL.md length
1,183 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

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…

  • Works in 6 steps: Probe. GET /agent/status / phone_status.… → Look for a saved flow first. Entering an… → No flow? Hand a clear goal to Jev.… → …
  • A task needs a real iPhone — operating iOS apps that have no API (Apple Health
  • SKILL.md covers The loop, Core actions, A flow is just these steps saved and Hard rules
  • Calls curl; needs PHONE_REMOTE_TOKEN and PHONE_REMOTE_AGENT_TOKEN

What it does

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.

When your agent uses it

  • 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

Example prompts

  • “/iphone-use”

Requirements

  • A credential in PHONE_REMOTE_TOKEN
  • A credential in PHONE_REMOTE_AGENT_TOKEN

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Probe. GET /agent/status / phone_status. Act only when
  2. Look for a saved flow first. Entering an app — a launch_app response,
  3. No flow? Hand a clear goal to Jev. phone_jev_run /
  4. Otherwise act in batches, not taps. Every call costs you a full turn;
  5. Verify each step against your postcondition: MCP act tools observe by
  6. Offer to save it. When a response carries flow_suggestion, or you

What it can do on your machine

Read from SKILL.md and the folder at commit e014d5e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    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.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • PHONE_REMOTE_TOKEN
    • PHONE_REMOTE_AGENT_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

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.

Always · name and description, kept in context so the agent knows when to use it
~110
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from leeguooooo/iphone-use at commit e014d5e, republished under its MIT licence (© leeguooooo). 1,183 words, ~2,671 tokens.

Download SKILL.mdSave it as .claude/skills/iphone-use/SKILL.md (or your agent's skills folder).
name
iphone-use
description
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.

iphone-use — drive a real iPhone

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).

bash
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 report

The loop

  1. Probe. 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

  2. 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

    bash
    "$HOME/Applications/iPhoneUse.app/Contents/MacOS/iphone-use-mcp" flow run system/spotlight-search --input query=Health
  3. No 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.

  4. 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).

  5. 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

  6. 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.

Core actions

WhatHTTP /agent/input typeMCPFlow / batch step kind
Open an applaunch_app bundle (or name for built-ins: 健康, Settings…)phone_run_steps steplaunch_app
Read the screenGET /agent/elementsphone_elementswait_for (application, present, absent)
Tap an elementtap + element + snapshotphone_tap_elementtap_locator (durable)
Tap a unique labeltap + labelphone_tap_labeltap_label
Tap by locatortap_locator + locatorphone_run_steps steptap_locator
Tap a pointtap + x,yphone_taptap
Typetext (into the focused field)phone_typetype (input names a runtime value)
Keykey return…phone_keykey
Home / Spotlightshortcutphone_shortcutshortcut
Scrollscroll dy (80 ≈ 15% of a screen, 400 ≈ 75%)phone_scrollscroll
System alertalert button / actionphone_run_steps stepalert
App asks you to log inPOST /agent/login (iphone-use auth login --bwu)phone_login—
Switch / sliderperform toggle / adjust— (not in MCP)—

All actions, including swipe, drag, picker, set_value and the scroll variants, are listed in the reference: Actions catalogue.

bash
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}]}'
Show full SKILL.md (498 more words)Show less
Don't → do instead
Don'tDo instead
Tap coordinates guessed from a screenshotRead phone_elements, tap by element + snapshot or by label
Take a screenshot after every stepobserve:true / ?return=delta returns the change
One tap per call when the next steps are visibleOne phone_run_steps / /agent/actions batch with wait_for
sleep a fixed number of secondswait_for with present / absent / application
Tap a system alert's buttonThe alert action (button or action)
Tap a switch or sliderperform toggle / adjust (HTTP)
Resend after outcome_unknown or retry_safe:falseRead the screen first; the phone may already have acted
Repeat an action that came back no_progressRe-read the screen, then a different control or a wait_for
Reconnect to check healthphone_status; reconnect only when the task needs the phone
Type without checking focusConfirm the foreground app and focused field, then type
Repeat a label that was not foundUse 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

A flow is just these steps saved

json
{
  "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.

Hard rules

  1. 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.
  2. 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.
  3. Text goes to whatever field has focus. If a person is mid-chat, your words land in their message. Confirm the foreground app and the focused field first.
  4. System alerts need the alert action. Taps on alert buttons ACK but often do nothing. Switches need perform toggle (HTTP only). Verify the new value either way.
  5. One session per phone. Send 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.
  6. Log in only through 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.
  7. Saving and publishing are the user's call. Ask before saving a flow, and ask again before publishing it or filing an issue. Both use their GitHub account.

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

Files

Just SKILL.md in skills/iphone-use of leeguooooo/iphone-use.

Open the folder on GitHubat commit e014d5e

Compare with similar skills

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.

Iphone Use compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Iphone Use this skillleeguooooo/iphone-use104—~2.7kAutomated safety check: PassMIT
Healthmd CLI DevelopmentCodyBontecou/health-md230—~4.3kAutomated safety check: PassAGPL-3.0
AgentSquad for Swift2FastLabs/agent-squad7.8k—~3.5kAutomated safety check: PassApache-2.0
Healthmd CLI QACodyBontecou/health-md230—~4kAutomated safety check: PassAGPL-3.0
iOS Simulator Workflowsconorluddy/xclaude-plugin183—~3.3kAutomated safety check: PassMIT
Xcodebuildmcpw-winter/dot314139—~196Automated safety check: PassMIT

Similar skills

  • Healthmd CLI Development

    CodyBontecou/health-md

    Develop or debug the standalone Rust Health.md CLI, portable healthmd-mcp server, and iPhone direct service.

    230 GitHub stars~4.3k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • AgentSquad for Swift

    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.

    7.8k GitHub stars~3.5k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Healthmd CLI QA

    CodyBontecou/health-md

    Test the standalone Health.md CLI, portable healthmd-mcp server, and direct mobile paths.

    230 GitHub stars~4k tokensUpdated today
    MobileAuto-check passed
  • iOS Simulator Workflows

    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.

    183 GitHub stars~3.3k tokensUpdated 25 days ago
    MobileAuto-check passed
  • Xcodebuildmcp

    w-winter/dot314

    Build/test Xcode projects via the XcodeBuildMCP MCP server using a local CLI wrapper for pi (no MCP support).

    139 GitHub stars~196 tokensUpdated today
    MobileAuto-check passed
  • Xcode Build

    pzep1/xcode-build-skill

    Build and run iOS/macOS apps using xcodebuild and xcrun simctl directly.

    138 GitHub stars~1.5k tokensUpdated 8 mo ago
    MobileAuto-check: notes

Questions about Iphone Use

What does Iphone Use do?

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.

When should I use Iphone Use?

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.

How do I install Iphone Use in Claude Code?

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.

How do I install Iphone Use in Codex?

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.

Can I use Iphone Use in Cursor, Gemini CLI or GitHub Copilot?

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.

What does Iphone Use need to run?

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.

Does Iphone Use access the network?

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.

Is Iphone Use safe to install?

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.

What licence does Iphone Use use?

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.

How many tokens does Iphone Use use?

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.

What are the alternatives to Iphone Use?

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.

Who maintains Iphone Use?

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.