Skip to main content
The mobile-harness skill connects a coding agent — Claude Code, Codex, or any runtime that can read Markdown and run Python — directly to Android and iOS devices. It is a compact Markdown harness, not an agent runtime: a set of operating instructions that teach the agent to control devices through the mobilerun_core Python package. Once installed, the agent can drive local devices (ADB, Mobilerun Portal, iOS Simulator via iOS Portal) and Mobilerun Android Phones from the same API.
This skill is for coding agents that can execute Python. For the OpenClaw agent CLI, use the OpenClaw · Android control skill. For chat with the virtual assistant, use the Mobilerun Assistant skill.

Install

The fastest way is to paste this prompt into your agent:
The agent clones the repository, creates a Python virtual environment, installs mobilerun-core[local], and registers the harness with its own runtime (Codex skill directory, Claude Code CLAUDE.md import, or an OpenClaw skill package). You can also install it as a skill with the skills CLI:
First use still requires the Python setup from the repository’s install.md. Python 3.11, 3.12, or 3.13 is required.

What it enables

The harness gives the agent one Python facade for every device type:
After connecting, the agent inspects device.capabilities and gates optional operations with device.supports(...).

Supported backends

Configuration

Cloud devices need your API key from the API Keys page:
Local Portal HTTP-only modes take their connection details from environment variables:

How the agent uses the harness

The harness routes the agent to the smallest file it needs:
  • AGENTS.md (or SKILL.md in skill-based runtimes) is the entry point.
  • Platform guides cover Android and iOS work, with separate recovery guides used only when control fails.
  • App cards provide per-app instructions for the foreground app.
  • Local memory/ and credentials/ folders hold agent-owned state and stay out of version control.
Installed clones keep themselves current: the agent runs git pull --ff-only (or npx skills update) once per session before device work.

Next steps

Agent Skills overview

Learn what Mobilerun skills are and how agents use them.

API Keys

Create the key cloud devices need.

Connect an Android device

Set up the Mobilerun Portal app.

Connect an iPhone

Set up iOS device control.