agentleFS
everpcpceverpcpc/KMReader/.agents/skills/simulator/SKILL.md

simulator

Skill118 starsChanged 7 days agoMITView on GitHub

Use when observing or driving an iOS simulator for KMReader debugging — screenshots, accessibility tree, tap/swipe/gestures, hardware buttons, orientation, and unified logs via baguette. Build and install go through the Makefile + xcrun simctl.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Verify: baguette screenshot --udid <UDID> -o /tmp/shot.png and read the image.

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

simulator — iOS simulator interaction

baguette (brew, Apple Silicon + Xcode 26+) is a CLI for headless iOS simulator control: screen capture, host-HID input injection, accessibility tree, and log streaming.

Boundaries

  • baguette does not build or install apps. Keep the existing flow: make build-ios, then xcrun simctl install <UDID> <app> and xcrun simctl launch <UDID> com.everpcpc.Komga (terminate to stop).
  • The target simulator UDID is persisted in devices.json (ios_simulator). Read it from there; baguette list --json shows boot state.

Device Hub gotcha (read first)

A simulator booted by Xcode (e.g. after make run-ios-sim) has its input surface shadowed by Device Hub: taps/swipes ack {"ok":true} but land nowhere. Fix once per boot:

baguette heal --udid <UDID>   # restarts SpringBoard, ~4s

Booting with baguette boot --udid <UDID> (headless) avoids the problem entirely.

Interaction loop

  1. baguette describe-ui --udid <UDID> — AX tree as JSON. Every node has a frame in device points; compute the center and feed it straight into a tap. Add --x <px> --y <py> to hit-test one point instead.
  2. Act: tap / double-tap / swipe / pinch / pan / press --button home / type --text ... / paste --text ... (paste handles unicode; type is US-ASCII only). To replace existing field text: double-tap the field to select its content, then paste — Cmd+V overwrites the selection.
  3. Verify: baguette screenshot --udid <UDID> -o /tmp/shot.png and read the image. Re-capture after each action; on unexpected results retry once, then stop and report.
baguette tap   --udid <UDID> --x 122 --y 237 --width 402 --height 874
baguette swipe --udid <UDID> --start-x 340 --start-y 437 --end-x 60 --end-y 437 --width 402 --height 874
  • Coordinates are device points, not pixels. The screen size in points is the root node's frame in describe-ui (e.g. 402×874 for iPhone 18 Pro); --width/--height must match it.
  • CLI flags are kebab-case (--start-x, not the README's --startX). When in doubt, <cmd> --help.

Logs

baguette logs --udid <UDID> --predicate 'subsystem == "com.everpcpc.kmreader"' --style compact
  • The app logs to subsystem com.everpcpc.kmreader (see AppLogger.swift), categories API, SSE, ReaderViewModel, etc. --bundle-id com.everpcpc.Komga and --level also work.
  • The stream is live-only (no history); start it before reproducing the issue, stop with ^C/pkill -f "baguette logs".

Extras

  • baguette orientation --udid <UDID> landscape-left — rotate; press --button lock — lock.
  • baguette record --udid <UDID> --duration 10 -o /tmp/clip.mp4 — H.264 recording.
  • baguette serve — web UI at http://localhost:8421/simulators (live stream, farm view, AX inspector). Useful for watching a long session; the CLI is enough for scripted checks.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.