Λογότυπο Phone Harness

Phone Harness

ΚοινότηταΔημοφιλής
ShawnPana
phone-harness

Control the user's phone — iPhone through the Mac's iPhone Mirroring window, or an Android over adb: open apps, tap, type, swipe, read the screen.

Επισκόπηση

ΕκδότηςShawnPana
Αποθετήριοphone-harness
Όνομα δεξιότηταςphone-harness
Αστέρια
2.9K
Διακλαδώσεις
289
Συνοδευτικά αρχεία
17
Άδεια χρήσηςMIT
Σύνδεσμοι
  • Οδηγίες σε Markdown

    Ένα αρχείο SKILL.md που το μοντέλο φορτώνει όταν χρειάζεται, ώστε να καταναλώνει token μόνο όταν ένα αίτημα είναι πράγματι σχετικό.

  • Λειτουργεί με οποιοδήποτε LLM

    Οι δεξιότητες AI είναι απλό Markdown, όχι κώδικας για συγκεκριμένο πάροχο, επομένως αυτή η δεξιότητα λειτουργεί με GPT, Claude, Gemini, Grok ή ένα τοπικό μοντέλο.

  • Συνοδευτικά αρχεία: 17

    Αρχεία script, πρότυπα και υλικό αναφοράς που μπορεί να διαβάζει το μοντέλο καθώς εργάζεται. Τα αρχεία είναι μόνο για ανάγνωση και δεν εκτελούνται ποτέ.

  • Ανοιχτού κώδικα

    Δημοσιεύτηκε στο GitHub από τον λογαριασμό ShawnPana. Ελέγξτε τα αρχεία της δεξιότητας στο αποθετήριο πριν την εγκαταστήσετε.

Εγκατάσταση

Εγκαταστήστε τη δεξιότητα AI Phone Harness στο TypingMind για να τη χρησιμοποιείτε με οποιοδήποτε LLM ή προσθέστε τη σε άλλον πράκτορα AI που διαβάζει αρχεία SKILL.md.

1

Εγκατάσταση στο TypingMind

Το TypingMind εγκαθιστά μια δεξιότητα απευθείας από τον φάκελό της στο GitHub — διαβάζει το SKILL.md, συγκεντρώνει τα συνοδευτικά αρχεία σε πακέτο και αποθηκεύει το αποτέλεσμα τοπικά.

  1. Ανοίξτε την εφαρμογή και μεταβείτε στα Πρόσθετα → Δεξιότητες.
  2. Επιλέξτε «Εγκατάσταση από GitHub».
  3. Επικολλήστε το παρακάτω URL του φακέλου της δεξιότητας και επιβεβαιώστε.
    https://github.com/ShawnPana/phone-harness/tree/main
  4. Ενεργοποιήστε τη δεξιότητα σε κάθε συνομιλία όπου θέλετε να είναι διαθέσιμη.
Πρόσθετα → Δεξιότητες → Προσθήκη δεξιότητας → Από URL του GitHub, έπειτα επικολλήστε το URL του φακέλου και πατήστε «Συνέχεια».
2

Εγκατάσταση σε άλλον πράκτορα AI

Κάθε πράκτορας AI που υποστηρίζει τη μορφή Agent Skills μπορεί να χρησιμοποιήσει αυτή τη δεξιότητα — αντιγράψτε τον φάκελο στον κατάλογο δεξιοτήτων του.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ShawnPana/phone-harness.git \
  .claude/skills/phone-harness
Επανεκκινήστε το Claude Code μετά την αντιγραφή, ώστε να εντοπίσει τη νέα δεξιότητα.

Χρησιμοποιήστε τη στο TypingMind

Ενεργοποιήστε τη δεξιότητα Phone Harness σε οποιαδήποτε συνομιλία στο TypingMind και το μοντέλο αναλαμβάνει τα υπόλοιπα. Το όνομα και η περιγραφή της περιλαμβάνονται στην προτροπή συστήματος και, μόλις προκύψει ένα σχετικό αίτημα, το μοντέλο φορτώνει μόνο του τις πλήρεις οδηγίες — δεν χρειάζεται ποτέ να την καλείτε χειροκίνητα και δεν καταναλώνει token μέχρι να χρησιμοποιηθεί πραγματικά.

Το μοντέλο φορτώνει αυτόματα τη δεξιότητα Phone Harness μόλις λάβει ένα σχετικό αίτημα.

Λειτουργεί με οποιοδήποτε μοντέλο AI

Οι δεξιότητες AI είναι οδηγίες σε απλό κείμενο Markdown και όχι κώδικας για συγκεκριμένο πάροχο, οπότε η δεξιότητα Phone Harness δεν περιορίζεται στο μοντέλο για το οποίο γράφτηκε. Εγκαταστήστε τη μία φορά στο TypingMind και χρησιμοποιήστε τη με GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ή ένα τοπικό μοντέλο που εκτελείτε εσείς — πάντα με τα δικά σας κλειδιά API.

  • Φόρτωση μόνο όταν χρειάζεται

    Η προτροπή συστήματος περιλαμβάνει μόνο το όνομα και την περιγραφή. Οι οδηγίες ανακτώνται με το πρώτο σχετικό αίτημα, οπότε μια δεξιότητα που δεν χρησιμοποιείται δεν έχει κόστος.

  • Αλλάξτε μοντέλο κατά τη διάρκεια της συνομιλίας

    Επειδή η δεξιότητα αποτελείται από οδηγίες και όχι από κώδικα, η αλλαγή μοντέλου δεν επηρεάζει τη λειτουργία της — το επόμενο μοντέλο διαβάζει το ίδιο αρχείο SKILL.md.

Οδηγίες δεξιότητας

Αυτό είναι το περιεχόμενο του αρχείου SKILL.md που φορτώνει το μοντέλο. Διαβάστε το πριν από την εγκατάσταση — μια δεξιότητα αποτελείται από οδηγίες που θα ακολουθήσει το μοντέλο σας.

phone-harness

Direct control of the user's phone. iPhone: through the iPhone Mirroring app — screenshots + Vision OCR for eyes, HID-level CGEvents for hands. Android: over adb — screenshots + the phone's accessibility tree for eyes, input for hands (see the Android section; the helpers are the same). phone-harness config shows which is the default. For task-specific edits, use agent-workspace/agent_helpers.py. For setup or permission problems, read install.md.

When Not to Use

If the task is doable on the Mac or the web — a website, an API, an app with a web equivalent — do it there and leave the phone alone. Use phone-harness only when the task genuinely needs the phone: iOS-only apps, things tied to the user's phone number or 2FA, testing how something looks on the phone.

Usage

bash
phone-harness <<'PY'
print(screen_info())
PY
  • Invoke as phone-harness. Use heredocs for multi-line commands.

  • Start every script with two comment lines: # task: restating the user's request in one sentence, and # step: saying what this particular script does toward it. Keep the # task: line identical across all scripts for the same request.

    python
    # task: report the iOS version and model name from Settings
    # step: scroll to General, open About, read the screen
  • Helpers are pre-imported. All coordinates are global screen points.

  • ensure_mirroring() launches the window and gates on connection. The default build works the phone without taking the user's focus: capture is by window id and taps and keystrokes are event records delivered straight to the app. Scrolling is the exception — macOS routes a scroll to whichever window sits under the pointer, so a scroll raises the mirroring window for the length of the gesture and hands focus straight back. Expect a brief flicker on scrolls and nothing on anything else. PHONE_HARNESS_BACKGROUND=0 forces the classic path, which focuses before every action.

Screen Workflow

  • Prefer ocr() over eyeballing screenshots: every visible string comes back with a tap-ready center point — [{text, confidence, x, y, w, h}]. Filter in Python before printing.

  • Tap by label: tap_text("Weather"). On failure it raises with what IS visible, so read the exception before retrying.

  • Icons without labels: screenshot(), view the image, and use tap_image_point(x, y, image_size=...) with coordinates measured in the screenshot. Do not pass screenshot pixel coordinates directly to tap(): tap() expects global macOS screen points. If using tap() instead, first convert with image_point() using the current screen_info(); never estimate the window offset manually.

  • Work in a loop: act, verify, adapt. There is no DOM to assert against and no return value that means "it worked", so the loop is the method:

    1. Name what should change before you act — a title, a row, a username, a field's contents. If you cannot name it, you cannot tell success from a no-op, and most phone failures are silent no-ops.
    2. Do one action, then check that one thing. How you check is yours: ocr() is cheap and gives every visible string with a tap-ready point; screenshot() costs more but shows you everything OCR cannot read — icons, images, whether a row is highlighted. Use the cheap one in a loop and look at an image when you are stuck or when the answer is visual.
    3. Once a sequence is proven, batch it — a whole sub-task in one invocation is much faster than a call per turn. Batch what you have already watched work, and keep one cheap check at the end.
    4. When a check fails, isolate. Re-run that single action on its own, look at the screen, form one guess about why, test the guess, and adapt. Do not re-run the whole batch hoping it lands.
    5. Keep what you learn: put reusable checks and fixed-up steps in agent-workspace/agent_helpers.py so the next task starts ahead.
  • The harness reports, you decide. Helpers hand back observations — text, coordinates, what was on screen before and after — and never a verdict on whether your intent was achieved. Only you know what you were after, so judge from the content you expected.

    ocr() and screenshot() are the observation surface, and what you do with them is entirely your call: diff two OCR sets, watch one label, count rows, compare a crop, poll until something appears. The harness deliberately does not pick a comparison for you — it tried, and every rule that fit a list broke on a feed, and every rule that fit a feed broke on a strip that scrolls inside a still screen. Write the check that matches what you asked for, and put it in agent_helpers.py when it turns out to be reusable.

  • Navigation: home(), app_switcher(), open_app("Notes") (Spotlight), scroll("down"), swipe("up"), type_text("..."), press("return"), long_press(x, y).

  • Directions: scroll says what you want to SEE, swipe says which way the finger goes. They disagree on purpose, because English does — "scroll down the page" and "swipe up for the next video" describe the same outcome.

    scroll("down")   show me what is further down
    swipe("up")      thumb up  (the phrasing everyone uses for "next")

    scroll, scroll_screen, scroll_until and scroll_collect all take the content-direction; only swipe takes finger motion. "left"/"right" work on both.

    Use scroll for anything scrollable. On macOS 26 a vertical touch-drag is dropped, so swipe("up")/swipe("down") move nothing in a list or a feed -- measured on Settings and on TikTok. Horizontal still works, so swipe("left") / swipe("right") remain the way to flip Home Screen pages and carousels, which a scroll cannot do.

    Breaking change for scroll: it used to take finger motion too, so the old scroll("up") is today's scroll("down"). swipe is unchanged.

  • Scrolling: scroll(direction, amount, at=...) for one gesture; scroll_until(done) to stop when your predicate on the visible OCR is met; scroll_collect(extract, key=...) to walk a list, de-duping as it goes. scroll_until stops on your predicate; scroll_collect stops when your extractor stops finding new items and returns {items, stop, scrolls} with stop of 'reached-end' or 'max-scrolls'. Both end on YOUR check, so an extractor that misses rows will end the walk early — make it robust before blaming the scroll. scroll_screen() is the single-step primitive and returns what is on screen (before, after, boxes); what counts as a successful scroll is yours to decide, because it differs per app — a list translates, a feed swaps to the next item, an inner strip moves while the rest of the screen holds still. To see what happened, take a screenshot() and look at it. at aims the gesture. Only the scroll view under that point moves, so pass it whenever the thing you want to scroll is not the full-screen list.

  • Raw Quartz is the escape hatch: import Quartz in your script for anything the helpers don't cover — but raw CGEvents don't ride the helpers' delivery path, and where they land is its own question per event type. Check what actually happened on screen rather than assuming the event arrived.

Android

Same helpers, different phone. phone-harness config set platform android makes Android the default (phone-harness config shows every setting and where it came from); until then, or to override per call, prefix with PHONE_HARNESS_PLATFORM=android. The harness finds the phone itself — a USB phone if plugged in, else the paired Wi-Fi phone — so there is nothing to select.

bash
PHONE_HARNESS_PLATFORM=android phone-harness <<'PY'
open_app("chrome"); wait_stable()
tap_ui("Got it")                    # exact label from the accessibility tree
PY
  • Coordinates are device pixels; the screenshot is 1:1 with tap(x, y).
  • ocr() is the accessibility tree (source: "tree") — exact, no misreads. Prefer ui() / find_nodes() / tap_ui(): they also see elements with no visible text (icons with a content-description, fields by resource-id like tap_ui("url_bar")). ocr_pixels() is Unsupported here.
  • back(), current_app(), list_apps() exist. open_app("chrome") matches installed package ids and returns the one launched.
  • press() takes single keys only ("enter", "back", "tab"); chords raise Unsupported. type_text needs a focused field, same as iOS.
  • No focus to keep: nothing on the Mac has to be frontmost, and interruption(before, after) always reports nothing disturbed.
  • Verify cheaply, then read. adb reports nothing about outcomes — a tap on empty space "succeeds". After an action: wait_for_app("com.android.chrome") (~0.1s per poll) or wait_for_text("Got it") (returns the box or None), then ui()/ocr() once for contents. The tree costs ~2-3s a call on a slow phone and a screenshot ~0.5s, so batching a whole sub-task in one invocation is worth a lot — but batch the steps you have already watched work, and keep a check at the end. A batch of unverified steps fails silently and tells you nothing about which one broke.
  • The phone locks itself after its screen timeout. connection_state() reports locked; taps and ocr() refuse with the same message. Ask the user to unlock — never type a PIN. screenshot() still works locked, so you can show them what you see. For a task longer than a minute, ask the user, then run phone-harness android awake --bg: it keeps the phone awake for the session (and opens a mirror window if scrcpy is installed) without changing any phone setting; phone-harness android rest ends it and lets the phone sleep. Do that at the end of the task.
  • Connection is still the user's job (USB debugging + Allow, or Wireless debugging + phone-harness android pair CODE); on no-device the error names the missing step — relay it, don't retry-loop. phone-harness android shows known phones and what is attached.

Consent

This is the user's real phone. Stop and ask before anything outward-facing or hard to reverse: sending a message, posting, purchasing, deleting, changing settings.

Connection is the user's job

The harness never connects the phone for you. Connecting or resuming mirroring is a physical action — opening the app, approving the prompt, and (crucially) locking the iPhone when it says "iPhone in Use" — that only the user can do.

ensure_mirroring() gates every task on this: if the phone isn't connected it raises a clear message (call connection_state() yourself to check — ready / blocked / no-window / not-running). When you hit that:

  • STOP and relay the message. Ask the user to connect the phone themselves.
  • Never tap Connect / Continue, and never loop-poll waiting for the connection. Tapping Connect while the phone is unlocked does nothing, and polling just burns time — the only fix is the user locking/connecting the phone. Retry once after they confirm they've done it, not before.

Gotchas

  • Unfocused input is swallowed silently — for events you post yourself. The helpers are immune in the background build (input goes straight to the app), but raw CGEvents and the PHONE_HARNESS_BACKGROUND=0 path need the window frontmost: activate() before posting, and re-activate if a click steals focus mid-task. The failure looks exactly like "scrolling is broken" or "the list already ended" — when a gesture changes nothing on screen, check focus before inventing another theory.
  • The window is a video stream. macOS accessibility sees nothing inside it; AppleScript click at fails silently. Only HID-level CGEvents work.
  • The window moves. Never cache coordinates across calls; ocr() and swipe() re-query bounds every time.
  • Unlocking the physical phone pauses the session ("iPhone in Use"). Do not tap through the resume screen — stop and ask the user to lock/connect the phone (see "Connection is the user's job").
  • type_text needs an iOS text field focused first — tap the field, wait for the keyboard, then type. It fails silently when nothing is focused: the text goes to whatever is focused instead, or nowhere. Verify with a capture, and if a tap will not take focus, press("tab") moves between fields.
  • type_text pastes; it does not type. That is deliberate — the keystroke path runs through iOS autocorrect, which rewrites words as they land ("Thu" becomes "thru"). Pass keystrokes=True for fields that need real key events. The typed text stays on the Mac clipboard afterwards (restoring the old clipboard raced the phone and could paste it instead).
  • Home-Screen labels are not tap targets. tap_text("Weather") hits the label and nothing happens; the icon is ~35 points above it. Use tap_icon("Weather") (agent helper) on the Home Screen; tap_text works fine for in-app buttons and list rows.
  • Mouse taps map to touches 1:1, but there is no multi-touch: no pinch, no two-finger gestures.

Συνοδευτικά αρχεία

Το μοντέλο τα διαβάζει όποτε χρειάζεται, όσο η δεξιότητα είναι φορτωμένη. Διατίθενται ως αρχεία για ανάγνωση και δεν εκτελούνται ποτέ.

Συχνές ερωτήσεις

Τι κάνει η δεξιότητα AI Phone Harness;

Control the user's phone — iPhone through the Mac's iPhone Mirroring window, or an Android over adb: open apps, tap, type, swipe, read the screen.

Γιατί να χρησιμοποιήσετε τη δεξιότητα Phone Harness στο TypingMind;

Επειδή την εγκαθιστάτε μία φορά και τη χρησιμοποιείτε με οποιοδήποτε μοντέλο. Η Phone Harness είναι απλό Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως η ίδια δεξιότητα λειτουργεί με GPT-5, Claude, Gemini, Grok ή ένα τοπικό μοντέλο — και μπορείτε να αλλάξετε μοντέλο κατά τη διάρκεια της συνομιλίας χωρίς να διακοπεί η λειτουργία της. Το TypingMind λειτουργεί με τα δικά σας κλειδιά API, οπότε πληρώνετε απευθείας τους παρόχους αντί για συνδρομή ανά θέση χρήστη, ενώ οι δεξιότητες και οι συνομιλίες σας παραμένουν στον δικό σας χώρο αποθήκευσης.

Πώς εγκαθιστώ τη δεξιότητα Phone Harness στο TypingMind;

Στο TypingMind, ανοίξτε Πρόσθετα → Δεξιότητες → Εγκατάσταση από το GitHub και επικολλήστε τη διεύθυνση https://github.com/ShawnPana/phone-harness/tree/main. Το TypingMind διαβάζει το αρχείο SKILL.md, συγκεντρώνει τα συνοδευτικά αρχεία και εγκαθιστά τη δεξιότητα, την οποία μπορείτε να ενεργοποιείτε ανά συνομιλία.

Ποια μοντέλα AI μπορούν να χρησιμοποιήσουν τη δεξιότητα Phone Harness;

Οποιοδήποτε μοντέλο συνδέετε στο TypingMind. Οι δεξιότητες AI είναι απλές οδηγίες Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως τα GPT, Claude, Gemini, Grok και τα τοπικά μοντέλα μπορούν όλα να φορτώσουν αυτή τη δεξιότητα όταν ένα αίτημα αντιστοιχεί σε αυτή.

Με πόσα μοντέλα AI μπορώ να χρησιμοποιήσω τη δεξιότητα Phone Harness;

Με όσα θέλετε. Στο TypingMind μπορείτε να χρησιμοποιήσετε τη δεξιότητα Phone Harness με οποιοδήποτε μοντέλο υποστηρίζει δεξιότητες, όπως τα GPT, Claude, Gemini, Grok, DeepSeek, Mistral και Llama, χρησιμοποιώντας τα δικά σας κλειδιά API.

Είναι δωρεάν η δεξιότητα AI Phone Harness;

Ναι. Δημοσιεύεται στο GitHub από τον λογαριασμό ShawnPana με την άδεια χρήσης MIT. Πληρώνετε μόνο τον δικό σας πάροχο AI για τα token που χρησιμοποιείτε.

Τι είναι οι δεξιότητες AI;

Μια δεξιότητα AI είναι ένα επαναχρησιμοποιήσιμο πακέτο οδηγιών που διδάσκει σε ένα μοντέλο AI πώς να εκτελεί μια συγκεκριμένη εργασία. Ακολουθεί την ανοιχτή μορφή Agent Skills: ένα αρχείο SKILL.md με όνομα και περιγραφή, μαζί με τυχόν σενάρια κώδικα, πρότυπα ή αρχεία αναφοράς που μπορεί να χρειαστεί το μοντέλο. Το μοντέλο διαβάζει τις οδηγίες μόνο όταν το αίτημά σας αντιστοιχεί στη δεξιότητα, οπότε μια εγκατεστημένη δεξιότητα δεν κοστίζει τίποτα μέχρι να χρησιμοποιηθεί.

Σε τι διαφέρουν οι δεξιότητες AI από τα πρόσθετα ή τους συνδέσμους MCP;

Ένα πρόσθετο ή ένας σύνδεσμος MCP παρέχει στο μοντέλο νέα εργαλεία που μπορεί να καλέσει — κώδικα που εκτελείται κάπου και επιστρέφει ένα αποτέλεσμα. Μια δεξιότητα AI παρέχει αντί γι’ αυτό γνώσεις και διαδικασίες στο μοντέλο: πώς να προσεγγίσει μια εργασία, ποια βήματα να ακολουθήσει και ποια χαρακτηριστικά έχει ένα καλό αποτέλεσμα. Οι δεξιότητες είναι απλό Markdown, επομένως δεν χρειάζονται διακομιστή, κλειδί API ή περιβάλλον εκτέλεσης και λειτουργούν με οποιοδήποτε μοντέλο.

Προβολή όλων
Λογότυπο openclaw

Update Team Server

openclaw
ΟργανισμόςΔημοφιλής

Ενημερώστε τον διακομιστή Team που έχει ρυθμίσει ο χειριστής μέσω του επίσημου κατόχου του· εμπιστευτείτε την εγγενή επικύρωση και αποδοχή, χωρίς διπλούς ελέγχους ή προγραμματιστές εργασιών.

82.2K
391K
Οδηγίες
Προβολή
Λογότυπο openclaw

Cloud Image Bake

openclaw
ΟργανισμόςΔημοφιλής

Δημιουργήστε, επιλέξτε, επαληθεύστε στην πράξη και αποσύρετε με ασφάλεια μια εικόνα Cloud Worker με μονογραμμικές εντολές crabbox και διαμόρφωσης.

82.2K
391K
Οδηγίες
Προβολή
Λογότυπο openclaw

Acp Router

openclaw
ΟργανισμόςΔημοφιλής

Δρομολογήστε αιτήματα σε απλή γλώσσα για Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode ή ρητές εργασίες με ACP harness είτε σε περιόδους λειτουργίας OpenClaw…

82.2K
391K
Οδηγίες
Προβολή
Λογότυπο openclaw

Diffs

openclaw
ΟργανισμόςΔημοφιλής

Χρησιμοποιήστε το εργαλείο diffs για να δημιουργήσετε πραγματικές, κοινοποιήσιμες διαφορές (URL προβολής, αρχείο-δημιούργημα ή και τα δύο), αντί για μη αυτόματες περιλήψεις των αλλαγών.

82.2K
391K
Οδηγίες
Προβολή

Δημιουργήστε τώρα τον δικό σας χώρο εργασίας AI

Εγγραφείτε στο ενημερωτικό μας δελτίο για να ενημερώνεστε για νέες λειτουργίες και μελλοντικές κληρώσεις δώρων 👇