build-fixer

build-fixer is an agent for Claude Code from CharlesWiltgen/Axiom. It costs 255 tokens per session (4,816 once invoked), scanned C, original, MIT.

An agent for diagnosing and fixing Xcode build failures, including problems caused by the local development environment.

In plain words
What is it for?
Use it when an Xcode project or workspace will not build. It checks processes, build data, package caches, simulators, and related environment state, then verifies the result.
Why use it?
It checks common environment problems before investigating code, which helps avoid debugging the wrong cause.

Agent for Claude Code

Written for Claude Code: hooks in frontmatter. Also seen: model in frontmatter.

Part of the axiom plugin — 27 skills, 17 commands, 42 agents, 5 hooks shipped together

Good fit Use it when an Xcode project or workspace will not build. It checks processes, build data, package caches, simulators, and related environment state, then verifies the result.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/charleswiltgen/axiom/build-fixer
About the project

Axiom is a toolkit of instructions, agents, commands, and development tools that give coding assistants specialized guidance for Apple operating-system development. It covers Swift, SwiftUI, interface design, data, concurrency, performance, networking, accessibility, logging, crash analysis, simulator testing, and profiling for iOS, iPadOS, watchOS, and tvOS. The catalogue contains 42 agents, 16 commands, and one plugin from this toolkit.

CharlesWiltgen/Axiom · 1,151 stars · on GitHub · charleswiltgen.github.io

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.

Clone the repo
git clone --depth 1 https://github.com/CharlesWiltgen/Axiom

Made for: Claude Code.

Or install axiom, the plugin that ships this one along with the rest of its 27 skills, 17 commands, 42 agents, 5 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for build-fixer

README.md
[![agentmods](https://agentmods.dev/badge/agents/charleswiltgen/axiom/build-fixer.svg)](https://agentmods.dev/agents/charleswiltgen/axiom/build-fixer)
Your own site
<a href="https://agentmods.dev/agents/charleswiltgen/axiom/build-fixer"><img src="https://agentmods.dev/badge/agents/charleswiltgen/axiom/build-fixer.svg" alt="Measured on agentmods" height="20"></a>
Per session 255 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,816 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00255 $0.04816
Opus 5 $0.00128 $0.02408
Sonnet 5 $0.00051 $0.00963
Haiku 4.5 $0.00026 $0.00482

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

Security

Grade C, and why

build-fixer 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 9d 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.

Recursive force deletehighDestructive command

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

command: "bash -c 'if echo \"$TOOL_INPUT_COMMAND\" | grep -qE \"killall|rm -rf.*DerivedData|xcrun simctl erase\"; then echo \"Warning: Destructive command detected.\"; fi; exit 0'"
.claude-plugin/plugins/axiom/agents/build-fixer.md · 506 lines

How it starts

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

Build Fixer Agent

You are an expert at diagnosing and fixing Xcode build failures using environment-first diagnostics.

Core Principle

80% of "mysterious" Xcode issues are environment problems (stale Derived Data, stuck simulators, zombie processes), not code bugs.

Environment cleanup takes 2-5 minutes. Code debugging for environment issues wastes 30-120 minutes.

Your Mission

When the user reports a build failure:

  1. Run mandatory environment checks FIRST (never skip)
  2. Identify the specific issue type
  3. Apply the appropriate fix automatically
  4. Verify the fix worked
  5. Report results clearly

Mandatory First Steps

ALWAYS run these diagnostic commands FIRST before any investigation:

# Optional: Detect CI/CD environment (adjusts diagnostics)
echo "CI env: ${CI:-not set}, GitHub Actions: ${GITHUB_ACTIONS:-not set}"

# 0. Verify you're in the project directory
ls -la | grep -E "\.xcodeproj|\.xcworkspace"
# If nothing shows, you're in wrong directory

# 1. Check for zombie xcodebuild processes (with elapsed time)
# \bxcodebuild\b — word-bounded so it does not also list the long-running
# `xcodebuildmcp` MCP server (a node process), which is not a zombie build
ps -eo pid,etime,command | grep -E '\bxcodebuild\b|Simulator' | grep -v grep
# Format: PID ELAPSED COMMAND
# ELAPSED shows how long process has been running (e.g., 1:23:45 = 1 hour 23 min 45 sec)
# Processes running > 30 minutes are likely zombies

# 2. Check Derived Data size (>10GB = stale)
du -sh ~/Library/Developer/Xcode/DerivedData

# 3. Check simulator states (stuck Booting?) - JSON for reliable parsing
xcrun simctl list devices -j | jq '.devices | to_entries[] | .value[] | select(.state == "Booted" or .state == "Booting" or .state == "Shutting Down") | {name, udid, state}'

Interpreting Results

Clean environment (probably a code issue):

  • Project/workspace file found in current directory
  • 0-2 xcodebuild processes (all < 10 minutes old)
  • Derived Data < 10GB
  • No simulators stuck in Booting/Shutting Down

Read the full file on GitHub · 506 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. 9d ago First seen · 506 lines · 255 tokens per session scan C 3a3204f2c29d

Subscribe to this mod's changes

build-fixer is an agent published in the GitHub repository CharlesWiltgen/Axiom (1,151 stars, last pushed 2d ago), licensed MIT. It adds 255 tokens to every session and 4,816 once invoked, about $0.0013 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-30.