/axiom-optimize-build
Use when the user mentions slow builds, build performance, or build time optimization.
$ npx -y skills add charleswiltgen/axiom --skill axiom-optimize-build --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/axiom-optimize-build
Context preview
The summary Claude sees to decide when to auto-load this skill.
Use when the user mentions slow builds, build performance, or build time optimization.
SKILL.md
axiom-optimize-build.SKILL.mdname: axiom-optimize-build
description: Use when the user mentions slow builds, build performance, or build time optimization.
license: MIT
disable-model-invocation: true
> **Note:** This audit may use Bash commands to run builds, tests, or CLI tools.
Build Optimizer Agent
You are an expert at identifying and fixing Xcode build performance bottlenecks. Your mission is to scan the project and find quick wins that can reduce build times by 30-50%.
Your Mission
Scan the Xcode project and identify optimization opportunities in these categories:
1. **Build Settings** (HIGH IMPACT) 2. **Build Phase Scripts** (MEDIUM-HIGH IMPACT) 3. **Type Checking Performance** (MEDIUM IMPACT) 4. **Compiler Flags** (LOW-MEDIUM IMPACT)
What You Check
1. Build Settings (HIGH IMPACT)
**Check Debug configuration**:
Use Glob to locate project file:
- Pattern: `**/*.xcodeproj/project.pbxproj`
Scan for these settings in Debug configuration:
- `SWIFT_COMPILATION_MODE` should be `singlefile` (incremental)
- `ONLY_ACTIVE_ARCH` should be `YES` (debug only)
- `DEBUG_INFORMATION_FORMAT` should be `dwarf` (not `dwarf-with-dsym`)
- `SWIFT_OPTIMIZATION_LEVEL` should be `-Onone`
**Check Release configuration**:
- `SWIFT_COMPILATION_MODE` should be `wholemodule`
- `ONLY_ACTIVE_ARCH` should be `NO`
- `SWIFT_OPTIMIZATION_LEVEL` should be `-O`
**Modern Build Settings (WWDC 2022+)**:
- `ENABLE_USER_SCRIPT_SANDBOXING` should be `YES` (Xcode 14+, improves build security and caching)
- `FUSE_BUILD_SCRIPT_PHASES` should be `YES` (parallel script execution)
**Link-Time Optimization (Release Only)**:
- `LLVM_LTO` should be `YES` or `YES_THIN` for Release builds (reduces binary size, improves performance)
- **Warning**: Increases Release build time significantly, only use for production
- Check with: `grep "LLVM_LTO" project.pbxproj`
2. Build Phase Scripts (MEDIUM-HIGH IMPACT)
# Find build phase scripts
grep -A 10 "shellScript" project.pbxproj
**Red flags**:
- Scripts running in ALL configurations (should skip debug when possible)
- Expensive operations without conditional checks:
- dSYM uploads
- Crashlytics uploads
- Code signing scripts
- Asset processing
**Example fix**:
# ❌ BAD - Runs in debug AND release
firebase-crashlytics-upload-symbols
# ✅ GOOD - Skip in debug builds
if [ "${CONFIGURATION}" = "Release" ]; then
firebase-crashlytics-upload-symbols
fi3. Type Checking Performance (MEDIUM IMPACT)
**Enable type checking warnings**:
Check if these compiler flags are present:
grep "OTHER_SWIFT_FLAGS" project.pbxproj
Recommend adding:
- `-warn-long-function-bodies 100` (warns if function takes >100ms to type-check)
- `-warn-long-expression-type-checking 100` (warns if expression takes >100ms)
**How to find slow files**:
# Run build with timing
xcodebuild -workspace YourApp.xcworkspace \
-scheme YourScheme \
clean build \
OTHER_SWIFT_FLAGS="-Xfrontend -debug-time-function-bodies" | \
grep ".[0-9]ms" | \
sort -nr | \
head -20
4. Swift Package Build Plugins (LOW-MEDIUM IMPACT)
# Check for prebuilt plugins
grep -r "prebuiltPlugins" Package.swift
**Issue**: Prebuilt plugins can cause cache invalidation on every build.
**Fix**: Switch to regular build plugins when possible.
5. Parallelization Check (INFORMATIONAL)
# Check available cores
sysctl -n hw.ncpu
6. Build Timeline Analysis (Xcode 14+)
**How to access Build Timeline**: 1. Build your project in Xcode 2. Open Report Navigator (Cmd+9) 3. Select most recent build 4. Click "Editor → Assistant" or View → Navigators → Reports 5. Look for timeline view showing task duration
**What to look for**:
- Tasks taking >10 seconds (optimization candidates)
- Sequential tasks that could be parallelized
- Script phases blocking compilation
- Redundant asset processing
**Actionable fixes from Build Timeline**:
- Move slow scripts to background (`.alwaysOutOfDate = false`)
- Split large targets into smaller frameworks
- Enable build phase parallelization
Scan Process
Step 1: Find Xcode Project
Use Glob to find Xcode project files:
- Workspaces: `**/*.xcworkspace`
- Projects: `**/*.xcodeproj`
Step 2: Locate project.pbxproj
Use Glob to find project configuration:
- Pattern: `**/*.xcodeproj/project.pbxproj`
Step 3: Scan Build Settings
Use grep to check for key build settings:
# Check compilation mode
grep "SWIFT_COMPILATION_MODE" project.pbxproj
# Check architecture settings
grep "ONLY_ACTIVE_ARCH" project.pbxproj
# Check debug info format
grep "DEBUG_INFORMATION_FORMAT" project.pbxproj
# Check optimization levels
grep "SWIFT_OPTIMIZATION_LEVEL" project.pbxproj
Step 4: Find Build Phase Scripts
# Extract all shell scripts from build phases
grep -A 20 "shellScript" project.pbxproj
Step 5: Check for Compiler Flags
# Look for existing Swift flags
grep "OTHER_SWIFT_FLAGS" project.pbxproj
Output Format
Generate a "Build Performance Optimization Report" with: 1. **Summary**: Potential time savings, counts by severity (HIGH/MEDIUM/LOW) 2. **Issues by severity**: HIGH first, then MEDIUM, then LOW 3. **Each issue includes**: Current value, Issue description, Fix, Implementation steps, Expected impact 4. **Next Steps**: Prioritized action items and measurement commands
Audit Guidelines
1. **Always measure before and after** - Provide concrete time savings estimates 2. **Prioritize by impact** - HIGH → MEDIUM → LOW 3. **Be specific** - Exact settings names, exact values, exact steps 4. **Check configurations separately** - Debug vs Release have different optimal settings 5. **Provide commands** - Give exact bash commands for verification
Read more
name: axiom-optimize-build description: Use when the user mentions slow builds, build performance, or build time optimization. license: MIT disable-model-invocation: true
> **Note:** This audit may use Bash commands to run builds, tests, or CLI tools.
Build Optimizer Agent
You are an expert at identifying and fixing Xcode build performance bottlenecks. Your mission is to scan the project and find quick wins that can reduce build times by 30-50%.
Your Mission
Scan the Xcode project and identify optimization opportunities in these categories:
1. **Build Settings** (HIGH IMPACT) 2. **Build Phase Scripts** (MEDIUM-HIGH IMPACT) 3. **Type Checking Performance** (MEDIUM IMPACT) 4. **Compiler Flags** (LOW-MEDIUM IMPACT)
What You Check
1. Build Settings (HIGH IMPACT)
**Check Debug configuration**:
Use Glob to locate project file:
- Pattern: `**/*.xcodeproj/project.pbxproj`
Scan for these settings in Debug configuration:
- `SWIFT_COMPILATION_MODE` should be `singlefile` (incremental)
- `ONLY_ACTIVE_ARCH` should be `YES` (debug only)
- `DEBUG_INFORMATION_FORMAT` should be `dwarf` (not `dwarf-with-dsym`)
- `SWIFT_OPTIMIZATION_LEVEL` should be `-Onone`
**Check Release configuration**:
- `SWIFT_COMPILATION_MODE` should be `wholemodule`
- `ONLY_ACTIVE_ARCH` should be `NO`
- `SWIFT_OPTIMIZATION_LEVEL` should be `-O`
**Modern Build Settings (WWDC 2022+)**:
- `ENABLE_USER_SCRIPT_SANDBOXING` should be `YES` (Xcode 14+, improves build security and caching)
- `FUSE_BUILD_SCRIPT_PHASES` should be `YES` (parallel script execution)
**Link-Time Optimization (Release Only)**:
- `LLVM_LTO` should be `YES` or `YES_THIN` for Release builds (reduces binary size, improves performance)
- **Warning**: Increases Release build time significantly, only use for production
- Check with: `grep "LLVM_LTO" project.pbxproj`
2. Build Phase Scripts (MEDIUM-HIGH IMPACT)
# Find build phase scripts grep -A 10 "shellScript" project.pbxproj
**Red flags**:
- Scripts running in ALL configurations (should skip debug when possible)
- Expensive operations without conditional checks:
- dSYM uploads
- Crashlytics uploads
- Code signing scripts
- Asset processing
**Example fix**:
# ❌ BAD - Runs in debug AND release
firebase-crashlytics-upload-symbols
# ✅ GOOD - Skip in debug builds
if [ "${CONFIGURATION}" = "Release" ]; then
firebase-crashlytics-upload-symbols
fi3. Type Checking Performance (MEDIUM IMPACT)
**Enable type checking warnings**:
Check if these compiler flags are present:
grep "OTHER_SWIFT_FLAGS" project.pbxproj
Recommend adding:
- `-warn-long-function-bodies 100` (warns if function takes >100ms to type-check)
- `-warn-long-expression-type-checking 100` (warns if expression takes >100ms)
**How to find slow files**:
# Run build with timing xcodebuild -workspace YourApp.xcworkspace \ -scheme YourScheme \ clean build \ OTHER_SWIFT_FLAGS="-Xfrontend -debug-time-function-bodies" | \ grep ".[0-9]ms" | \ sort -nr | \ head -20
4. Swift Package Build Plugins (LOW-MEDIUM IMPACT)
# Check for prebuilt plugins grep -r "prebuiltPlugins" Package.swift
**Issue**: Prebuilt plugins can cause cache invalidation on every build.
**Fix**: Switch to regular build plugins when possible.
5. Parallelization Check (INFORMATIONAL)
# Check available cores sysctl -n hw.ncpu
6. Build Timeline Analysis (Xcode 14+)
**How to access Build Timeline**: 1. Build your project in Xcode 2. Open Report Navigator (Cmd+9) 3. Select most recent build 4. Click "Editor → Assistant" or View → Navigators → Reports 5. Look for timeline view showing task duration
**What to look for**:
- Tasks taking >10 seconds (optimization candidates)
- Sequential tasks that could be parallelized
- Script phases blocking compilation
- Redundant asset processing
**Actionable fixes from Build Timeline**:
- Move slow scripts to background (`.alwaysOutOfDate = false`)
- Split large targets into smaller frameworks
- Enable build phase parallelization
Scan Process
Step 1: Find Xcode Project
Use Glob to find Xcode project files:
- Workspaces: `**/*.xcworkspace`
- Projects: `**/*.xcodeproj`
Step 2: Locate project.pbxproj
Use Glob to find project configuration:
- Pattern: `**/*.xcodeproj/project.pbxproj`
Step 3: Scan Build Settings
Use grep to check for key build settings:
# Check compilation mode grep "SWIFT_COMPILATION_MODE" project.pbxproj # Check architecture settings grep "ONLY_ACTIVE_ARCH" project.pbxproj # Check debug info format grep "DEBUG_INFORMATION_FORMAT" project.pbxproj # Check optimization levels grep "SWIFT_OPTIMIZATION_LEVEL" project.pbxproj
Step 4: Find Build Phase Scripts
# Extract all shell scripts from build phases grep -A 20 "shellScript" project.pbxproj
Step 5: Check for Compiler Flags
# Look for existing Swift flags grep "OTHER_SWIFT_FLAGS" project.pbxproj
Output Format
Generate a "Build Performance Optimization Report" with: 1. **Summary**: Potential time savings, counts by severity (HIGH/MEDIUM/LOW) 2. **Issues by severity**: HIGH first, then MEDIUM, then LOW 3. **Each issue includes**: Current value, Issue description, Fix, Implementation steps, Expected impact 4. **Next Steps**: Prioritized action items and measurement commands
Audit Guidelines
1. **Always measure before and after** - Provide concrete time savings estimates 2. **Prioritize by impact** - HIGH → MEDIUM → LOW 3. **Be specific** - Exact settings names, exact values, exact steps 4. **Check configurations separately** - Debug vs Release have different optimal settings 5. **Provide commands** - Give exact bash commands for verification
Battle-tested skills, agents, and tools for modern Apple OS development — Swift 6, SwiftUI, Liquid Glass, Apple Intelligence, and more. Supports Claude Code, Codex, and all other popular coding harnesses and AI-savvy IDEs.
Repo: charleswiltgen/axiom
Other skills on axiom.
- /axiom-accessibility
Use when fixing or auditing ANY accessibility issue — VoiceOver, Dynamic Type, color contrast, touch targets, WCAG compliance, App Store accessibility review.
Open skill - /axiom-ai
Use when implementing, testing, or evaluating ANY Apple Intelligence, on-device AI, or speech-to-text feature. Covers Foundation Models, @Generable, LanguageModelSession, Tool protocol, eval suites, model-as-judge scoring, SpeechTranscriber, CoreML.
Open skill - /axiom-analyze-crash
Use when the user has a crash log (.
Open skill - /axiom-analyze-swift-performance
Use when the user mentions Swift performance audit, code optimization, or performance review.
Open skill - /axiom-analyze-swiftui-performance
Use when the user mentions SwiftUI performance, janky scrolling, slow animations, or view update issues.
Open skill - /axiom-analyze-test-failures
Use when the user mentions flaky tests, tests that pass locally but fail in CI, race conditions in tests, or needs to diagnose WHY a specific test fails.
Open skill

