Skip to content

Commit 02a300a

Browse files
authored
Merge pull request #961 from AvdLee/feature/agent-skill
feat: Add agent skill for RocketSim CLI discovery
2 parents b566a48 + 6b317ed commit 02a300a

File tree

9 files changed

+411
-16
lines changed

9 files changed

+411
-16
lines changed

.claude-plugin/marketplace.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/anthropics/claude-code/refs/heads/main/marketplace/marketplace.schema.json",
3+
"name": "rocketsim",
4+
"version": "1.0.0",
5+
"owner": {
6+
"name": "Antoine van der Lee",
7+
"email": "contact@avanderlee.com"
8+
},
9+
"metadata": {
10+
"description": "Use RocketSim to inspect and interact with iOS Simulator apps through the RocketSim CLI."
11+
},
12+
"plugins": [
13+
{
14+
"name": "rocketsim",
15+
"description": "Use RocketSim to inspect visible simulator UI and interact with iOS Simulator apps through the RocketSim CLI.",
16+
"repository": "https://github.com/AvdLee/RocketSimApp",
17+
"version": "1.0.0",
18+
"author": {
19+
"name": "Antoine van der Lee",
20+
"email": "contact@avanderlee.com"
21+
},
22+
"license": "UNLICENSED",
23+
"category": "development",
24+
"keywords": [
25+
"rocketsim",
26+
"simulator",
27+
"ios",
28+
"apple",
29+
"automation",
30+
"accessibility",
31+
"ui-testing"
32+
],
33+
"tags": [
34+
"rocketsim",
35+
"simulator",
36+
"ios",
37+
"apple",
38+
"automation",
39+
"accessibility",
40+
"ui-testing"
41+
],
42+
"source": "./"
43+
}
44+
]
45+
}

.claude-plugin/plugin.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "rocketsim",
3+
"version": "1.0.0",
4+
"description": "Use RocketSim to inspect and interact with iOS Simulator apps through the RocketSim CLI.",
5+
"author": {
6+
"name": "Antoine van der Lee",
7+
"email": "contact@avanderlee.com"
8+
},
9+
"repository": "https://github.com/AvdLee/RocketSimApp",
10+
"license": "UNLICENSED",
11+
"keywords": [
12+
"rocketsim",
13+
"simulator",
14+
"ios",
15+
"apple",
16+
"automation",
17+
"accessibility",
18+
"ui-testing"
19+
],
20+
"skills": [
21+
"./Agent-Skill"
22+
]
23+
}

.cursor-plugin/plugin.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "rocketsim",
3+
"version": "1.0.0",
4+
"description": "Use RocketSim to inspect and interact with iOS Simulator apps through the RocketSim CLI.",
5+
"author": {
6+
"name": "Antoine van der Lee",
7+
"email": "contact@avanderlee.com"
8+
},
9+
"repository": "https://github.com/AvdLee/RocketSimApp",
10+
"license": "UNLICENSED",
11+
"keywords": [
12+
"rocketsim",
13+
"simulator",
14+
"ios",
15+
"apple",
16+
"automation",
17+
"accessibility",
18+
"ui-testing"
19+
],
20+
"skills": [
21+
"Agent-Skill"
22+
]
23+
}

.github/workflows/release.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Release Agent Skill
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Version to release (e.g. 1.0.2)"
8+
required: true
9+
type: string
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
release:
16+
if: github.ref == 'refs/heads/master'
17+
runs-on: ubuntu-latest
18+
env:
19+
VERSION: ${{ inputs.version }}
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
with:
25+
ref: master
26+
fetch-depth: 0
27+
token: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Validate version input
30+
run: |
31+
set -euo pipefail
32+
33+
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
34+
echo "Error: Invalid version '$VERSION'. Expected format like 1.0.2."
35+
exit 1
36+
fi
37+
38+
- name: Bump agent skill package versions
39+
run: |
40+
set -euo pipefail
41+
42+
python3 <<'PY'
43+
import json
44+
import os
45+
import pathlib
46+
import re
47+
48+
version = os.environ["VERSION"]
49+
50+
openai_path = pathlib.Path("agents/openai.yaml")
51+
openai_text = openai_path.read_text()
52+
updated_openai_text, count = re.subn(
53+
r'(?m)^version:\s*"[^"]+"$',
54+
f'version: "{version}"',
55+
openai_text,
56+
count=1,
57+
)
58+
if count != 1:
59+
raise SystemExit("Failed to update version in agents/openai.yaml")
60+
openai_path.write_text(updated_openai_text)
61+
62+
json_paths = [
63+
pathlib.Path(".claude-plugin/plugin.json"),
64+
pathlib.Path(".claude-plugin/marketplace.json"),
65+
pathlib.Path(".cursor-plugin/plugin.json"),
66+
]
67+
68+
for path in json_paths:
69+
data = json.loads(path.read_text())
70+
data["version"] = version
71+
if path.name == "marketplace.json":
72+
if not data.get("plugins"):
73+
raise SystemExit("Expected at least one plugin in .claude-plugin/marketplace.json")
74+
data["plugins"][0]["version"] = version
75+
path.write_text(json.dumps(data, indent=2) + "\n")
76+
PY
77+
78+
- name: Commit and push version bump
79+
run: |
80+
set -euo pipefail
81+
82+
if git diff --quiet agents/openai.yaml .claude-plugin/plugin.json .claude-plugin/marketplace.json .cursor-plugin/plugin.json; then
83+
echo "Error: No changes detected after version bump. Is the repository already at version $VERSION?"
84+
exit 1
85+
fi
86+
87+
git config user.name "github-actions[bot]"
88+
git config user.email "github-actions[bot]@users.noreply.github.com"
89+
git add agents/openai.yaml .claude-plugin/plugin.json .claude-plugin/marketplace.json .cursor-plugin/plugin.json
90+
git commit -m "Bump Agent-Skill package version to $VERSION"
91+
git push

Agent-Skill/SKILL.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
name: rocketsim
3+
description: "Use RocketSim to inspect and interact with iOS Simulator apps. Detects the installed RocketSim version, loads the matching RocketSim CLI guidance, and enables agents to list visible accessibility elements, navigate screens, tap, long-press, swipe, type text, press simulator hardware buttons, and automate simulator flows reliably. Use when: (1) the user mentions RocketSim, the rocketsim command, or RocketSim CLI, (2) interacting with an app in the iOS Simulator, (3) navigating or testing a simulator app with AI, (4) reading screen elements, accessibility elements, or visible UI state, (5) tapping, long-pressing, swiping, typing, or pressing simulator buttons, (6) using RocketSim instead of ad-hoc simulator automation."
4+
---
5+
6+
# RocketSim Agent Skill
7+
8+
This skill lets agents use RocketSim as a reliable Simulator interaction layer. It finds a valid RocketSim app bundle, loads the matching bundled CLI reference, and hands off to the installed RocketSim version so simulator automation stays version-aware and in sync with the app on disk.
9+
10+
## Step 1: Locate and validate RocketSim.app
11+
12+
Developer machines can have multiple RocketSim installs side-by-side, such as an App Store build plus a locally built or renamed copy. Do not assume `/Applications/RocketSim.app` is the right app, and do not continue unless you validate the bundled skill and CLI paths first.
13+
14+
### Prefer the running RocketSim app
15+
16+
If RocketSim is already running, prefer that app bundle first:
17+
18+
```bash
19+
ROCKETSIM_PID="$(pgrep -x RocketSim | head -1)"
20+
APP_PATH=""
21+
if [ -n "$ROCKETSIM_PID" ]; then
22+
APP_PATH="$(ps -o command= -p "$ROCKETSIM_PID" | sed 's#/Contents/MacOS/RocketSim$##')"
23+
fi
24+
printf '%s\n' "$APP_PATH"
25+
```
26+
27+
If that prints a path, validate it before continuing.
28+
29+
### Otherwise, enumerate candidate installs
30+
31+
If RocketSim is not running, gather candidate app bundles instead of taking the first match:
32+
33+
```bash
34+
mdfind "kMDItemCFBundleIdentifier == 'com.swiftLee.RocketSim'"
35+
```
36+
37+
Then also check common fallback paths, including renamed installs:
38+
39+
1. `/Applications/RocketSim.app`
40+
2. `/Applications/RocketSim 2.app`
41+
3. `~/Applications/RocketSim.app`
42+
4. `~/Applications/RocketSim 2.app`
43+
44+
### Validate every candidate before continuing
45+
46+
Given a candidate app path (`APP_PATH`), the following two files must exist:
47+
48+
- `APP_PATH/Contents/Resources/Agent-Skill/SKILL.md`
49+
- `APP_PATH/Contents/Helpers/rocketsim`
50+
51+
Use this validation:
52+
53+
```bash
54+
test -f "$APP_PATH/Contents/Resources/Agent-Skill/SKILL.md" && test -x "$APP_PATH/Contents/Helpers/rocketsim"
55+
```
56+
57+
Pick the first candidate that passes validation. If RocketSim is already running, only continue with the running app if it passes validation.
58+
59+
If no candidate passes validation, stop immediately and tell the user:
60+
> I found RocketSim installs, but none of them expose the bundled Agent Skill and CLI that this workflow requires. Please launch or install a current RocketSim build from the Mac App Store: https://apps.apple.com/us/app/rocketsim-for-xcode-simulator/id1504940162
61+
62+
## Step 2: Resolve Paths
63+
64+
Given the app path (`APP_PATH`), derive:
65+
- **Bundled skill:** `APP_PATH/Contents/Resources/Agent-Skill/SKILL.md`
66+
- **CLI binary:** `APP_PATH/Contents/Helpers/rocketsim`
67+
68+
## Discovery contract
69+
70+
Before moving on to Step 3, all of the following must be true:
71+
72+
- `APP_PATH` points to the RocketSim bundle you intend to use.
73+
- `APP_PATH/Contents/Resources/Agent-Skill/SKILL.md` exists.
74+
- `APP_PATH/Contents/Helpers/rocketsim` exists and is executable.
75+
- If RocketSim is already running, the chosen `APP_PATH` should be the running app bundle.
76+
77+
If any of these checks fail, stop and resolve discovery first. Do not attempt simulator interaction without a validated CLI path.
78+
79+
## Step 3: Read the Bundled Skill
80+
81+
Read the file at `APP_PATH/Contents/Resources/Agent-Skill/SKILL.md` and follow its instructions. Wherever the bundled skill references the CLI binary, use the resolved absolute path from Step 2.
82+
83+
## Step 4: Verify RocketSim is Running
84+
85+
Before executing any CLI command, verify the app is running:
86+
87+
```bash
88+
pgrep -x RocketSim >/dev/null && echo "Running" || echo "Not running"
89+
```
90+
91+
If not running, ask the user to launch RocketSim before proceeding.
92+
93+
If RocketSim is running from a different app bundle than the `APP_PATH` you resolved, restart discovery and prefer the running app bundle.

Assets/github-banner.jpg

330 KB
Loading

LICENSE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright (c) 2026 SwiftLee
2+
All rights reserved.
3+
4+
This repository and all associated source code, documentation, assets, and
5+
other materials are proprietary to SwiftLee.
6+
7+
No permission is granted to use, copy, modify, merge, publish, distribute,
8+
sublicense, sell, or create derivative works from this repository or any part
9+
of it, in whole or in part, without prior written permission from SwiftLee,
10+
except as required by applicable law.
11+
12+
Access to this repository does not grant any license or other intellectual
13+
property rights in RocketSim or its related materials.

0 commit comments

Comments
 (0)