Back to Skills

xcode-compilation-analyzer

Analyze Swift and mixed-language compile hotspots using build timing summaries and Swift frontend diagnostics, then produce a recommend-first source-level optimization plan. Use when a developer reports slow compilation, type-checking warnings, expensive clean-build compile phases, long CompileSwiftSources tasks, warn-long-function-bodies output, or wants to speed up Swift type checking.

1,075stars41forksUpdated 5/26/2026

Security Assessment

Safe(100/100)
Security Score100/100

About xcode-compilation-analyzer

The xcode-compilation-analyzer skill helps developers investigate and optimize slow Swift and mixed-language Xcode compilation workflows by focusing on evidence-driven compile-time analysis. It is designed for situations where compilation latency, type-checking overhead, or expensive incremental and clean builds are slowing development productivity. The skill analyzes build timing summaries, compiler diagnostics, Swift frontend timing data, and module compilation behavior to identify the most impactful bottlenecks. Rather than making speculative project changes, it prioritizes measurable compiler evidence and produces a recommendation-first optimization plan that focuses on reducing real-world wall-clock build delays.

The skill supports detailed investigation workflows using Xcode timing summaries and advanced Swift compiler diagnostic flags. It can surface long-running CompileSwiftSources tasks, expensive SwiftEmitModule phases, and incremental build invalidation issues related to large modules or macro-heavy codebases. It also supports analysis of type-checking hotspots through warning-based and deep diagnostic compiler flags, including per-file and per-function compilation timing outputs. Additional inspection areas include Objective-C bridging overhead, module planning delays, broad access control usage, missing explicit type annotations, and complex SwiftUI expressions that increase compiler workload. Recommendations are separated into code-level, project-level, and module-level categories so developers can clearly prioritize optimization work.

This skill is intended for iOS and macOS developers, build engineers, and teams maintaining medium to large Swift codebases where compile performance has become a productivity issue. It is especially useful for projects with heavy SwiftUI usage, mixed Swift and Objective-C integration, macro-heavy architectures, or large monolithic modules that produce slow incremental builds. The skill is best used during performance investigations, CI optimization efforts, compiler regression analysis, or before large-scale refactoring work intended to improve developer iteration speed.

FAQ

What types of build issues can this skill analyze?

The skill focuses on Swift and mixed-language Xcode compilation bottlenecks, including slow CompileSwiftSources tasks, long type-checking operations, expensive SwiftEmitModule phases, incremental build invalidation, and compiler workload caused by bridging or complex expressions.

Does this skill modify source code or Xcode project settings automatically?

No. The skill is analysis-focused and does not edit source files or build settings without explicit developer approval. It prefers temporary diagnostic compiler flags during investigation.

What diagnostic inputs are recommended for best results?

The skill works best with Build Timing Summary output, .build-benchmark artifacts, and Swift frontend diagnostic outputs generated from compiler flags such as -warn-long-expression-type-checking, -debug-time-compilation, and related timing diagnostics.

Is this skill compatible with mixed Swift and Objective-C projects?

Yes. The analysis specifically includes investigation of Objective-C bridging overhead, bridging headers, and generated Swift-to-Objective-C compilation surfaces that can increase compile times.

Can this skill determine whether a bottleneck affects wall-clock build time or only compiler workload?

Yes. The skill distinguishes between serial bottlenecks and highly parallelized compile workloads, labeling recommendations appropriately when improvements mainly reduce compiler workload rather than total build wait time.

All Files

5 files
references/recommendation-format.md2.8 KB
View
references/build-optimization-sources.md7.7 KB
View
references/code-compilation-checks.md5.8 KB
View
scripts/diagnose_compilation.py9.9 KB
View
SKILL.md5.3 KB
View

Install xcode-compilation-analyzer

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill