用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/CharlesWiltgen/Axiom --skill axiom-optimize-build命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | axiom-optimize-build |
| description | Use when the user mentions slow builds, build performance, or build time optimization. |
| license | MIT |
Note: 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.pbxproj
Red 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
fi
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
# 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.
# Check available cores
sysctl -n hw.ncpu
How 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.pbxproj
Generate a "Build Performance Optimization Report" with:
Use when making design decisions, implementing HIG patterns, Liquid Glass, SF Symbols, typography, or structuring app entry points and authentication flows.
Use when building, fixing, or improving ANY SwiftUI UI — views, navigation, layout, animations, performance, architecture, gestures, debugging, iOS 26 features.
Use when making design decisions, implementing HIG patterns, Liquid Glass, SF Symbols, typography, or structuring app entry points and authentication flows.
基于 SOC 职业分类