xcbuild

A build command for iOS and macOS applications that uses Apple's xcodebuild tool. It detects the project and helps select the build scheme and simulator.

In plain words
What is it for?
Use it to build an iOS or macOS app, choose a scheme, select a simulator by name or ID, and change saved build settings.
Why use it?
It removes repeated project, scheme, and simulator selection when building an Xcode project. Team defaults and personal machine-specific settings can be kept in separate configuration files.

Command

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 commands/scarrillo/release/xcbuild
Clone the repo
git clone --depth 1 https://github.com/scarrillo/release
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,287 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00016 $0.02287
Opus 5 $0.00008 $0.01144
Sonnet 5 $0.00003 $0.00457
Haiku 4.5 $0.00002 $0.00229

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

Security

Grade A, and why

xcbuild scanned grade A with 0 findings 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 2d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/xcbuild.md · 271 lines

How it starts

The opening of the file, as written. The whole thing — 271 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Xcode Build

Build an iOS/macOS app using xcodebuild with automatic project detection and simulator selection.

Arguments

$ARGUMENTS

  • No arguments: Use cached settings or prompt for selection on first run
  • --change: Clear cached settings and prompt for new scheme and simulator selection
  • --scheme=<name>: Use a specific scheme (updates cache)
  • --id=<UUID>: Use a specific simulator UUID (one-time, doesn't update cache)

Configuration

Plugin settings are stored in dedicated config files (Claude Code's settings.json has a strict schema):

Scope File Use Case
project .claude/config.json Team defaults, version controlled
local .claude/config.local.json Personal settings, gitignored

Project Settings (.claude/config.json)

Team defaults, committed to version control:

{
  "release-plugin": {
    "xcbuild": {
      "scheme": "MyApp",
      "showWarnings": true
    }
  }
}

Local Settings (.claude/config.local.json)

Personal settings, gitignored (simulator UUIDs are machine-specific):

{
  "release-plugin": {
    "xcbuild": {
      "simulatorId": "A2444326-C93A-4271-9EF0-C44AA5D4FC42",
      "scheme": "MyApp-Dev"
    }
  }
}

Settings Reference

Setting Recommended Scope Description
scheme project Default scheme (team default)
simulatorId local Default simulator UUID (machine-specific)
showWarnings project Show build warnings in output (default: true)

Precedence (highest to lowest)

  1. Command-line arguments (--scheme=, --id=)
  2. Local config (.claude/config.local.json)
  3. Project config (.claude/config.json)
  4. Session cache
  5. Prompt user

Instructions

Step 1: Check for arguments and cached settings

Parse $ARGUMENTS:

  • If --id=<UUID> is provided, use that UUID for this build only (skip to Step 5)
  • If --scheme=<name> is provided, use that scheme and update cache (proceed to Step 3)
  • If --change is provided, clear all cached settings and proceed to Step 1b
  • If no arguments, check settings in precedence order:
    1. .claude/config.local.jsonrelease-plugin.xcbuild.scheme and simulatorId
    2. .claude/config.jsonrelease-plugin.xcbuild.scheme and simulatorId
    3. Session cache from earlier in this conversation
    4. If scheme is missing, proceed to Step 1b (detect project, then select scheme)
    5. If simulator is missing, proceed to Step 3 (query and select simulator)
    6. If both are found, skip to Step 5 (run build - trust saved simulator ID)

Read the full file on GitHub · 271 lines

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. 2d ago First seen · 271 lines · 16 tokens per session scan A 4e3d32eef504

Subscribe to this mod's changes

xcbuild is a command published in the GitHub repository scarrillo/release (9 stars, last pushed 5mo ago), licensed MIT. It adds 16 tokens to every session and 2,287 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.