build-fixer

build-fixer is an agent for Claude Code from Kasempiternal/axiom-v2. It costs 239 tokens per session (1,694 once invoked), scanned C, original, MIT.

An agent that diagnoses and fixes Xcode build failures, including problems with the local environment and Swift Package Manager dependencies.

In plain words
What is it for?
Use it when Xcode reports build errors, missing modules, package conflicts, unresolved dependencies, or simulator boot failures; it also verifies the result.
Why use it?
It checks common environment problems first, such as stale build files, stuck processes, or simulator issues, before treating the source code as the cause.

Agent for Claude Code

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

Part of the axiom plugin — 40 skills, 8 commands, 12 agents, 2 hooks shipped together

Good fit Use it when Xcode reports build errors, missing modules, package conflicts, unresolved dependencies, or simulator boot failures; it also verifies the result.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/kasempiternal/axiom-v2/build-fixer
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/Kasempiternal/axiom-v2

Made for: Claude Code.

Or install axiom, the plugin that ships this one along with the rest of its 40 skills, 8 commands, 12 agents, 2 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/kasempiternal/axiom-v2/build-fixer.svg)](https://agentmods.dev/agents/kasempiternal/axiom-v2/build-fixer)
Your own site
<a href="https://agentmods.dev/agents/kasempiternal/axiom-v2/build-fixer"><img src="https://agentmods.dev/badge/agents/kasempiternal/axiom-v2/build-fixer.svg" alt="Measured on agentmods" height="20"></a>
Per session 239 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,694 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.00239 $0.01694
Opus 5 $0.00120 $0.00847
Sonnet 5 $0.00048 $0.00339
Haiku 4.5 $0.00024 $0.00169

Measured 8d ago against content hash abf0d75e00db, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, 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 8d 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'"
axiom-plugin/agents/build-fixer.md · 208 lines

How it starts

The opening of the file, as written. The whole thing — 208 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 and resolving Swift Package Manager dependency conflicts.

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 or SPM conflict:

  1. Run mandatory environment checks FIRST (never skip)
  2. Identify the specific issue type (environment vs SPM vs code)
  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:

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

# 1. Check for zombie xcodebuild processes (with elapsed time)
ps -eo pid,etime,command | grep -E "xcodebuild|Simulator" | grep -v grep

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

# 3. Check simulator states (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}'

Red Flags: Environment Not Code

If user mentions ANY of these, it's definitely an environment issue:

  • "It works on my machine but not CI"
  • "Tests passed yesterday, failing today with no code changes"
  • "Build succeeds but old code executes"
  • "Build sometimes succeeds, sometimes fails"

Fix Workflows

1. Zombie Processes

If 10+ xcodebuild processes OR any > 30 minutes old:

killall -9 xcodebuild
killall -9 Simulator

2. Stale Derived Data / "No such module" (Local)

xcodebuild -list
xcodebuild clean -scheme <ACTUAL_SCHEME_NAME>
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf .build/ build/
xcodebuild build -scheme <ACTUAL_SCHEME_NAME> -destination 'platform=iOS Simulator,name=iPhone 16'

Read the full file on GitHub · 208 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. 8d ago First seen · 208 lines · 239 tokens per session scan C abf0d75e00db

Subscribe to this mod's changes

build-fixer is an agent published in the GitHub repository Kasempiternal/axiom-v2 (4 stars, last pushed 6mo ago), licensed MIT. It adds 239 tokens to every session and 1,694 once invoked, about $0.0012 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.