diff --git a/.claude/settings.json b/.claude/settings.json index a63b4a04a775..3cd2d1b82934 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -52,7 +52,9 @@ "mcp__sentry__search_events", "mcp__sentry__search_issue_events", "mcp__sentry__search_issues", - "mcp__sentry__whoami" + "mcp__sentry__whoami", + "Bash(agent-device *)", + "Bash(echo \"$(npm root -g)/agent-device/skills/agent-device\")" ] }, "enabledPlugins": { diff --git a/.claude/skills/agent-device/SKILL.md b/.claude/skills/agent-device/SKILL.md new file mode 100644 index 000000000000..b542aae75be5 --- /dev/null +++ b/.claude/skills/agent-device/SKILL.md @@ -0,0 +1,15 @@ +--- +name: agent-device +description: Drive iOS and Android devices for the Expensify App - testing, debugging, performance profiling, bug reproduction, and feature verification. Use when the developer needs to interact with the mobile app on a device. +allowed-tools: Bash(agent-device *) Bash(npm root *) +--- + +# agent-device + +## Pre-flight + +`agent-device` CLI version: !`agent-device --version 2>&1 || echo "NOT_INSTALLED"` + +Canonical skill reference path (read these files directly for device automation guidance - bootstrap, exploration, verification, debugging): !`echo "$(npm root -g)/agent-device/skills/agent-device"` + +> If the version line above shows `NOT_INSTALLED` or a command-not-found error, **STOP** and instruct the developer to install it: `npm install -g agent-device`. All device interaction depends on it. diff --git a/.gitignore b/.gitignore index 79175c075a16..6775d4e4fe81 100644 --- a/.gitignore +++ b/.gitignore @@ -162,5 +162,8 @@ modules/*/lib/ .playwright-output/ .playwright-mcp/ +# agent-device +agent-device-output/ + # cspell cache .cspellcache diff --git a/CLAUDE.md b/CLAUDE.md index c6856a4da3a4..a4027066d5ee 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -278,6 +278,9 @@ npm run web ### Browser Testing Use the `/playwright-app-testing` skill to test and debug the App in a browser. Use this skill after making frontend changes to verify your work, or when the user requests testing. +### Mobile Device Testing +Use the `/agent-device` skill to drive the App on iOS and Android (simulators or real devices) for interactive testing, performance profiling, bug reproduction, and device-specific debugging. Requires `npm install -g agent-device` - the skill's pre-flight check will surface the install instruction if missing. + ## Architecture Decisions ### React Native New Architecture diff --git a/README.md b/README.md index 3bc69752ef74..a46e1b31cc5a 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,8 @@ For detailed setup instructions for each platform, see the following guides: * **📱 iOS Development**: [iOS Setup Instructions](contributingGuides/SETUP_IOS.md) * **🤖 Android Development**: [Android Setup Instructions](contributingGuides/SETUP_ANDROID.md) +**Optional AI-assisted mobile testing:** If you use Claude Code, the [`/agent-device` skill](.claude/skills/agent-device/SKILL.md) drives iOS and Android simulators or devices for interactive testing, debugging, and performance profiling. Requires `npm install -g agent-device`. + ## General Troubleshooting 1. If you are having issues with **_Getting Started_**, please reference [React Native's Documentation](https://reactnative.dev/docs/environment-setup) 2. If you are running into CORS errors like (in the browser dev console)