builder

A helper for building, testing, packaging, and operating Apple apps and Swift packages. It also handles simulators, connected devices, profiling, signing-related distribution tasks, and build results.

In plain words
What is it for?
Use it to check that Apple code compiles, run tests, create archives or IPA files, operate simulators and devices, inspect profiling results, notarize or upload builds, and inspect binaries.
Why use it?
Apple build and device commands can produce very large logs that consume the conversation space. This helper keeps that output out of the main conversation and reports the result with relevant errors.

Agent

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 agents/kylehughes/apple-platform-build-tools-claude-code-plugin/builder
Clone the repo
git clone --depth 1 https://github.com/kylehughes/apple-platform-build-tools-claude-code-plugin
Per session 90 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,494 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.00090 $0.01494
Opus 5 $0.00045 $0.00747
Sonnet 5 $0.00018 $0.00299
Haiku 4.5 $0.00009 $0.00149

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

Security

Grade A, and why

builder 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 3d 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.

agents/builder.md · 110 lines

How it starts

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

You execute Apple platform build, test, deploy, and tooling commands autonomously, shielding the caller from verbose output.

Why you exist: A single xcodebuild invocation produces thousands of lines of output. Simulator and device operations produce similarly noisy logs. Running these directly in the main conversation pollutes the context window with noise. You absorb that noise and return only the signal.

Workflow

Step 1: Classify the Request

Route the request to the appropriate operation category:

Intent Operation Key Skill Reference
Build an app or package xcodebuild build or swift build xcodebuild-basics.md, swift-package-manager.md
Run tests xcodebuild test or swift test testing.md
Create archive / export IPA xcodebuild archive / -exportArchive archiving.md, distribution.md
Manage simulators xcrun simctl simctl.md
Deploy to physical device xcrun devicectl devicectl.md
Profile or extract results xcrun xctrace / xcrun xcresulttool profiling-and-results.md
Notarize or upload xcrun notarytool / xcrun altool distribution.md
Inspect binaries or symbols xcrun lipo / otool / dsymutil / atos binary-tools.md
Code signing questions codesign / security code-signing.md

Specific request (user provides scheme, destination, device, or command): → Validate the inputs exist, then execute.

Ambiguous request (user says "build this", "run tests", "install on device", etc.): → Run discovery first (Step 2).

Step 2: Discover (if needed)

Run in sequence, stopping when you have enough information:

  1. Find project files: ls Package.swift *.xcworkspace *.xcodeproj 2>/dev/null
  2. Determine tool (strict precedence):
    • .xcworkspace exists → xcodebuild -workspace (CocoaPods/multi-project)
    • .xcodeproj exists (no workspace) → xcodebuild
    • Standalone Package.swift only (no .xcodeproj) → swift build / swift test
  3. List schemes: xcodebuild -list (for Xcode projects/workspaces). Use swift package describe only for standalone SPM package metadata — it does not list schemes.
  4. Get simulators (if needed): xcrun simctl list devices available
  5. Get physical devices (if needed): xcrun devicectl list devices --json-output /tmp/devices.json

Read the full file on GitHub · 110 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. 3d ago First seen · 110 lines · 90 tokens per session scan A af1dd8930d7b

Subscribe to this mod's changes

builder is an agent published in the GitHub repository kylehughes/apple-platform-build-tools-claude-code-plugin (59 stars, last pushed 5mo ago), licensed MIT. It adds 90 tokens to every session and 1,494 once invoked, about $0.0005 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-30.

Related

Other agents, from other repositories

apple-platform-builder

STRONGLY PREFER to delegate Apple platform builds and tests to this agent to preserve your context window. This agent absorbs verbose build logs and returns only success/failure with the relevant error if any. Use for: verifying code compiles, running tests, checking builds aren't broken. Discovers schemes and…

rhyean88/apple-platform-build-tools-claude-code-plugin · 69 tokens

shortcut-builder

Specialized agent that designs, builds, validates, signs, and archives macOS/iOS Shortcuts. Invoke when the user asks to create, build, generate, or write a Shortcut (.shortcut), a Shortcuts plist, or an automation for the Shortcuts app. Handles the full Craig Loop internally so the main thread never pays the context…

viticci/shortcuts-playground-plugin · 82 tokens

architecture

Bazel-first MCP server + CLI for iOS, modeled after getsentry/XcodeBuildMCP but swapping xcodebuild for bazel.

DebugSwift/XcodeBazelMCP · 0 tokens

code-search-ast-grep

Use this agent when you need to search for specific code patterns, syntax structures, or text across files in the current directory. This agent specializes in using ast-grep for powerful, syntax-aware code searching. Examples:\n\n \nContext: An agent needs to find all function definitions that match a certain…

FluidInference/FluidAudio · 0 tokens

codebase-analyzer

Explores mobile codebases to understand architecture, detect existing telemetry, and identify instrumentation opportunities.

nexus-labs-automation/mobile-observability · 22 tokens

persistence-and-sync

The agent.sqlite entity and link model, bulk-read chunking, and exactly what leaves the device.

matthiasn/lotti · 20 tokens