xcode-dev-loop
БесплатноБез исполняемых скриптовНе проверенWHEN building, testing, or visually verifying an Xcode project from the command line — xcodebuild runs, Swift Testing result reading, simulator…
от mintuz★ 38 звёзд на GitHubОб этом скилле
Xcode Dev Loop
Discover, build in the background, read results, launch on a simulator, capture screens.
This loop runs and inspects; it does not author Swift source or tests. Route
Swift Testing authoring to swift-testing, XCTest UI automation to xcuitest,
and existing non-UI XCTest unit/integration or measure tests to the project's
established XCTest conventions with tdd. A dedicated reusable non-UI XCTest
authoring guide remains a gap. Preserve the suite's framework rather than forcing
a migration. Return here to execute and interpret the real result.
1. Discover Before You Guess
- Find the container first: list the checkout for a
.xcworkspaceor.xcodeproj. - List the schemes of a workspace with
xcodebuild -list -workspace <name>.xcworkspace. - List the targets, build configurations, and schemes of a project with
xcodebuild -list -project <name>.xcodeproj(use this form when you need a target name). - Build and test with the container flag you listed with, and always name the scheme:
xcodebuild test -workspace <name>.xcworkspace -scheme <Scheme>. Thetestaction fails without a scheme. - List simulator UDIDs with
xcrun simctl list devices available -j; resolve the UDID once, then reuse it. - Read installed simulator command options with
xcrun simctl help <subcommand>. - Never address a simulator by name: duplicate names ("iPhone 17 Pro Max") cause "No booted simulator named …" failures. Only the listing output separates same-named devices, so give the listing command beside the UDID whenever you replace a name.
- When a scheme needs a runtime the default Xcode lacks (e.g. a watchOS beta), export
DEVELOPER_DIR=/Applications/Xcode-<version>.app/Contents/Developerfor the whole session, so everyxcodebuildandxcruncall selects the same Xcode.
2. Build and Test in the Background
Never let
xcodebuildhold the foreground: a clean build or test run routinely exceeds the 600 s command timeout, and a command killed at the timeout leaves no verdict.Start the run in the background, redirect its output to a log file in the scratchpad, and keep a handle whose exit status you can read later. Prefer the harness's background facility (
Bashwithrun_in_background: true) and the task handle it returns.With only a plain shell, make the run record its own exit status; a later shell cannot
waitfor another shell's child. Give every attempt its own log and status path; a stale status file ends the wait at once and reports the wrong result:( xcodebuild ... > "$LOG" 2>&1; echo $? > "$LOG.status" ) & # start it until [ -f "$LOG.status" ]; do sleep 5; done # wait, in a later callUse
CODE_SIGNING_ALLOWED=NOfor simulator builds.Pin the destination as
platform=iOS Simulator,id=<udid>.When one target or test matters, scope the run with
-only-testing:<TestTarget>[/<Suite>/<test>]; preserve the log.Never wait with a chained foreground
sleep; the harness blocks it.Wait on the kept handle with the harness's blocking wait (
Monitor, or the task-output wait), or for the.statusfile with the loop above. Read the exit status first, then the log's terminal marker. Do not wait by grep alone: it keeps polling whenxcodebuildexits before writing a marker.
3. Read Results Correctly (Swift Testing Is Not XCTest)
- Swift Testing does NOT emit XCTest's
Test Case ... passedlines. Executed 0 tests, with 0 failuresis the empty XCTest summary; it proves nothing.- Always pass
-resultBundlePathwith a new path per attempt;xcodebuildfails when the path already exists. - Read the verdict from that fresh bundle with
xcrun xcresulttool get test-results summary --path <bundle>. A pass needs the expected non-zero test count there, no failure or crash there,** TEST SUCCEEDED **, and a zero exit status (principle-prove-it-works). - The log's
✔ Test run with N tests in M suites passed, with N greater than zero, corroborates that count; a pattern that also matches zero proves nothing. A filtered or-quietlog can omit the line, so never treat its absence alone as the verdict. - Take the expected test count from the target's tests or test plan, never from the run you are judging.
- Match the expected case IDs against
xcresulttool get test-results tests --path <bundle>; totals alone do not prove each selected case ran. Inspecttest-detailsandmetricswhen a case fails or measures performance, preserving the actual measurements and failure reason. Pin the toolchain, configuration, device and workload for comparisons. State the non-UI XCTest authoring-guide gap explicitly when using project conventions as the fallback. - A run that executed zero tests is not a pass, whatever its exit status
(
principle-gaps-are-not-passes). Suspect the selection before the code: confirm-only-testingstill names the current suite and test after any rename
Установить xcode-dev-loop в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл xcode-dev-loop?
WHEN building, testing, or visually verifying an Xcode project from the command line — xcodebuild runs, Swift Testing result reading, simulator install/launch, and screenshots; NOT for authoring Swift source or tests; returns the canonical build/test/inspect loop.
Как установить скилл xcode-dev-loop?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл xcode-dev-loop запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic