axiom-optimize-build
- Repo stars 977
- Forks 74
- License MIT
- Author updated Jun 15, 2026, 03:09 AM
- Author repo Axiom
- Domain
- Engineering
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 94 / 100 · audit passed
- Author / version / license
- @CharlesWiltgen · MIT
- Token usage
- Lean
- Setup complexity
- Guided setup
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No special requirements
- Permissions
-
- Read-only
- Write / modify
- Shell exec
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: axiom-optimize-build
description: Use when the user mentions slow builds, build performance, or build time optimization. You are a…
category: engineering
runtime: no special runtime
---
# axiom-optimize-build output preview
## PART A: Task fit
- Use case: Use when the user mentions slow builds, build performance, or build time optimization. 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%. runs entirely locally. Works with Claude Code, Cursor, Cline and 23 more..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “Your Mission / What You Check / 1. Build Settings (HIGH IMPACT)” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “Use when the user mentions slow builds, build performance, or build time optimization. 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%. runs entirely locally. Works with Claude Code, Cursor, Cline and 23 more.”.
- **02** When the source has headings, the agent prioritizes “Your Mission / What You Check / 1. Build Settings (HIGH IMPACT)” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files, run shell commands; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files, run shell commands; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files, run shell commands.
Start with a small task and check whether the result follows “Your Mission / What You Check / 1. Build Settings (HIGH IMPACT)”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: axiom-optimize-build
description: Use when the user mentions slow builds, build performance, or build time optimization. You are a…
category: engineering
source: CharlesWiltgen/Axiom
---
# axiom-optimize-build
## When to use
- Use when the user mentions slow builds, build performance, or build time optimization. You are an expert at identifyin…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “Your Mission / What You Check / 1. Build Settings (HIGH IMPACT)” and keep inference separate from source facts.
- read files, write/modify files, run shell commands; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "axiom-optimize-build" {
input -> user goal + target files + boundaries + acceptance criteria
context -> Your Mission / What You Check / 1. Build Settings (HIGH IMPACT)
rules -> SKILL.md triggers / order / output contract
runtime -> no special runtime | read files, write/modify files, run shell commands | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} 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:
- Build Settings (HIGH IMPACT)
- Build Phase Scripts (MEDIUM-HIGH IMPACT)
- Type Checking Performance (MEDIUM IMPACT)
- 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_MODEshould besinglefile(incremental)ONLY_ACTIVE_ARCHshould beYES(debug only)DEBUG_INFORMATION_FORMATshould bedwarf(notdwarf-with-dsym)SWIFT_OPTIMIZATION_LEVELshould be-Onone
Check Release configuration:
SWIFT_COMPILATION_MODEshould bewholemoduleONLY_ACTIVE_ARCHshould beNOSWIFT_OPTIMIZATION_LEVELshould be-O
Modern Build Settings (WWDC 2022+):
ENABLE_USER_SCRIPT_SANDBOXINGshould beYES(Xcode 14+, improves build security and caching)FUSE_BUILD_SCRIPT_PHASESshould beYES(parallel script execution)
Link-Time Optimization (Release Only):
LLVM_LTOshould beYESorYES_THINfor 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
fi
3. 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:
- Build your project in Xcode
- Open Report Navigator (Cmd+9)
- Select most recent build
- Click "Editor → Assistant" or View → Navigators → Reports
- 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:
- Summary: Potential time savings, counts by severity (HIGH/MEDIUM/LOW)
- Issues by severity: HIGH first, then MEDIUM, then LOW
- Each issue includes: Current value, Issue description, Fix, Implementation steps, Expected impact
- Next Steps: Prioritized action items and measurement commands
Audit Guidelines
- Always measure before and after - Provide concrete time savings estimates
- Prioritize by impact - HIGH → MEDIUM → LOW
- Be specific - Exact settings names, exact values, exact steps
- Check configurations separately - Debug vs Release have different optimal settings
- Provide commands - Give exact bash commands for verification
Decide Fit First
Design Intent
How To Use It
Boundaries And Review