run
Build, install, and run the app on a target device (auto-detects platform)
SKILL.mdskills/run/SKILL.md
GitHubRun App
Build, install, and launch the application on a target device. Auto-detects the project platform and build system.
Arguments
Parse $ARGUMENTS for named flags:
--no-install— Skip the install step (assume already installed)--device <target>— Target device. Values:- Android:
emulator,physical, or a device serial fromadb devices - iOS:
simulator,physical, or a device UDID - Web:
chrome,firefox,safari,edge - Flutter: any
flutter devicesid
- Android:
--variant <variant>— Build variant (e.g.debug,release,demo). Defaults todebug. Passed through to/skills:install.
Platform Detection (Parallel)
Launch parallel agents to detect the project platform:
Agent 1 — Android:
Check for: build.gradle.kts or build.gradle containing android, AndroidManifest.xml
Agent 2 — iOS:
Check for: *.xcodeproj, *.xcworkspace, Podfile, Package.swift with iOS platform
Agent 3 — Web:
Check for: package.json with dev/start script, deno.json, composer.json, Gemfile
Agent 4 — Cross-platform:
Check for: pubspec.yaml (Flutter), build.gradle.kts with kotlin("multiplatform") (KMP)
Execution
1. Install (unless --no-install)
Run the /skills:install command with the resolved device target. This handles build + install.
2. Resolve Device
Determine the target device for launching:
Android:
adb devices -l- Match
--devicevalue:emulator→ device line containingemulatorphysical→ device line NOT containingemulator- Serial string → exact match
- No value, one device → use it
- No value, multiple devices → ask the user which to target
- Extract serial for
adb -s <serial>commands
iOS:
simulator→xcrun simctl list devices booted(boot one if none running)physical→xcrun devicectl list devices- No value, one target → use it
- No value, multiple targets → ask the user which to target
Web:
- Resolve browser:
chrome→open -a "Google Chrome"(macOS) /google-chrome(Linux)firefox→open -a Firefox/firefoxsafari→open -a Safariedge→open -a "Microsoft Edge"/microsoft-edge- No value → use whatever
openorxdg-opendefaults to
- Dev server URL from framework detection (usually
http://localhost:3000or:5173or:8080)
Flutter:
flutter devicesto list available- Match
--devicevalue against device id or name - No value → first available
3. Launch
Android:
- Detect the app package and main activity:
- Parse
AndroidManifest.xmlforpackageattribute and the activity withandroid.intent.action.MAIN - Or parse from
build.gradle.kts:applicationId
- Parse
- Launch:
adb -s <serial> shell am start -n <package>/<activity>
iOS Simulator:
- Detect bundle ID from
Info.plistor Xcode project - Launch:
xcrun simctl launch booted <bundle-id>
iOS Device:
xcrun devicectl device process launch --device <udid> <bundle-id>
Web:
- Start dev server in background if not running:
package.jsonwithdevscript →<pm> run devpackage.jsonwithstartscript →<pm> run startcomposer.json(Laravel) →php artisan serveGemfile(Rails) →bin/rails serverdeno.json→deno task devordeno task start
- Wait for server to be ready (poll localhost)
- Open browser to the dev URL
Flutter:
flutter run -d <device-id>
4. Report
Confirm the app is running with:
- Device name and serial/id
- Package/bundle identifier
- Any relevant URL (for web)
Error Handling
- App not installed: Run
/skills:installeven if--no-installwas passed, then retry launch - Activity not found: Re-detect from manifest, try alternate activity names
- Device offline: Report and suggest reconnecting
- Port in use (web): Find the process on the port, report to user, suggest killing or using alternate port
- Build failure: Delegate to
/skills:buildcommand for diagnosis and fixing