test-xcode
Automates iOS simulator testing and log capture to verify app behavior and performance.
Install
mkdir -p .claude/skills/test-xcode && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14919" && unzip -o skill.zip -d .claude/skills/test-xcode && rm skill.zipInstalls to .claude/skills/test-xcode
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Build and test iOS apps on simulator using XcodeBuildMCPKey capabilities
- →Discover available Xcode projects and schemes
- →Boot and manage iOS simulators
- →Build iOS simulator applications
- →Install and launch apps on a simulator
- →Capture screenshots and console logs during testing
- →Handle build failures and test failures
How it works
The skill uses XcodeBuildMCP to automate the process of building, installing, and launching iOS apps on a simulator. It captures visual and log evidence, and can pause for human verification during specific interactive flows.
Inputs & outputs
When to use test-xcode
- →Building apps for the simulator
- →Capturing screenshots of app screens
- →Verifying console logs for errors
About this skill
Arguments
[scheme name or 'current' to use default]
Xcode Test Command
<command_purpose>Build, install, and test iOS apps on the simulator using XcodeBuildMCP. Captures screenshots, logs, and verifies app behavior.</command_purpose>
Introduction
<role>iOS QA Engineer specializing in simulator-based testing</role>
This command tests iOS/macOS apps by:
- Building for simulator
- Installing and launching the app
- Taking screenshots of key screens
- Capturing console logs for errors
- Supporting human verification for external flows
Prerequisites
<requirements> - Xcode installed with command-line tools - XcodeBuildMCP server connected - Valid Xcode project or workspace - At least one iOS Simulator available </requirements>Main Tasks
0. Verify XcodeBuildMCP is Installed
<check_mcp_installed>
First, check if XcodeBuildMCP tools are available.
Try calling:
mcp__xcodebuildmcp__list_simulators({})
If the tool is not found or errors:
Tell the user:
**XcodeBuildMCP not installed**
Please install the XcodeBuildMCP server first:
\`\`\`bash
claude mcp add XcodeBuildMCP -- npx xcodebuildmcp@latest
\`\`\`
Then restart Claude Code and run `/xcode-test` again.
Do NOT proceed until XcodeBuildMCP is confirmed working.
</check_mcp_installed>
1. Discover Project and Scheme
<discover_project>
Find available projects:
mcp__xcodebuildmcp__discover_projs({})
List schemes for the project:
mcp__xcodebuildmcp__list_schemes({ project_path: "/path/to/Project.xcodeproj" })
If argument provided:
- Use the specified scheme name
- Or "current" to use the default/last-used scheme
</discover_project>
2. Boot Simulator
<boot_simulator>
List available simulators:
mcp__xcodebuildmcp__list_simulators({})
Boot preferred simulator (iPhone 15 Pro recommended):
mcp__xcodebuildmcp__boot_simulator({ simulator_id: "[uuid]" })
Wait for simulator to be ready: Check simulator state before proceeding with installation.
</boot_simulator>
3. Build the App
<build_app>
Build for iOS Simulator:
mcp__xcodebuildmcp__build_ios_sim_app({
project_path: "/path/to/Project.xcodeproj",
scheme: "[scheme_name]"
})
Handle build failures:
- Capture build errors
- Create P1 todo for each build error
- Report to user with specific error details
On success:
- Note the built app path for installation
- Proceed to installation step
</build_app>
4. Install and Launch
<install_launch>
Install app on simulator:
mcp__xcodebuildmcp__install_app_on_simulator({
app_path: "/path/to/built/App.app",
simulator_id: "[uuid]"
})
Launch the app:
mcp__xcodebuildmcp__launch_app_on_simulator({
bundle_id: "[app.bundle.id]",
simulator_id: "[uuid]"
})
Start capturing logs:
mcp__xcodebuildmcp__capture_sim_logs({
simulator_id: "[uuid]",
bundle_id: "[app.bundle.id]"
})
</install_launch>
5. Test Key Screens
<test_screens>
For each key screen in the app:
Take screenshot:
mcp__xcodebuildmcp__take_screenshot({
simulator_id: "[uuid]",
filename: "screen-[name].png"
})
Review screenshot for:
- UI elements rendered correctly
- No error messages visible
- Expected content displayed
- Layout looks correct
Check logs for errors:
mcp__xcodebuildmcp__get_sim_logs({ simulator_id: "[uuid]" })
Look for:
- Crashes
- Exceptions
- Error-level log messages
- Failed network requests
</test_screens>
6. Human Verification (When Required)
<human_verification>
Pause for human input when testing touches:
| Flow Type | What to Ask |
|---|---|
| Sign in with Apple | "Please complete Sign in with Apple on the simulator" |
| Push notifications | "Send a test push and confirm it appears" |
| In-app purchases | "Complete a sandbox purchase" |
| Camera/Photos | "Grant permissions and verify camera works" |
| Location | "Allow location access and verify map updates" |
Use AskUserQuestion:
**Human Verification Needed**
This test requires [flow type]. Please:
1. [Action to take on simulator]
2. [What to verify]
Did it work correctly?
1. Yes - continue testing
2. No - describe the issue
</human_verification>
7. Handle Failures
<failure_handling>
When a test fails:
-
Document the failure:
- Take screenshot of error state
- Capture console logs
- Note reproduction steps
-
Ask user how to proceed:
**Test Failed: [screen/feature]** Issue: [description] Logs: [relevant error messages] How to proceed? 1. Fix now - I'll help debug and fix 2. Create todo - Add to todos/ for later 3. Skip - Continue testing other screens -
If "Fix now":
- Investigate the issue in code
- Propose a fix
- Rebuild and retest
-
If "Create todo":
- Create
{id}-pending-p1-xcode-{description}.md - Continue testing
- Create
</failure_handling>
8. Test Summary
<test_summary>
After all tests complete, present summary:
## 📱 Xcode Test Results
**Project:** [project name]
**Scheme:** [scheme name]
**Simulator:** [simulator name]
### Build: ✅ Success / ❌ Failed
### Screens Tested: [count]
| Screen | Status | Notes |
|--------|--------|-------|
| Launch | ✅ Pass | |
| Home | ✅ Pass | |
| Settings | ❌ Fail | Crash on tap |
| Profile | ⏭️ Skip | Requires login |
### Console Errors: [count]
- [List any errors found]
### Human Verifications: [count]
- Sign in with Apple: ✅ Confirmed
- Push notifications: ✅ Confirmed
### Failures: [count]
- Settings screen - crash on navigation
### Created Todos: [count]
- `006-pending-p1-xcode-settings-crash.md`
### Result: [PASS / FAIL / PARTIAL]
</test_summary>
9. Cleanup
<cleanup>After testing:
Stop log capture:
mcp__xcodebuildmcp__stop_log_capture({ simulator_id: "[uuid]" })
Optionally shut down simulator:
mcp__xcodebuildmcp__shutdown_simulator({ simulator_id: "[uuid]" })
</cleanup>
Quick Usage Examples
# Test with default scheme
/xcode-test
# Test specific scheme
/xcode-test MyApp-Debug
# Test after making changes
/xcode-test current
Integration with /ce-review
When reviewing PRs that touch iOS code, the /ce-review command can spawn this as a subagent:
Use the general-purpose skill to: "Run /xcode-test for scheme [name]. Build, install on simulator, test key screens, check for crashes."
When not to use it
- →When testing on physical iOS devices
- →When XcodeBuildMCP server is not installed or configured
Prerequisites
Limitations
- →Limited to iOS simulator-based testing
- →Requires XcodeBuildMCP server
- →Human verification is needed for certain interactive flows
How it compares
This skill automates the entire build, deploy, and test cycle on an iOS simulator, including capturing evidence and handling interactive flows, which is more efficient than performing these steps manually through Xcode or command-line tools
Compared to similar skills
test-xcode side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| test-xcode (this skill) | 0 | 5mo | Review | Intermediate |
| ios-simulator-skill | 27 | 2mo | Review | Advanced |
| claude-mobile-ios-testing | 18 | 9mo | No flags | Intermediate |
| build-iphone-apps | 14 | 8mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by JimmyChen-NXP
View all by JimmyChen-NXP →You might also like
ios-simulator-skill
conorluddy
21 production-ready scripts for iOS app testing, building, and automation. Provides semantic UI navigation, build automation, accessibility testing, and simulator lifecycle management. Optimized for AI agents with minimal token output.
claude-mobile-ios-testing
krzemienski
Use when testing iOS apps on simulator, capturing screenshots for validation gates, automating UI testing with expo-mcp and xc-mcp, or verifying visual correctness - combines expo-mcp autonomous testing (React Native level) with xc-mcp simulator management (iOS level)
build-iphone-apps
glittercowboy
Build professional native iPhone apps in Swift with SwiftUI and UIKit. Full lifecycle - build, debug, test, optimize, ship. CLI-only, no Xcode. Targets iOS 26 with iOS 18 compatibility.
xcodebuildmcp
cameroncooke
Official skill for XcodeBuildMCP. Use when doing iOS/macOS/watchOS/tvOS/visionOS work (build, test, run, debug, log, UI automation).
flutter
alinaqi
Flutter development with Riverpod state management, Freezed, go_router, and mocktail testing
android-kotlin
alinaqi
Android Kotlin development with Coroutines, Jetpack Compose, Hilt, and MockK testing