skills/xcode/SKILL.md
Use when the user mentions Xcode, xcodebuild, Swift packages, Apple simulators, iOS/macOS app builds, or Apple-platform tests.
npx skillsauth add bjesuiter/skills xcodeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Build, test, run, and manage Xcode projects and Swift packages via the XcodeBuildMCP server.
All tools are called via mcporter using the XcodeBuildMCP server:
bunx mcporter call --stdio "xcodebuildmcp" <tool_name> [args...]
Assumes mcporter and xcodebuildmcp are installed globally; bunx runs the installed binaries and does not fetch them.
Before using most build/test tools, you MUST set session defaults:
bunx mcporter call --stdio "xcodebuildmcp" session-set-defaults \
projectPath="/path/to/Project.xcodeproj" \
scheme="MyApp" \
simulatorName="iPhone 16"
Or for a workspace:
bunx mcporter call --stdio "xcodebuildmcp" session-set-defaults \
workspacePath="/path/to/Project.xcworkspace" \
scheme="MyApp" \
simulatorId="DEVICE_UDID"
Check current defaults:
bunx mcporter call --stdio "xcodebuildmcp" session-show-defaults
Clear defaults:
bunx mcporter call --stdio "xcodebuildmcp" session-clear-defaults all=true
bunx mcporter call --stdio "xcodebuildmcp" discover_projs workspaceRoot="$(pwd)"
bunx mcporter call --stdio "xcodebuildmcp" list_schemes
bunx mcporter call --stdio "xcodebuildmcp" doctor
bunx mcporter call --stdio "xcodebuildmcp" list_sims
bunx mcporter call --stdio "xcodebuildmcp" boot_sim
bunx mcporter call --stdio "xcodebuildmcp" open_sim
bunx mcporter call --stdio "xcodebuildmcp" build_sim
bunx mcporter call --stdio "xcodebuildmcp" build_run_sim
bunx mcporter call --stdio "xcodebuildmcp" test_sim
bunx mcporter call --stdio "xcodebuildmcp" get_sim_app_path platform="iOS Simulator"
bunx mcporter call --stdio "xcodebuildmcp" install_app_sim appPath="/path/to/App.app"
bunx mcporter call --stdio "xcodebuildmcp" launch_app_sim bundleId="com.example.MyApp"
bunx mcporter call --stdio "xcodebuildmcp" stop_app_sim bundleId="com.example.MyApp"
bunx mcporter call --stdio "xcodebuildmcp" screenshot
Gets precise frame coordinates for all visible elements - USE THIS before any UI interactions:
bunx mcporter call --stdio "xcodebuildmcp" describe_ui
# Tap by coordinates (use describe_ui first to get coordinates)
bunx mcporter call --stdio "xcodebuildmcp" tap x=100 y=200
# Tap by accessibility ID
bunx mcporter call --stdio "xcodebuildmcp" tap id="myButton"
# Tap by label
bunx mcporter call --stdio "xcodebuildmcp" tap label="Submit"
bunx mcporter call --stdio "xcodebuildmcp" long_press x=100 y=200 duration=1000
bunx mcporter call --stdio "xcodebuildmcp" swipe x1=100 y1=400 x2=100 y2=100
bunx mcporter call --stdio "xcodebuildmcp" gesture preset="scroll-down"
# Presets: scroll-up, scroll-down, scroll-left, scroll-right,
# swipe-from-left-edge, swipe-from-right-edge,
# swipe-from-top-edge, swipe-from-bottom-edge
bunx mcporter call --stdio "xcodebuildmcp" type_text text="Hello World"
bunx mcporter call --stdio "xcodebuildmcp" button buttonType="home"
# Types: apple-pay, home, lock, side-button, siri
bunx mcporter call --stdio "xcodebuildmcp" key_press keyCode=40 # Return key
# Common: 40=Return, 42=Backspace, 43=Tab, 44=Space
bunx mcporter call --stdio "xcodebuildmcp" set_sim_appearance mode="dark"
bunx mcporter call --stdio "xcodebuildmcp" set_sim_location latitude=37.7749 longitude=-122.4194
bunx mcporter call --stdio "xcodebuildmcp" reset_sim_location
bunx mcporter call --stdio "xcodebuildmcp" sim_statusbar dataNetwork="5g"
# Options: clear, hide, wifi, 3g, 4g, lte, lte-a, lte+, 5g, 5g+, 5g-uwb, 5g-uc
bunx mcporter call --stdio "xcodebuildmcp" erase_sims shutdownFirst=true
bunx mcporter call --stdio "xcodebuildmcp" start_sim_log_cap bundleId="com.example.MyApp"
# Returns a logSessionId
bunx mcporter call --stdio "xcodebuildmcp" stop_sim_log_cap logSessionId="SESSION_ID"
bunx mcporter call --stdio "xcodebuildmcp" record_sim_video start=true
bunx mcporter call --stdio "xcodebuildmcp" record_sim_video stop=true outputFile="/path/to/output.mp4"
bunx mcporter call --stdio "xcodebuildmcp" list_devices
bunx mcporter call --stdio "xcodebuildmcp" build_device
bunx mcporter call --stdio "xcodebuildmcp" test_device
bunx mcporter call --stdio "xcodebuildmcp" install_app_device appPath="/path/to/App.app"
bunx mcporter call --stdio "xcodebuildmcp" launch_app_device bundleId="com.example.MyApp"
bunx mcporter call --stdio "xcodebuildmcp" stop_app_device processId=12345
# Start
bunx mcporter call --stdio "xcodebuildmcp" start_device_log_cap bundleId="com.example.MyApp"
# Stop
bunx mcporter call --stdio "xcodebuildmcp" stop_device_log_cap logSessionId="SESSION_ID"
bunx mcporter call --stdio "xcodebuildmcp" build_macos
bunx mcporter call --stdio "xcodebuildmcp" build_run_macos
bunx mcporter call --stdio "xcodebuildmcp" test_macos
bunx mcporter call --stdio "xcodebuildmcp" get_mac_app_path
bunx mcporter call --stdio "xcodebuildmcp" launch_mac_app appPath="/path/to/App.app"
bunx mcporter call --stdio "xcodebuildmcp" stop_mac_app appName="MyApp"
bunx mcporter call --stdio "xcodebuildmcp" swift_package_build packagePath="$(pwd)"
bunx mcporter call --stdio "xcodebuildmcp" swift_package_test packagePath="$(pwd)"
bunx mcporter call --stdio "xcodebuildmcp" swift_package_run packagePath="$(pwd)"
bunx mcporter call --stdio "xcodebuildmcp" swift_package_clean packagePath="$(pwd)"
bunx mcporter call --stdio "xcodebuildmcp" swift_package_list
bunx mcporter call --stdio "xcodebuildmcp" swift_package_stop pid=12345
bunx mcporter call --stdio "xcodebuildmcp" scaffold_ios_project \
projectName="MyApp" \
outputPath="$(pwd)" \
bundleIdentifier="com.example.myapp"
bunx mcporter call --stdio "xcodebuildmcp" scaffold_macos_project \
projectName="MyMacApp" \
outputPath="$(pwd)" \
bundleIdentifier="com.example.mymacapp"
bunx mcporter call --stdio "xcodebuildmcp" clean
bunx mcporter call --stdio "xcodebuildmcp" show_build_settings
bunx mcporter call --stdio "xcodebuildmcp" get_app_bundle_id appPath="/path/to/App.app"
# 1. Discover projects
bunx mcporter call --stdio "xcodebuildmcp" discover_projs workspaceRoot="$(pwd)"
# 2. List simulators
bunx mcporter call --stdio "xcodebuildmcp" list_sims
# 3. Set session defaults
bunx mcporter call --stdio "xcodebuildmcp" session-set-defaults \
projectPath="$(pwd)/MyApp.xcodeproj" \
scheme="MyApp" \
simulatorName="iPhone 16"
# 4. Build and run
bunx mcporter call --stdio "xcodebuildmcp" build_run_sim
# 5. Run tests
bunx mcporter call --stdio "xcodebuildmcp" test_sim
# 1. Build and launch app
bunx mcporter call --stdio "xcodebuildmcp" build_run_sim
# 2. Get UI hierarchy (ALWAYS do this before interacting)
bunx mcporter call --stdio "xcodebuildmcp" describe_ui
# 3. Take screenshot for visual reference
bunx mcporter call --stdio "xcodebuildmcp" screenshot
# 4. Interact with elements using coordinates from describe_ui
bunx mcporter call --stdio "xcodebuildmcp" tap x=187 y=423
# 5. Type text
bunx mcporter call --stdio "xcodebuildmcp" type_text text="[email protected]"
| Error | Cause | Solution |
|-------|-------|----------|
| No project/workspace set | Session defaults not configured | Run session-set-defaults first |
| Simulator not found | Invalid simulator name | Run list_sims to get valid names |
| Build failed | Code errors or config issues | Check build output, run doctor |
| App not installed | Build didn't complete | Run build_sim before launch_app_sim |
doctor if tools aren't workingtesting
Use when the user mentions Clawpatch/clawpatch.ai, semantic feature review, repo-wide AI audit, persistent findings, or clawpatch init/map/review/report/fix/revalidate.
development
Use when the user asks for autoreview, Codex/Claude second-model review, or final review of dirty changes, a branch, commit, or PR before ship.
testing
Use when the user asks to cut, prepare, publish, tag, or verify a release, especially npm/package releases.
tools
Use when adding, writing, fixing, or exposing a script for the Tuna macOS launcher.