Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

axiom-optimize-build

БесплатноБез исполняемых скриптовНе проверен

Use when the user mentions slow builds, build performance, or build time optimization.

CharlesWiltgenот CharlesWiltgen★ 1 277 звёзд на GitHub

Об этом скилле

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%.

Before State-Changing Actions

Before recommending edits to a .pbxproj or .xcproj file, warn: "Modifying Xcode project file. Ensure backup exists". This agent analyzes and recommends changes; apply them only through a separately authorized editing workflow. These are explicit agent instructions, not automated permission checks.

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:

Follow axiom-build (skills/build-performance.md), "Project selection and effective settings": discover both inner filenames at any depth, select the project/target/configuration/SDK explicitly, and distinguish declarations from a fresh Xcode effective-settings capture. Check command -v xcproject. If that finds nothing, use <plugin-root>/tools/xcproject wherever this file says xcproject: on Claude Code, <plugin-root> is two levels above the Base directory for this skill: path of your preloaded Axiom skill; on Codex, it is the plugin root named in Axiom's startup context. Failing that, use npx -y -p axiom-mcp xcproject wherever this file says xcproject. xcproject inspect is read-only; an Xcode query needs authorized scope because it can resolve packages or write state. If no effective capture is permitted, label values declared/unverified. Never report the first grep hit as the selected Debug setting.

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: xcproject settings --project "$PROJECT" --input "$SETTINGS_JSON" --target "$TARGET" --configuration "$CONFIGURATION" --sdk "$SDK" --key LLVM_LTO --value-only

2. Build Phase Scripts (MEDIUM-HIGH IMPACT)

# Read the selected target's entire phase/rule graph; script bodies can be arrays.
xcproject inspect --project "$PROJECT" --target "$TARGET" --configuration "$CONFIGURATION"

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 (an array value spans several lines — read the whole value):

xcproject settings --project "$PROJECT" --input "$SETTINGS_JSON" --target "$TARGET" --configuration "$CONFIGURATION" --sdk "$SDK" --key OTHER_SWIFT_FLAGS --value-only

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:

# After build authorization, set BUILD_LOG to a task-owned file.
# Inventory running builds first (exit 1 = none, 0 = listed, 2/3 = inventory failed).
pgrep -lx xcodebuild; echo "pgrep exit=$?"
if xcodebuild -workspace YourApp.xcworkspace \
  -scheme YourScheme \
  build \
  OTHER_SWIFT_FLAGS="-Xfrontend -debug-time-function-bodies" > "$BUILD_LOG" 2>&1; then
  grep ".[0-9]ms" "$BUILD_LOG" | sort -nr | head -20
else
  build_status=$?
  echo "Timing build failed for YourApp.xcworkspace/YourScheme (exit $build_status); see $BUILD_LOG" >&2
  exit "$build_status"
fi

4. Swift Package Build Plugins (LOW-MEDIUM IMPACT)

# Check for prebuilt plugins
grep -r "prebuiltPlugins" Package.swift

Issue: Prebuilt plugins can ca

Полный SKILL.md на GitHub

Установить axiom-optimize-build в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

agents/openai.yaml

FAQ

Что делает скилл axiom-optimize-build?

Use when the user mentions slow builds, build performance, or build time optimization.

Как установить скилл axiom-optimize-build?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл axiom-optimize-build запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить axiom-optimize-build с