mobile-harness: Instructions file for Codex

AGENTS.md

mobile-harness AGENTS.md is an instructions file for Codex, OpenCode from droidrun/mobile-harness. It costs 941 tokens per session, scanned A, original, MIT.

Repository instructions for Mobile Harness, a project for operating Android and iOS devices through its standard control interface.

In plain words
What is it for?
Use them before mobile work to update the project, install its dependencies when needed, and route platform actions through Mobilerun.
Why use it?
They define the required setup and loading order so agents use the supported device-control path and keep runtime packages current.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is droidrun/mobile-harness's own configuration. It tells Codex and OpenCode how to work on mobile-harness itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mobile-harness configures →

Reuse

Borrowing it

Nothing to install: this file belongs to droidrun/mobile-harness. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/droidrun/mobile-harness/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/droidrun/mobile-harness

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mobile-harness AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/droidrun/mobile-harness/agents-md/github.svg)](https://agentmods.dev/instructions/droidrun/mobile-harness/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/droidrun/mobile-harness/agents-md"><img src="https://agentmods.dev/badge/instructions/droidrun/mobile-harness/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mobile-harness AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/droidrun/mobile-harness/agents-md"><img src="https://agentmods.dev/badge/instructions/droidrun/mobile-harness/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 941 This file is loaded in full into every session.
When invoked 941 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00941 $0.00941
Opus 5.5 $0.00376 $0.00376
Sonnet 5.5 $0.00188 $0.00188
Haiku 4.5 $0.00094 $0.00094

Measured 7d ago against content hash 2668f79e5f08, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mobile-harness AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 56 lines

How it starts

The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Mobile Harness

This repository tells an AI agent how to operate Android and iOS devices through existing control surfaces.

Control devices through mobilerun_core (from mobilerun_core import Mobilerun); mobilerun-core-local is its internal driver dependency.

Load Order

  1. Check the installed Python environment once per session, before platform work. <harness-root> contains this AGENTS.md. <state-root> holds .venv/ and local/; it is <harness-root> unless SKILL.md set it to another directory. Use the interpreter named in the user's agent instructions, otherwise <state-root>/.venv/bin/python. With that interpreter as <python>, run <python> -c "from mobilerun_core import Mobilerun; from importlib.metadata import version; print('mobilerun-core', version('mobilerun-core'))". If the environment or dependency is missing, first check the interpreter path, then read install.md for setup. Otherwise use the installed versions. Do not fetch, pull, run npx skills update, or install/upgrade packages as a routine startup step. Read UPDATE.md only when the user requests an update or a confirmed version incompatibility blocks the task. Preserve pinned versions unless the user authorizes changing them.
  2. Decide the target platform and backend before acting. For a local backend, also check <python> -c "from importlib.metadata import version; print('mobilerun-core-local', version('mobilerun-core-local'))". PackageNotFoundError is a setup issue; cloud-only work does not require it.
  3. For Android work, read platforms/android/GUIDE.md.
  4. For iOS work, read platforms/ios/GUIDE.md.
  5. Do not load all files.
  6. When the foreground app id is known, read only that app card if it exists:
    • Android: apps/android/<package>/CARD.md
    • iOS: apps/ios/<bundle-id>/CARD.md Then read the same path under <state-root>/local/apps/ if it exists. That file is the user's own and wins wherever it disagrees with the shipped card; it may also be the only card that exists.
  7. Read platform recovery only after a control, setup, state, or connectivity failure.
  8. Read the credentials guide under core/credentials when a screen asks for login, API keys, OTP, 2FA, payment, passcode, or other secrets.
  9. Write to <state-root>/local/credentials/<app-id>.md only when the user explicitly asks for local credential files.
  10. Read core/memory/GUIDE.md before reading or writing files under <state-root>/local/memory/.

Read the full file on GitHub · 56 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago Changed · -1 lines · -4 tokens per session 2668f79e5f08
  2. 14d ago Changed · +6 lines · +15 tokens per session ba8a3c6ed044
  3. 1mo ago Changed · +1 lines · +51 tokens per session 071c8012f4c2
  4. 1mo ago First seen · 50 lines · 879 tokens per session scan A b3f720e4db8c

Subscribe to this mod's changes

mobile-harness AGENTS.md is an instructions file published in the GitHub repository droidrun/mobile-harness (421 stars, last pushed 7d ago), licensed MIT. It adds 941 tokens to every session, about $0.0038 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories