Skip to content

Commit d219c45

Browse files
committed
fix: register setup command + remove remaining xcrun/adb (GH #28 review)
Multi-review consensus fixes: - Register rn-setup skill + setup command in plugin.json so /rn-dev-agent:setup actually works (was a dead reference) - Replace xcrun simctl screenshot + adb screencap in Step 1 and Phase 8 with device_screenshot MCP tool (GATE contradiction) - Classify agent-device as critical in setup skill - Handle nvm not installed in Node.js check (suggest brew/fnm/download) - Use 2>&1 instead of 2>/dev/null for visible install diagnostics
1 parent ed36345 commit d219c45

4 files changed

Lines changed: 21 additions & 18 deletions

File tree

.claude-plugin/plugin.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"./skills/rn-device-control",
2525
"./skills/rn-testing",
2626
"./skills/rn-debugging",
27-
"./skills/rn-best-practices"
27+
"./skills/rn-best-practices",
28+
"./skills/rn-setup"
2829
],
2930
"agents": [
3031
"./agents/rn-tester.md",
@@ -45,7 +46,8 @@
4546
"./commands/rn-agent-import.md",
4647
"./commands/rn-agent-health.md",
4748
"./commands/nav-graph.md",
48-
"./commands/send-feedback.md"
49+
"./commands/send-feedback.md",
50+
"./commands/setup.md"
4951
],
5052
"userConfig": {
5153
"RN_METRO_PORT": {

commands/rn-feature-dev.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,8 @@ cdp_error_log(clear=true)
220220
```
221221

222222
Then capture the current screen state:
223-
```bash
224-
# iOS
225-
xcrun simctl io booted screenshot --type=jpeg /tmp/rn-feature-verify.jpg
226-
# Android
227-
adb exec-out screencap -p > /tmp/rn-feature-verify.png
223+
```
224+
device_screenshot(path="/tmp/rn-feature-verify.jpg")
228225
```
229226

230227
### Step 2: Health Check
@@ -452,11 +449,8 @@ in the table, execute in order:
452449
- Wait 1-2 seconds for state to settle (or use `device_snapshot` to confirm)
453450

454451
2. **Capture the screenshot** using the exact filename from the table:
455-
```bash
456-
# iOS
457-
xcrun simctl io booted screenshot --type=jpeg docs/proof/<feature-slug>/<filename>
458-
# Android
459-
adb exec-out screencap -p > docs/proof/<feature-slug>/<filename>
452+
```
453+
device_screenshot(path="docs/proof/<feature-slug>/<filename>")
460454
```
461455

462456
3. **Verify the expected state** as specified in the table:

commands/setup.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
command: setup
3+
description: Check and install all rn-dev-agent prerequisites. Run on first setup or when tools fail.
4+
argument-hint:
5+
---
6+
7+
Run the environment setup checklist from the `rn-setup` skill. Check all 9 prerequisites (Node.js, CDP bridge, agent-device, maestro-runner, simulators, Metro, CDP connection, ffmpeg) and install any missing dependencies. Present results as a table.

skills/rn-setup/SKILL.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ This skill checks every prerequisite and installs missing dependencies.
2323
node --version
2424
```
2525
**Required:** Node.js >= 22 LTS (even-numbered release).
26-
If odd-numbered (e.g., v25) or < 22: warn the user to install Node 22 via nvm.
27-
```bash
28-
nvm install 22 && nvm use 22
29-
```
26+
If odd-numbered (e.g., v25) or < 22: warn the user to install Node 22.
27+
- If `nvm` is installed (`command -v nvm`): `nvm install 22 && nvm use 22`
28+
- If `fnm` is installed: `fnm install 22 && fnm use 22`
29+
- Otherwise: download from https://nodejs.org/en/download/ or `brew install node@22`
3030

3131
### 2. CDP bridge dependencies
3232
```bash
@@ -95,8 +95,8 @@ Present results as a table:
9595
| CDP connection | CONNECTED ||
9696
| ffmpeg | OK (v7.1) ||
9797

98-
If any critical check fails (CDP bridge, Metro, or simulator), provide
99-
step-by-step instructions to fix it. Do not proceed with feature
98+
If any critical check fails (CDP bridge, agent-device, Metro, or simulator),
99+
provide step-by-step instructions to fix it. Do not proceed with feature
100100
development until all critical checks pass.
101101

102102
## After setup

0 commit comments

Comments
 (0)