Skip to content

let your agent control your phone

setup: install a global phone-harness command and register the SKILL as an agent skill

ShawnPana723c0f357110
diff --git a/README.md b/README.md
index ffd30ed..7db524e 100644
--- a/README.md
+++ b/README.md
@@ -26,10 +26,13 @@ Paste into Claude Code or Codex:
```text
Set up phone-harness for me. Clone https://github.com/ShawnPana/phone-harness
and read `install.md` first to install it and connect it to my real iPhone
-through the macOS iPhone Mirroring app. Then read `SKILL.md` for normal usage,
-and always read `src/phone_harness/helpers.py` because that is where the
-functions are. Whenever you capture or verify the screen, activate the iPhone
-Mirroring window so I can see what you're doing on the phone.
+through the macOS iPhone Mirroring app — install it so `phone-harness` is a
+command on my PATH, and register it as an agent skill named phone-harness using
+`phone-harness skill` as the body, so you reach for it automatically. Then read
+`SKILL.md` for normal usage, and always read `src/phone_harness/helpers.py`
+because that is where the functions are. Whenever you capture or verify the
+screen, activate the iPhone Mirroring window so I can see what you're doing on
+the phone.
Setup needs two things only I can do: pairing iPhone Mirroring with my phone
once, and granting the terminal Accessibility + Screen Recording in System
@@ -86,8 +89,9 @@ print([o["text"] for o in ocr()][:10])
PY
```
-Day-to-day workflow lives in [SKILL.md](SKILL.md) — register it as an agent
-skill with `./phone-harness skill`. `install.md` covers first-time setup.
+Day-to-day workflow lives in [SKILL.md](SKILL.md), which [install.md](install.md)
+registers as an agent skill (`phone-harness skill` prints the body) so the agent
+reaches for it on its own.
## Architecture
diff --git a/install.md b/install.md
index 99b37db..ba397df 100644
--- a/install.md
+++ b/install.md
@@ -37,14 +37,42 @@ open "x-apple.systempreferences:com.apple.preference.security?Privacy_ScreenCapt
git clone https://github.com/ShawnPana/phone-harness ~/Projects/phone-harness
cd ~/Projects/phone-harness
pip install pyobjc-framework-Quartz pyobjc-framework-Vision pyobjc-framework-AppKit
-./phone-harness --doctor
-./phone-harness <<'PY'
+pip install -e . --no-deps # installs the global `phone-harness` command
+
+# register as an agent skill so Claude Code / Codex auto-use it (see below)
+mkdir -p ~/.claude/skills/phone-harness
+phone-harness skill > ~/.claude/skills/phone-harness/SKILL.md
+mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills/phone-harness"
+phone-harness skill > "${CODEX_HOME:-$HOME/.codex}/skills/phone-harness/SKILL.md"
+
+phone-harness --doctor
+phone-harness <<'PY'
print(screen_info())
PY
```
If `screen_info()` prints window bounds, you're done.
+`pip install -e .` keeps the source (and its `agent-workspace/`) editable while
+giving you a `phone-harness` command on PATH — the editable install is what lets
+the skill call `phone-harness` from any directory. If your Python can't reach
+PyPI to resolve the pyobjc deps, `--no-deps` skips them (they're installed by
+the line above).
+
+## Register as a skill
+
+So the agent reaches for phone-harness on its own, register `SKILL.md` as a
+skill named `phone-harness` with `phone-harness skill` as its body (the Fast
+Path does this for both Claude Code and Codex). The skill's trigger is:
+
+```text
+Control the user's iPhone through the Mac's iPhone Mirroring window: open apps,
+tap, type, swipe, read the screen.
+```
+
+Re-run the `phone-harness skill > …/SKILL.md` lines after pulling updates so the
+registered copy stays current.
+
## If It Fails
`--doctor` walks the ladder in order: pyobjc → Accessibility → Screen