Use when the user mentions slow builds, build performance, or build time optimization.
44
43%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./axiom-codex/skills/axiom-optimize-build/SKILL.mdNote: This audit may use Bash commands to run builds, tests, or CLI tools.
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%.
Scan the Xcode project and identify optimization opportunities in these categories:
Check Debug configuration:
Use Glob to locate project file:
**/*.xcodeproj/project.pbxprojScan 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 -OnoneCheck Release configuration:
SWIFT_COMPILATION_MODE should be wholemoduleONLY_ACTIVE_ARCH should be NOSWIFT_OPTIMIZATION_LEVEL should be -OModern 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)grep "LLVM_LTO" project.pbxproj# Find build phase scripts
grep -A 10 "shellScript" project.pbxprojRed flags:
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
fiEnable type checking warnings:
Check if these compiler flags are present:
grep "OTHER_SWIFT_FLAGS" project.pbxprojRecommend 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# Check for prebuilt plugins
grep -r "prebuiltPlugins" Package.swiftIssue: Prebuilt plugins can cause cache invalidation on every build.
Fix: Switch to regular build plugins when possible.
# Check available cores
sysctl -n hw.ncpuHow to access Build Timeline:
What to look for:
Actionable fixes from Build Timeline:
.alwaysOutOfDate = false)Use Glob to find Xcode project files:
**/*.xcworkspace**/*.xcodeprojUse Glob to find project configuration:
**/*.xcodeproj/project.pbxprojUse 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# Extract all shell scripts from build phases
grep -A 20 "shellScript" project.pbxproj# Look for existing Swift flags
grep "OTHER_SWIFT_FLAGS" project.pbxprojGenerate a "Build Performance Optimization Report" with:
ea3be7c
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.