Agent skill

Spec Test Xcode

by leo-kuang-ai in leo-kuang-ai/spec-first

Build and test iOS apps on simulator using XcodeBuildMCP. An agent skill from leo-kuang-ai/spec-first.

MITAuto-check passedMobile

Install Spec Test Xcode

skills CLI
$ npx skills add leo-kuang-ai/spec-first --skill spec-test-xcode -a claude-code

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

GitHub CLI
$ gh skill install leo-kuang-ai/spec-first spec-test-xcode --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/leo-kuang-ai/spec-first.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/spec-test-xcode .claude/skills/spec-test-xcode && 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
spec-test-xcode
GitHub stars
107
Token cost
~2.3k tokens
SKILL.md length
859 words
Files
3
Skills in repo
35
Repo updated
First seen
Licence
MIT

At a glance

Build and test iOS apps on simulator using XcodeBuildMCP. An agent skill from leo-kuang-ai/spec-first.

  • Works in 10 steps: Verify XcodeBuildMCP is Available → Discover Project and Scheme → Boot Simulator → …
  • Tasks that involve iOS development
  • SKILL.md covers Prerequisites, Workflow, Quick Usage Examples and Invocation Boundary
  • Calls brew, npx and xcrun

What it does

Spec Test Xcode is an agent skill from leo-kuang-ai/spec-first. Build and test iOS apps on simulator using XcodeBuildMCP. Use after making iOS code changes, before creating a PR, or when verifying app behavior and checking for crashes on simulator.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files (for example `evals/cases/mcp-unavailable-stops.yaml` and `evals/eval.yaml`).

It sits in Mobile, covering iOS development. It works with Xcode, iOS and Model Context Protocol. The repository describes itself as: 仓库原生 AI Coding Harness —— 把一次性 AI 对话变成可治理、可验证、可沉淀的工程闭环 · spec-first.cn. The licence is MIT.

When your agent uses it

  • Tasks that involve iOS development

Example prompts

  • “/spec-test-xcode”

Requirements

  • Node.js

Workflow steps

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

  1. Verify XcodeBuildMCP is Available
  2. Discover Project and Scheme
  3. Boot Simulator
  4. Build the App
  5. Install and Launch
  6. Test Key Screens
  7. Human Verification (When Required)
  8. Handle Failures
  9. Test Summary
  10. Cleanup

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • brew
    • npx
    • xcrun

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

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    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

Spec Test Xcode loads about 2.3k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 859 words of instructions outside code blocks.

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

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 passed

The automated check found no risky patterns in SKILL.md.

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 leo-kuang-ai/spec-first at commit 74655dc, republished under its MIT licence (© leo-kuang-ai). 859 words, ~2,258 tokens.

Download SKILL.mdSave it as .claude/skills/spec-test-xcode/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
spec-test-xcode
description
Build and test iOS apps on simulator using XcodeBuildMCP. Use after making iOS code changes, before creating a PR, or when verifying app behavior and checking for crashes on simulator.
argument-hint
[scheme name or 'current' to use default]
disable-model-invocation
true

Xcode Test Skill

Build, install, and test iOS apps on the simulator using XcodeBuildMCP. Captures screenshots, logs, and verifies app behavior.

Prerequisites

  • Xcode installed with command-line tools
  • XcodeBuildMCP MCP server connected
  • Valid Xcode project or workspace
  • At least one iOS Simulator available

Workflow

0. Verify XcodeBuildMCP is Available

Check that the XcodeBuildMCP MCP server is connected by calling its list_simulators tool.

MCP tool names vary by platform:

  • Claude Code: mcp__xcodebuildmcp__list_simulators
  • Other platforms: use the equivalent MCP tool call for the XcodeBuildMCP server's list_simulators method

If the tool is not found or errors, inform the user they need to add the XcodeBuildMCP MCP server:

XcodeBuildMCP not installed

Install via Homebrew:
  brew tap getsentry/xcodebuildmcp && brew install xcodebuildmcp

Or via npx (no global install needed):
  npx -y xcodebuildmcp@latest mcp

Then add "XcodeBuildMCP" as an MCP server in your agent configuration
and restart your agent.

Do NOT proceed until XcodeBuildMCP is confirmed working.

MCP readiness 只证明 provider 能响应 capability probe;它不证明目标 App 已完成 build、install、launch,或渲染了任何被测 screen。

1. Discover Project and Scheme

Call XcodeBuildMCP's discover_projs tool to find available projects, then list_schemes with the project path to get available schemes.

If an argument was provided, use that scheme name. If "current", use the default/last-used scheme.

第一次 build 前,记录目标 project/workspace path、scheme、所选 simulator identity,以及当前可获得的最佳 source identity。优先记录 Git revision 与 dirty-state/fingerprint context;目标不是 Git worktree 或无法捕获 fingerprint 时,必须将其保留为显式 source-binding limitation,不得让该字段隐式缺失。

2. Boot Simulator

Call list_simulators to find available simulators. Boot the preferred simulator (iPhone 15 Pro recommended) using boot_simulator with the simulator's UUID.

Wait for the simulator to be ready before proceeding.

3. Build the App

Call build_ios_sim_app with the project path and scheme name.

On failure:

  • Capture build errors
  • Report to user with specific error details

On success:

  • Note the built app path for installation
  • Proceed to step 4
4. Install and Launch
  1. Call install_app_on_simulator with the built app path and simulator UUID
  2. Call launch_app_on_simulator with the bundle ID and simulator UUID
  3. Call capture_sim_logs with the simulator UUID and bundle ID to start log capture
5. Test Key Screens

For each key screen in the app:

Take screenshot: Call take_screenshot with the simulator UUID and a descriptive filename (e.g., screen-home.png).

Review screenshot for:

  • UI elements rendered correctly
  • No error messages visible
  • Expected content displayed
  • Layout looks correct

Check logs for errors: Call get_sim_logs with the simulator UUID. Look for:

  • Crashes
  • Exceptions
  • Error-level log messages
  • Failed network requests

Known automation limitation — SwiftUI Text links: Simulated taps (via XcodeBuildMCP or any simulator automation tool) do not trigger gesture recognizers on SwiftUI Text views with inline AttributedString links. Taps report success but have no effect. This is a platform limitation — inline links are not exposed as separate elements in the accessibility tree. When a tap on a Text link has no visible effect, prompt the user to tap manually in the simulator.

xcrun simctl openurl <device> <URL> is an effect-bearing fallback, not an automatic tap substitute. Parse the exact target before execution: reject file:, data:, and javascript: URLs; allow credential-free loopback HTTP(S) only after displaying the resolved URL; and require the run-local fact url_open_authorization: authorized | missing for external HTTP(S) or custom app schemes. Show the exact target, scheme, expected network/app-state effect, and device before asking. Missing authority returns url_open_authorization_missing with zero simctl openurl calls. Permission to build/test, simulator selection, a visible link, or a known URL does not imply this authority.

Show full SKILL.md (374 more words)Show less
6. Human Verification (When Required)

Pause for human input when testing touches flows that require device interaction.

Flow TypeWhat 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"
SwiftUI Text links"Please tap on [element description] manually — automated taps cannot trigger inline text links"

Ask the user using the platform's blocking question tool: AskUserQuestion in Claude Code (call ToolSearch with select:AskUserQuestion first if its schema isn't loaded) or request_user_input in Codex. Fall back to numbered options in chat only when no blocking tool exists in the harness or the call errors (e.g., Codex edit modes) — not because a schema load is required. Never silently skip the question:

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
7. Handle Failures

When a test fails:

  1. Document the failure:

    • Take screenshot of error state
    • Capture console logs
    • Note reproduction steps
  2. Ask the user how to proceed:

    Test Failed: [screen/feature]
    
    Issue: [description]
    Logs: [relevant error messages]
    
    How to proceed?
    1. Fix now - debug, propose a fix, rebuild and retest
    2. Skip - continue testing other screens
  3. If "Fix now": investigate, propose a fix, rebuild and retest。发生 behavior-bearing source mutation 后,在下一次 rebuild 前刷新 build-source identity,并以新 identity 取代旧 build identity

  4. If "Skip": log as skipped, continue

8. Test Summary

After all tests complete, present a summary:

markdown
## Xcode Test Results

**Project:** [project name]
**Scheme:** [scheme name]
**Simulator:** [simulator name]
**Provider:** XcodeBuildMCP [可用时填写 server/tool identity]
**Target identity:** [project/workspace path、scheme、simulator UUID、bundle ID]
**Source binding:** [Git revision 加 clean/dirty state、caller fingerprint,或显式 unavailable limitation]
**Evidence authority:** [provider-confirmed / transcribed / mixed]
**Freshness:** [build 开始时间、final tested action 完成时间、最近一次 pre-build identity 与最终 identity 的比较结果]
**Limitations:** [manual-only flows、skipped screens、missing logs、provider/tool gaps]
**Claim ceiling:** [observed build/run/screens 能直接支持的精确范围]

### 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

### Result: [PASS / FAIL / PARTIAL]

只有真实调用 XcodeBuildMCP tool 并取得返回结果时,才能使用 provider-confirmed。人工观察和 caller 提供的 command output 保持为 transcribed,除非它们自身带有可验证的 provider/process receipt。

在最后一次 build/retest 以及全部 final tested actions 完成后,重新捕获与最近一次 pre-build identity 同口径的 revision 与 working-tree fingerprint,并比较两者。只有 comparison 一致时,summary 才能标记 source-bound;comparison 不一致或无法重新捕获时,必须记录 limitation、禁止 source-bound,并将结果降为 PARTIAL/degraded。caller 需要最终树证据时,必须对新 identity 重新 build/retest。只有 revision 而没有 dirty-state 或 fingerprint context 属于显式 limitation,不能证明完整 working tree。

PARTIAL 必须列出 limitation,不得改写成 PASS。Provider readiness、successful build、App launch、screenshot capture、log inspection 与 human verification 是彼此分离的 observations;只能报告实际完成的阶段。

本 Skill 向 caller 返回 bounded evidence,不创建平行的 EVIDENCE.md 或 shared evidence artifact。只有存在真实 canonical command identity,且 caller 保留 provider、target、source binding、freshness 与 limitations 时,才能在自己的 run summary 中引用结果;否则将其作为 verification-run-summary.v1 之外的 provider evidence,并降低 claim。

9. Cleanup

After testing:

  1. Call stop_log_capture with the simulator UUID
  2. Optionally call shutdown_simulator with the simulator UUID

Quick Usage Examples

bash
# Test with default scheme
spec-test-xcode

# Test specific scheme
spec-test-xcode MyApp-Debug

# Test after making changes
spec-test-xcode current

Invocation Boundary

本 skill 仅由用户显式调用。当前没有 spec-code-review 或其他 public workflow 的自动 caller;代码审查中的 Swift 静态 lens 不等于 Simulator 构建与运行验证。

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

Files

SKILL.md and 2 other files in skills/spec-test-xcode of leo-kuang-ai/spec-first.

  • SKILL.md
  • evals/cases/mcp-unavailable-stops.yaml
  • evals/eval.yaml

Open the folder on GitHubat commit 74655dc

Compare with similar skills

Spec Test Xcode 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.

Spec Test Xcode compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Spec Test Xcode this skillleo-kuang-ai/spec-first107—~2.3kAutomated 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
Inspector MCPipedro/Inspector170—~3.4kAutomated safety check: PassMIT
Xcode Buildpzep1/xcode-build-skill138—~1.5kAutomated safety check: NotesMIT
Dt Setup iOSDynatrace/dynatrace-for-ai162—~3.3kAutomated safety check: PassApache-2.0

Similar skills

  • 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 3 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 3 days ago
    MobileAuto-check passed
  • Inspector MCP

    ipedro/Inspector

    A skill your agent uses when an agent needs to inspect a live iOS app through the Inspector MCP bridge, register or troubleshoot InspectorMCPServer for a consumer Xcode project, or query, resolve…

    170 GitHub stars~3.4k tokensUpdated 5 mo ago
    MobileAuto-check passed
  • Xcode Build

    pzep1/xcode-build-skill

    Build and run iOS/macOS apps using xcodebuild and xcrun simctl directly.

    138 GitHub stars~1.5k tokensUpdated 8 mo ago
    MobileAuto-check: notes
  • Dt Setup iOS

    Dynatrace/dynatrace-for-ai

    Set up the Dynatrace iOS SDK (OneAgent) in an iOS project using Swift Package Manager.

    162 GitHub stars~3.3k tokensUpdated 8 days ago
    MobileAuto-check passed
  • Inspector MCP Consumer

    ipedro/Inspector

    A skill your agent uses when an agent needs to patch a consumer iOS app so it exposes the Inspector MCP bridge, add or verify the app-side Inspector startup configuration, or choose the correct…

    170 GitHub stars~926 tokensUpdated 5 mo ago
    MobileAuto-check passed

More from leo-kuang-ai/spec-first

All 35 skills in this repo
  • Spec App Consistency Audit

    leo-kuang-ai/spec-first

    Audit mobile App PRD/Figma/local-source consistency across page routes, KMP/Clean Architecture, components, analytics, i18n, engineering quality, and industry lenses before runtime validation; use…

    107 GitHub stars~4.6k tokensUpdated yesterday
    Auto-check passed
  • Spec Handoff

    leo-kuang-ai/spec-first

    Create a durable cross-session handoff or resume from a user-selected continuity source.

    107 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Spec Pov

    leo-kuang-ai/spec-first

    Give a decisive, project-grounded verdict on an external input — judged against the current project, not in the abstract.

    107 GitHub stars~4.5k tokensUpdated yesterday
    Auto-check passed
  • Spec Resolve PR Feedback

    leo-kuang-ai/spec-first

    Resolve PR review feedback by evaluating validity and fixing issues with conflict-aware resolver dispatch.

    107 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check: notes
  • Spec Riffrec Feedback Analysis

    leo-kuang-ai/spec-first

    Analyze explicit Riffrec product-feedback captures, including riffrec-.zip, the Riffrec session.json + events.json + recording.webm + voice.webm bundle, or media/notes the user identifies as a…

    107 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Spec Compound

    leo-kuang-ai/spec-first

    Document a recently solved problem or durable project vocabulary in docs/solutions/ or CONCEPTS.md.

    107 GitHub stars~18k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Spec Test Xcode

What does Spec Test Xcode do?

Build and test iOS apps on simulator using XcodeBuildMCP. An agent skill from leo-kuang-ai/spec-first. Spec Test Xcode is an agent skill from leo-kuang-ai/spec-first. Build and test iOS apps on simulator using XcodeBuildMCP.

When should I use Spec Test Xcode?

Spec Test Xcode fits situations like: tasks that involve iOS development.

How do I install Spec Test Xcode in Claude Code?

Run `npx skills add leo-kuang-ai/spec-first --skill spec-test-xcode -a claude-code`. Or copy the skill folder (skills/spec-test-xcode in leo-kuang-ai/spec-first) into .claude/skills/spec-test-xcode in your project. Claude Code loads it when a task matches its description.

How do I install Spec Test Xcode in Codex?

Run `npx skills add leo-kuang-ai/spec-first --skill spec-test-xcode -a codex`. Or copy the skill folder (skills/spec-test-xcode in leo-kuang-ai/spec-first) into .agents/skills/spec-test-xcode in your project. Codex loads it when a task matches its description.

Can I use Spec Test Xcode 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 leo-kuang-ai/spec-first --skill spec-test-xcode -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/spec-test-xcode, .gemini/skills/spec-test-xcode, .github/skills/spec-test-xcode and .opencode/skills/spec-test-xcode in your project.

What does Spec Test Xcode need to run?

Going by SKILL.md and its folder, Spec Test Xcode needs the command-line tools its instructions call (brew, npx and xcrun). Our summary lists: Node.js.

Does Spec Test Xcode access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Spec Test Xcode safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Spec Test Xcode use?

Spec Test Xcode 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 Spec Test Xcode use?

About 2.3k tokens (SKILL.md is roughly 9k 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 Spec Test Xcode?

Skills that share tags, products or a category with Spec Test Xcode: Update Swiftui APIs (AvdLee/SwiftUI-Agent-Skill, 3.7k stars), iOS Simulator Skill (conorluddy/ios-simulator-skill, 1.3k stars), Inspector MCP (ipedro/Inspector, 170 stars) and Xcode Build (pzep1/xcode-build-skill, 138 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Spec Test Xcode?

leo-kuang-ai (a GitHub user) maintains it in leo-kuang-ai/spec-first, which has 107 GitHub stars. The repository holds 35 skills in this directory. The repository was last updated on October 8, 2026.

Source: leo-kuang-ai/spec-first on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.