xcode-build

A set of workflows for building, testing, analyzing, formatting, linting, archiving, and exporting Apple projects with Xcode. An archive is a packaged build used for distribution, such as an iPhone app file.

In plain words
What is it for?
Use it to clean projects, list schemes, build or archive apps, export releases, run Swift formatting and lint checks, run tests, and inspect coverage.
Why use it?
It gathers common Xcode build and diagnostic tasks into consistent agent operations and can report test coverage.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/yanxreal/xcode-mpc/xcode-build
Any agent
npx skills add YanxReal/Xcode-MPC --skill xcode-build
Clone the repo
git clone --depth 1 https://github.com/YanxReal/Xcode-MPC

Made for: Claude Code, Codex.

Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 617 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00074 $0.00617
Opus 5 $0.00037 $0.00309
Sonnet 5 $0.00015 $0.00123
Haiku 4.5 $0.00007 $0.00062

Measured yesterday against content hash 2cf56ec1a629, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

xcode-build scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- `xcode_clean` — `clean` + optional `purgeDerivedData` (`rm -rf ~/Library/Developer/Xcode/DerivedData`)
skills/xcode-build/SKILL.md · 54 lines

What it actually says

Xcode Build & Diagnostics

Focuses on compilation, diagnostics, lint and tests (8 tools: 6 build + 2 tests) from the 52-tool Xcode MCP.

Tools

  • xcode_buildxcodebuild build (scheme*, workspace, project, destination, configuration: Debug|Release)
  • xcode_cleanclean + optional purgeDerivedData (rm -rf ~/Library/Developer/Xcode/DerivedData)
  • xcode_list_schemes-list -json
  • xcode_analyzeanalyze
  • xcode_archive_exportarchive-exportArchive (.ipa, exportOptionsPlist*)
  • swift_format_lintswift-formatswiftlint fallback (mode: lint|format, tool: auto|swift-format|swiftlint)
  • xcode_run_teststest (scheme*, destination*, onlyTesting, enableCodeCoverage)
  • xcode_test_coveragexcrun xccov view --report --json (auto DerivedData/*.xcresult via findLatestXcresult)

When to Use

  • User says “build MyApp”, “clean DerivedData”, “list schemes”, “archive IPA”, “lint Sources”, “run tests”, “coverage”.

Workflows

Clean Build:

xcode_clean {scheme:"MyApp", purgeDerivedData:true}
→ xcode_build {scheme:"MyApp", destination:"platform=iOS Simulator,name=iPhone 15", configuration:"Debug"}

Analyze + Lint:

xcode_analyze {scheme:"MyApp"}
→ swift_format_lint {path:"Sources/", mode:"lint"}

Test + Coverage:

xcode_run_tests {scheme:"MyApp", destination:"platform=iOS Simulator,name=iPhone 15", enableCodeCoverage:true}
→ xcode_test_coverage {}

Notes

  • Always use shellEscape for paths with spaces (server does it).
  • xcode_build returns full stdout/stderr via formatResult — show it.
  • If swift-format not found, fallback to swiftlint automatically.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 54 lines · 0 tokens per session scan C 2cf56ec1a629

Subscribe to this mod's changes

xcode-build is a skill published in the GitHub repository YanxReal/Xcode-MPC (1 stars, last pushed yesterday), licensed MIT. It adds 74 tokens to every session and 617 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

shortcuts-playground

Build, validate, sign, archive, and REMIX macOS/iOS Shortcuts by creating plist files. Use when asked to create, modify, or remix shortcuts; automate workflows; build .shortcut files; or generate Shortcuts plists. Covers WF actions, AppIntents, third-party actions, variable references, and control flow using bundled…

viticci/shortcuts-playground-plugin · 81 tokens

heimdall

Work with an Apple App Store Connect account through Heimdall's MCP servers — App Store listings and metadata, TestFlight builds and testers, subscription and in-app-purchase prices, customer reviews, sales and analytics reports, certificates and provisioning profiles. Use this whenever the user asks about their app…

erayendes/app-store-connect-mcp · 180 tokens

heimdall-contrib

Work on the Heimdall repository itself (@erayendes/asc-mcp) — the App Store Connect MCP server's own source. Use this whenever editing this codebase — changing tool descriptions, moving a tool between profiles, bumping Apple's OpenAPI spec, adding a macro, touching src/generated, or interpreting the AX debt numbers.…

erayendes/app-store-connect-mcp · 111 tokens

programming-swift

Provides the complete content of 'The Swift Programming Language (6.4 beta)' book by Apple. Use this skill when you need to verify Swift syntax, look up language features, understand concurrency, resolve compiler errors, or consult the formal language reference.

kylehughes/the-unofficial-swift-programming-language-skill · 55 tokens

apple-design

Complete Apple Human Interface Guidelines (HIG) and Apple Design System standard. Use when designing, building, or auditing UI/UX for iOS, iPadOS, macOS, watchOS, visionOS, or Apple-styled web and mobile applications.

billythekidz/apple-design-skill · 55 tokens

ipaship-audit

Use when auditing iOS/Android app submissions for compliance with Apple App Store Review Guidelines or Google Play Developer Policies. Scan .ipa, .apk, or .zip files against official store policies, generate structured compliance reports, and identify violations with remediation steps.

atharvnaik1/ipaship-audit · 57 tokens