xcode-compilation-analyzer

Diagnose Swift compile hotspots and produce ranked source-level optimization recommendations.

3|Updated Jun 15, 2026
One-click install
npx skills add https://github.com/patrickserrano/lacquer --skill xcode-compilation-analyzer-patrickserrano
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: xcode-compilation-analyzer
Source: https://github.com/patrickserrano/lacquer/tree/main/profiles/ios/skills/xcode-compilation-analyzer
Command: npx skills add https://github.com/patrickserrano/lacquer --skill xcode-compilation-analyzer-patrickserrano

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Slow Xcode builds caused by expensive Swift type-checking, oversized modules, and mixed-language bridging are hard to localize. This Skill turns build timing summaries and Swift frontend diagnostics into a ranked, evidence-backed optimization plan so developers know exactly which files and expressions to fix first. ## Core Features & Use Cases - Hotspot Detection: Runs a diagnostic build with -warn-long-function-bodies and -warn-long-expression-type-checking thresholds, then parses warnings into a ranked JSON artifact of the slowest functions and expressions. - Build Timing Analysis: Interprets Build Timing Summary categories such as CompileSwiftSources, SwiftEmitModule, and Planning Swift module to distinguish serial bottlenecks from parallelized workload. - Recommendation Reporting: Produces recommendations in a shared structured format with observed evidence, expected wall-clock impact, confidence, actionability class, and approval requirements. - Use Case: A developer notices clean builds taking minutes and incremental builds stalling after one-line changes. The Skill runs the diagnostics script, finds a 900ms type-checking expression in a monolithic SwiftUI body, and recommends decomposing it into typed subviews with an estimated impact. ## Quick Start Ask the assistant to analyze why your Xcode project's Swift compilation is slow and produce a ranked optimization plan using the compilation diagnostics build.

Frequently Asked Questions about xcode-compilation-analyzer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find slow type-checking expressions in Swift code?▼

Run a build with -Xfrontend -warn-long-expression-type-checking and -warn-long-function-bodies set to a millisecond threshold. The diagnostics script automates this via xcodebuild and outputs a ranked JSON list of functions and expressions exceeding the threshold.

How to analyze Xcode build time with the timing summary?▼

Use xcodebuild -showBuildTimingSummary or Xcode's Build With Timing Summary to see per-category durations. Rank categories like CompileSwiftSources, SwiftEmitModule, and Planning Swift module to identify whether the bottleneck is compilation volume or a few extreme hotspots.

Why is SwiftEmitModule slow in incremental builds?▼

SwiftEmitModule can exceed 60 seconds after a single-line change when a module is too large or heavily macro-dependent. Narrowing the public API surface with stricter access control or splitting the module reduces this recurring cost.

Does this Skill modify my source code or build settings automatically?▼

No. It performs analysis only and prefers ad hoc compiler flag injection over persistent project edits. Every recommendation is marked with an approval_required flag, and no source or build setting changes happen without explicit developer approval.

When should compilation findings be escalated to project-level analysis?▼

Escalate when build scripts dominate instead of compilation, module reuse is blocked by project settings, or Planning Swift module overhead points to input invalidation. The Skill hands off to xcode-project-analyzer for those configuration-level causes.