Build, install, and launch an iOS app on a physical iPhone or iPad entirely from the command line (no Xcode GUI), using xcodebuild + devicectl.

MITAuto-check: notesMobile

Install Run Device

skills CLI
$ npx skills add rshankras/claude-code-apple-skills --skill run-device -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rshankras/claude-code-apple-skills run-device --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/ios/run-device .claude/skills/run-device && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
run-device
GitHub stars
783
Token cost
~1.8k tokens
SKILL.md length
768 words
Files
1
Skills in repo
41
Repo updated
First seen
Licence
MIT

At a glance

Build, install, and launch an iOS app on a physical iPhone or iPad entirely from the command line (no Xcode GUI), using xcodebuild + devicectl.

  • Works in 6 steps: Pick the device identifier → Build + sign for a device → Resolve the built .app (device build →… → …
  • The user wants to run
  • SKILL.md covers When This Skill Activates, Prerequisites (one-time,…, Process and Output Format, plus 1 more section
  • Calls xcrun, xcodebuild and brew

What it does

Run Device is an agent skill from rshankras/claude-code-apple-skills. Build, install, and launch an iOS app on a physical iPhone or iPad entirely from the command line (no Xcode GUI), using xcodebuild + devicectl. Use when the user wants to run, test, or screenshot their app on a real device without opening Xcode.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering iOS development. It works with Xcode and iOS. The repository describes itself as: Claude Code skills for Apple platform development (iOS, macOS, iPadOS) — product validation, code generation, App Store optimization, and more. The licence is MIT.

When your agent uses it

  • The user wants to run
  • Screenshot their app on a real device without opening Xcode

Example prompts

  • “/run-device”

Requirements

  • Pre-approved tools (allowed-tools): Bash, Read

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Pick the device identifier
  2. Build + sign for a device
  3. Resolve the built .app (device build → Debug-iphoneos)
  4. Install
  5. Launch
  6. Screenshot (optional — needs an extra tool)

What it can do on your machine

Read from SKILL.md and the folder at commit 9ffb831. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • xcrun
    • xcodebuild
    • brew

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • libimobiledevice.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Run Device loads about 1.8k tokens when it runs. Until then it costs about 64 tokens; SKILL.md has 768 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~64
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from rshankras/claude-code-apple-skills at commit 9ffb831, republished under its MIT licence (© rshankras). 768 words, ~1,781 tokens.

Download SKILL.mdSave it as .claude/skills/run-device/SKILL.md (or your agent's skills folder).
name
run-device
description
Build, install, and launch an iOS app on a physical iPhone or iPad entirely from the command line (no Xcode GUI), using xcodebuild + devicectl. Use when the user wants to run, test, or screenshot their app on a real device without opening Xcode.
allowed-tools
Bash, Read
last_verified
2026-07-16
review_by
2027-06-22
os_version
iOS 27 / macOS 27

Run on a Physical Device (CLI)

Builds, signs, installs, and launches an app on a connected physical device straight from the terminal — no Xcode Run button. The companion run-simulator skill covers the Simulator; this is the hardware path, which uses a different toolchain: devicectl (not simctl), real code signing, and an external tool for screenshots.

Building proves the code typechecks and signs; launching proves it installs and runs on real hardware. A crash on launch or a failed install is a failure.

When This Skill Activates

Use when the user wants to:

  • Run / test their app on a real iPhone or iPad from the CLI
  • Install a build on a device without opening Xcode
  • Reproduce a device-only bug (camera, sensors, performance, push)
  • Screenshot the app running on hardware

Not for the Simulator (use run-simulator) and not for xcodebuild test.

Prerequisites (one-time, partly interactive — cannot be scripted)

  1. Device connected by USB (or paired over Wi-Fi).
  2. Developer Mode ON (iOS 16+): Settings → Privacy & Security → Developer Mode → on → restart. There is no CLI to enable this.
  3. Device trusted/paired: the first connection shows "Trust This Computer?" on the device — tap Trust. devicectl pairs once trusted.
  4. Automatic signing configured: the target needs CODE_SIGN_STYLE = Automatic and a DEVELOPMENT_TEAM, and the signing Apple ID must already be logged into Xcode (Settings → Accounts) so -allowProvisioningUpdates can mint profiles. A free personal team works but apps expire after 7 days.

Confirm reachability before building:

bash
xcrun devicectl list devices

The Identifier column is a CoreDevice UUID (e.g. A1B2C3D4-…). It is used by devicectl for install/launch. It is NOT the value xcodebuild wants — see the trap in step 2. Pick a row whose State is available (paired) / connected.

Process

1. Pick the device identifier
bash
xcrun devicectl list devices    # grab the Identifier (CoreDevice UUID) of the paired device

Store it: DEV=<identifier-from-the-Identifier-column>.

2. Build + sign for a device

Trap: xcodebuild matches on the hardware UDID, not the devicectl identifier. Passing -destination 'platform=iOS,id=<devicectl-id>' fails with "Unable to find a device matching the provided destination specifier." Build for a generic device instead — it produces the same signed .app:

bash
xcodebuild build \
  -project MyApp.xcodeproj -scheme MyApp \
  -destination 'generic/platform=iOS' \
  -allowProvisioningUpdates 2>&1 | tail -5

(Use -workspace MyApp.xcworkspace instead of -project if the project has one.) Look for ** BUILD SUCCEEDED **. -allowProvisioningUpdates lets xcodebuild register the device and create/refresh the provisioning profile automatically.

Common failures:

  • "Signing requires a development team" → set DEVELOPMENT_TEAM=XXXXXXXXXX on the command line, or fix it in project settings.
  • "No profiles for '…' were found" → add -allowProvisioningUpdates (above), and make sure the signing Apple ID is logged into Xcode.
3. Resolve the built .app (device build → Debug-iphoneos)

Don't guess DerivedData — read it from build settings. Note the directory is Debug-iphoneos for device builds (vs Debug-iphonesimulator for the Simulator):

bash
eval $(xcodebuild -project MyApp.xcodeproj -scheme MyApp \
  -destination 'generic/platform=iOS' -showBuildSettings 2>/dev/null \
  | awk -F' = ' '/ TARGET_BUILD_DIR =/{print "DIR=\""$2"\""} / FULL_PRODUCT_NAME =/{print "NAME=\""$2"\""}')
APP="$DIR/$NAME"   # .../Debug-iphoneos/MyApp.app
BID=$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "$APP/Info.plist")
4. Install
bash
xcrun devicectl device install app --device "$DEV" "$APP"

Prints App installed: with the bundleID and installationURL on success.

Show full SKILL.md (332 more words)Show less
5. Launch
bash
xcrun devicectl device process launch --device "$DEV" "$BID"

Prints Launched application with <bundle id> ….

Known quirk: adding --terminate-existing (to relaunch a running app) sometimes returns CoreDeviceError 10004 — "process identifier … could not be determined" even though the app launched. If you see it, run the plain launch above and verify it's actually running:

bash
xcrun devicectl device info processes --device "$DEV" | grep -i MyApp.app

A matching pid /…/MyApp.app line confirms it's live.

6. Screenshot (optional — needs an extra tool)

devicectl has no screenshot command, so device screenshots require libimobiledevice:

bash
brew install libimobiledevice          # one-time
idevicescreenshot /tmp/device-shot.png # captures the foreground screen

Then Read /tmp/device-shot.png and verify the change renders.

Caveats:

  • idevicescreenshot needs the Developer Disk Image mounted. Running the app via devicectl (steps 4–5) mounts it, so screenshot after launching.
  • If multiple devices are attached, target one: idevicescreenshot -u <hardware-udid> … (idevice_id -l lists hardware UDIDs — again, distinct from the devicectl id).
  • On a headless/CI box without Homebrew, this step isn't available; fall back to a manual screenshot on the device.

Output Format

Report:

  • Device used (name + identifier) and that it was paired/available
  • Build result (** BUILD SUCCEEDED ** or the error: lines, then stop)
  • Install result and launch confirmation (pid or the running-process check)
  • If screenshotted: read the image back and state whether it confirms the change
  • Any interactive prerequisite the user must still do (enable Developer Mode, tap Trust, log the Apple ID into Xcode)

Reliability Notes

  • Wrong identifier for xcodebuild → "Unable to find a device matching the destination." Build generic/platform=iOS; use the devicectl id only for install/launch (step 2 trap).
  • -quiet hides success → it suppresses ** BUILD SUCCEEDED **; drop it for the confirming run or grep error:.
  • 10004 on launch → usually a false alarm from --terminate-existing; plain launch + device info processes confirms (step 5).
  • Developer Mode / Trust → cannot be enabled from the CLI; if install fails with a pairing/trust error, have the user complete it on-device once.
  • Profile expiry → free-team builds stop launching after 7 days; rebuild.
  • Wi-Fi devices → devicectl works over the network once paired; the device must be awake and on the same network.
  • Stale install → if behavior looks unchanged, uninstall then reinstall: xcrun devicectl device uninstall app --device "$DEV" "$BID".

© rshankras, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/ios/run-device of rshankras/claude-code-apple-skills.

Open the folder on GitHubat commit 9ffb831

Compare with similar skills

Run Device next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Run Device compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Run Device this skillrshankras/claude-code-apple-skills783—~1.8kAutomated safety check: NotesMIT
Orca iOS Simulator Controlstablyai/orca87k1 repos~584Automated safety check: PassApache-2.0
Apple Crash Log .NET Symbolicationdotnet/skills5.6k1 repos~2.4kAutomated safety check: PassMIT
Update Swiftui APIsAvdLee/SwiftUI-Agent-Skill3.7k—~1.2kAutomated safety check: PassMIT
iOS Simulator Skillconorluddy/ios-simulator-skill1.3k—~5.7kAutomated safety check: PassMIT
Macios Xcode Beta Updatedotnet/macios2.9k—~1.8kAutomated safety check: PassCustom licence

Similar skills

  • iOS Simulator control from inside Orca, with the live device view in Orca's emulator pane. Use when driving a booted Apple Simulator on macOS: taps, gestures…

    87k GitHub starsUsed in 1 repo~584 tokens
    MobileAuto-check passed
  • Official

    Resolves .NET runtime frames in Apple .ips crash logs to function names, source files and line numbers using dSYM symbols, atos and the Microsoft symbol server.

    5.6k GitHub starsUsed in 1 repo~2.4k tokens
    MobileAuto-check passed
  • Update Swiftui APIs

    AvdLee/SwiftUI-Agent-Skill

    Scan Apple's SwiftUI documentation for deprecated APIs and update the SwiftUI Expert Skill with modern replacements.

    3.7k GitHub stars~1.2k tokensUpdated 2 days ago
    MobileAuto-check passed
  • iOS Simulator Skill

    conorluddy/ios-simulator-skill

    29 production-ready scripts for iOS app testing, building, and automation.

    1.3k GitHub stars~5.7k tokensUpdated 2 days ago
    MobileAuto-check passed
  • Official

    Update dotnet/macios to a new Xcode beta and validate it end-to-end.

    2.9k GitHub stars~1.8k tokensUpdated today
    MobileAuto-check passed
  • Odevio

    Odevio/Odevio-CLI

    Take a Flutter project to an iPhone or the App Store with Odevio - build, sign and publish iOS apps from Windows, Linux or macOS with no Mac and no Xcode.

    423 GitHub stars~7.6k tokensUpdated 14 days ago
    MobileAuto-check passed

More from rshankras/claude-code-apple-skills

All 41 skills in this repo
  • Accessibility Generator

    rshankras/claude-code-apple-skills

    Generate accessibility infrastructure for VoiceOver, Dynamic Type, and accessibility features.

    783 GitHub stars~1.4k tokensUpdated 2 mo ago
    Auto-check: notes
  • Animation Patterns

    rshankras/claude-code-apple-skills

    SwiftUI animation patterns including springs, transitions, PhaseAnimator, KeyframeAnimator, SF Symbol effects, scroll-driven effects, mesh gradients, text renderers, and shader effects.

    783 GitHub stars~2.1k tokensUpdated 2 mo ago
    Auto-check passed
  • App Description Writer

    rshankras/claude-code-apple-skills

    Generate compelling App Store descriptions that convert browsers into users.

    783 GitHub stars~1.3k tokensUpdated 2 mo ago
    Auto-check passed
  • App Icon Generator

    rshankras/claude-code-apple-skills

    Generates an app icon for macOS or iOS — a fast CoreGraphics placeholder and/or flat layered source art to finish in Icon Composer (the Liquid Glass / iOS 26+ standard).

    783 GitHub stars~5.1k tokensUpdated 2 mo ago
    Auto-check: notes
  • App Namer

    rshankras/claude-code-apple-skills

    Turn an app idea into validated, App-Store-ready name candidates.

    783 GitHub stars~3.4k tokensUpdated 2 mo ago
    Auto-check passed
  • Bundles And Licensing

    rshankras/claude-code-apple-skills

    Revenue beyond the single-app price tag — own-app bundles, Family Sharing as a conversion lever, cross-developer bundles & suites, and institutional licensing via Group Purchases / Apple School &…

    783 GitHub stars~1.8k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Categories

Questions about Run Device

What does Run Device do?

Build, install, and launch an iOS app on a physical iPhone or iPad entirely from the command line (no Xcode GUI), using xcodebuild + devicectl. Run Device is an agent skill from rshankras/claude-code-apple-skills. Build, install, and launch an iOS app on a physical iPhone or iPad entirely from the command line (no Xcode GUI), using xcodebuild + devicectl.

When should I use Run Device?

Run Device fits situations like: the user wants to run; screenshot their app on a real device without opening Xcode.

How do I install Run Device in Claude Code?

Run `npx skills add rshankras/claude-code-apple-skills --skill run-device -a claude-code`. Or copy the skill folder (skills/ios/run-device in rshankras/claude-code-apple-skills) into .claude/skills/run-device in your project. Claude Code loads it when a task matches its description.

How do I install Run Device in Codex?

Run `npx skills add rshankras/claude-code-apple-skills --skill run-device -a codex`. Or copy the skill folder (skills/ios/run-device in rshankras/claude-code-apple-skills) into .agents/skills/run-device in your project. Codex loads it when a task matches its description.

Can I use Run Device in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rshankras/claude-code-apple-skills --skill run-device -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/run-device, .gemini/skills/run-device, .github/skills/run-device and .opencode/skills/run-device in your project.

What does Run Device need to run?

Going by SKILL.md and its folder, Run Device needs the command-line tools its instructions call (xcrun, xcodebuild and brew). Its frontmatter pre-approves these tools: Bash, Read.

Does Run Device access the network?

SKILL.md names 1 domain. As links in the text: libimobiledevice.org. This is read from the text; nothing was executed.

Is Run Device safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Run Device use?

Run Device is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Run Device use?

About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Run Device?

Skills that share tags, products or a category with Run Device: Orca iOS Simulator Control (stablyai/orca, 87k stars), Apple Crash Log .NET Symbolication (dotnet/skills, 5.6k stars), Update Swiftui APIs (AvdLee/SwiftUI-Agent-Skill, 3.7k stars) and iOS Simulator Skill (conorluddy/ios-simulator-skill, 1.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Run Device?

rshankras (a GitHub user) maintains it in rshankras/claude-code-apple-skills, which has 783 GitHub stars. The repository holds 41 skills in this directory. The repository was last updated on July 24, 2026.

Source: rshankras/claude-code-apple-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.