Skip to content

Add eas-simulator skill#88

Open
gwdp wants to merge 1 commit into
mainfrom
gwdp/eas-simulator-skill
Open

Add eas-simulator skill#88
gwdp wants to merge 1 commit into
mainfrom
gwdp/eas-simulator-skill

Conversation

@gwdp

@gwdp gwdp commented Jun 24, 2026

Copy link
Copy Markdown

Why

EAS provides cloud simulators. This skill makes it easy for agents to open in-development apps on them.

What

New skill at plugins/expo/skills/eas-simulator/ — SKILL.md and three reference files. Covers the session lifecycle, three ways to get an app onto the sim, driving it (press, screenshot, etc.), and cleanup.

Test plan

Ran all three modes on real sessions from Cursor on a Mac. Opus 4.8, Composer 2.5, and Codex 5.3 all picked up and followed the skill correctly.

Mode A — local release build

Built locally, uploaded to the cloud sim, app rendered.

screenshot

Transcript

Mode B — EAS build

EAS built it, VM downloaded the artifact (no credentials), app rendered.

eas_build

Transcript

Mode C — dev build + tunnel (live edit)

Edited a file locally, it hot-reloaded on the remote sim with no rebuild.

before after hot reload

Transcript

Trigger accuracy — 6/6 (100%)
# Prompt Result
1 Run my Expo app on a cloud iOS simulator and screenshot the home screen
2 I'm on Linux with no Mac available — use EAS to open my app on a remote simulator
3 Start an EAS simulator session, install my app, and take a screenshot
4 Use eas simulator to run my expo app on iOS and capture a screenshot of it
5 I want to make live code changes and see them hot-reload on a cloud simulator without a Mac
6 Open my app on a remote Android simulator via EAS and verify it renders correctly

Still to do:

  • Check whether this belongs in public skills while the feature is experimental

@gwdp gwdp changed the title add eas-simulator skill Add eas-simulator skill Jun 24, 2026
@gwdp gwdp requested review from davidmokos and zvadaadam June 25, 2026 06:36
@gwdp gwdp marked this pull request as ready for review June 25, 2026 06:37
@gwdp gwdp force-pushed the gwdp/eas-simulator-skill branch from 95f2749 to b1e998a Compare June 25, 2026 06:41

@davidmokos davidmokos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review comments based on Anthropic and OpenAI skill-creator guidance.


```bash
# 1. Add a simulator build profile to eas.json
cat > eas.json <<'JSON'

@davidmokos davidmokos Jun 25, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not overwrite eas.json. Agents often run skill command blocks as written, so this can delete existing build or submit profiles.
A better way would be to instruct the agent to merge/add a sim profile while preserving existing cli, build, and submit config

@@ -0,0 +1,145 @@
---
name: eas-simulator
description: "Run and control a user's app on a remote iOS/Android simulator hosted on EAS cloud. Always read before executing any `eas simulator:*` commands — it has the current syntax for this experimental API. Use whenever the user needs a simulator they can't run locally — 'run my app on a cloud simulator', 'use eas simulator to run/install/screenshot my app', 'I'm on Linux/Cursor and need an iOS device', 'no sim on this box / headless CI', 'let an agent click through my app and screenshot it', 'test my dev build on a remote sim with live reload', 'stream a sim's screen to my browser' — even when they don't say 'EAS Simulator' or 'cloud'. Covers `eas simulator:*` plus installing a build and a dev-build live-edit loop. On a host WITHOUT a local simulator (Linux, CI, cloud sandbox) it's the default — just use it; on macOS, where a local sim exists, do NOT auto-trigger for a plain 'run on the simulator' — use it only for a cloud/remote/shareable sim, an iOS version they lack, or an agent-driven session. NOT for local sims (expo run:ios, Xcode, Android Studio), EAS Build/Update, web preview, or physical devices."

@davidmokos davidmokos Jun 25, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description is 1,115 chars, we should fit into 1,024 chars. Please trim it. Keep the main trigger cases here and move examples or exclusions into the body.


⚠️ **Don't install a release build as a "quick interim" and screenshot it** — that interim shows stale, build-time code (the "outdated screenshot" trap). Go straight to the dev build + Metro; screenshot only after the dev client is connected to Metro.

**No local Mac toolchain?** (the common cloud/Linux case) Build the dev client on **EAS** instead of step 1: add a profile with `{"developmentClient": true, "ios": {"simulator": true}}`, run `npx --yes eas-cli@latest build --platform ios --profile dev-sim`, and in step 3 use `install-from-source <artifact-url>` (VM downloads it) instead of the local `install`. Steps 2 and 4–7 (Metro tunnel + connect) are identical — your edited JS still loads live from your local Metro.

@davidmokos davidmokos Jun 25, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused a little here - Mode C is the default and the main point of cloud simulator is that you can run on non-macOS machine. However, the EAS dev-client path is only a short paragraph even though it's the most important part. Can we expand it a little?

@Kudo Kudo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would like to know further test plans:

  • if we ask agent to use argent, does it work well? (because the skill / references hardcoded agent-device in multiple places)
  • if we ask agent to run android workflow, does ti work well? (because the skill / references hardcoded ios in multiple places)

description: "Run and control a user's app on a remote iOS/Android simulator hosted on EAS cloud. Always read before executing any `eas simulator:*` commands — it has the current syntax for this experimental API. Use whenever the user needs a simulator they can't run locally — 'run my app on a cloud simulator', 'use eas simulator to run/install/screenshot my app', 'I'm on Linux/Cursor and need an iOS device', 'no sim on this box / headless CI', 'let an agent click through my app and screenshot it', 'test my dev build on a remote sim with live reload', 'stream a sim's screen to my browser' — even when they don't say 'EAS Simulator' or 'cloud'. Covers `eas simulator:*` plus installing a build and a dev-build live-edit loop. On a host WITHOUT a local simulator (Linux, CI, cloud sandbox) it's the default — just use it; on macOS, where a local sim exists, do NOT auto-trigger for a plain 'run on the simulator' — use it only for a cloud/remote/shareable sim, an iOS version they lack, or an agent-driven session. NOT for local sims (expo run:ios, Xcode, Android Studio), EAS Build/Update, web preview, or physical devices."
version: 1.0.0
license: MIT
allowed-tools: "Bash(npx *), Bash(eas *), Bash(expo *), Bash(xcodebuild*), Bash(pod*)"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we scope the tools to smaller group? especially the npx * feels dangerous


## When to use

The frontmatter `description` carries the trigger phrases. In short: use this to get a user's app onto a **cloud** simulator and interact with it — especially from a Mac-less or cloud/sandbox agent. **Not** for local sims (`expo run:ios`, Xcode, Android Studio), store builds/signing (that's EAS Build), or physical devices. For the macOS case, see *Cloud vs local* next.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i suppose agents will load frontmatter and description before this section?

## Cloud vs local: decide this first

- **Non-macOS** (Linux / CI / cloud sandbox like Cursor Cloud, detect via `uname -s``Darwin`): the only way to get a sim — **just proceed.**
- **macOS:** local sims exist and a cloud session costs money + latency, so **ask first** ("a remote cloud sim — to share a live preview, offload, or test an iOS version you lack — or just run locally?") unless the user explicitly said cloud/remote/shareable.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we run some local script to determine whether local simulator/emulator is available?
e.g. checking simctl or xcodebuild available?

- **Run every `eas` command via `npx --yes eas-cli@latest …`** — guarantees a CLI new enough to have `simulator:*` (a global `eas` is often too old), and `--yes` skips npx's prompt. (Bare `eas` is fine if `eas --version` is current.)
- **Authenticated.** Interactive machine → `npx --yes eas-cli@latest login`. **Cloud sandbox / CI / headless agent has no browser login — set `EXPO_TOKEN`** (expo.dev → Account → Access Tokens) in the env instead. Verify either way with `npx --yes eas-cli@latest whoami`.
- Run from an Expo **project directory.** A fresh app needs one-time setup: `npx --yes eas-cli@latest init` to create/link the project (when there's no `projectId`), and **set `ios.bundleIdentifier`** in app config if it's missing — a fresh `create-expo-app` often has none, and `prebuild`/`eas build` need it (they prompt or fail without it; e.g. `dev.<owner>.<slug>`). Read current config with `npx expo config --json` (it may live in `app.config.js`). The first Mode-C run is slow (native build); later runs reuse it.
- A controller to drive the device. This skill uses **agent-device** (open source, MIT), run on demand via `npx agent-device@latest` — nothing globally installed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we mention argent or other alternatives here in Prerequisites?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants