Xcode compile profiler

From Xopoko/build-swift-apps · View interactive version

Xcode compile profiler is an AI agent skill from the GitHub repository Xopoko/build-swift-apps. Profile Swift and mixed-language compile bottlenecks from timing summaries, frontend diagnostics, type-check warnings, CompileSwiftSources, and SwiftEmitModule; recommend changes only.

How to use this skill

Skill file

Xcode Compile Profiler

Before invoking Apple-only binaries, confirm the execution context is macOS. From Windows or Linux, run those steps in a Mac SSH project or through an already configured remote transport; do not retry missing Apple binaries locally.

Bundled commands use $PLUGIN_ROOT for the plugin root. Use the host's plugin-root variable when defined; otherwise set it to the absolute path of this plugin before running a helper from the app repository.

Use when compile time, type checking, or mixed-language compilation is the bottleneck. Recommend first; do not edit source or build settings without explicit approval.

Rules

Inspect

Preferred script:

python3 "$PLUGIN_ROOT/shared/build-optimization/scripts/diagnose_compilation.py" \
  --project App.xcodeproj \
  --scheme MyApp \
  --configuration Debug \
  --destination "platform=iOS Simulator,name=<latest available iPhone simulator>,OS=latest" \
  --threshold 100 \
  --output-dir .build-benchmark

Checks

Investigate the code and modules the diagnostics identify. Try explicit types or simpler expressions for measured type-check hot spots. Check imports, bridging headers, and module options when the timing points to dependency or module work.

Output

For each recommendation include evidence, file/module, expected wait-time impact or parallel-work caveat, confidence, and whether approval is needed. If evidence points to project configuration, read and hand off to xcode-project-auditor.

Resources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.