Claude Marketplaces
SkillsMCP serversMarketplacesDigestTools
Submit

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP servers by category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control
Claude Marketplaces

An independent directory of skills, plugins and MCP servers for Claude Code. Not affiliated with Anthropic.

Browse

  • Skills
  • MCP servers
  • Marketplaces
  • Weekly digest
  • Skill index
  • MCP index
  • Marketplace index

Site

  • About
  • Tools
  • Submit
  • Feedback
  • Privacy
  • llms.txt
  • Plugins reference

Maker

  • Snug
  • Agent Caffeine
  • knobs
  • Wax
  • Vectoys
  • mertduzgun.com
Crafted at
Skills/DevOps & CI/CD
avdlee avatar

Spm Build Analysis

avdlee/xcode-build-optimization-agent-skill

Points at your SPM dependencies when Xcode builds feel slow and you suspect packages are the culprit. It digs through Package.swift, checks for branch-pinned dependencies that should be tagged, flags build plugins adding overhead, and spots configuration drift that forces duplicate module builds. The verification rules are smart: it won't blame a package in your Vendor folder unless it's actually linked in the project file. One thing worth knowing is the modular SDK caveat. Splitting a monolithic package into separate targets doesn't automatically speed things up because you're trading one big compile for many small ones. Always benchmark before migrating for performance reasons.

installs
3.4K
GitHub stars
1.3K
last updated
Aug 21, 2026
View on GitHubSave

Install

$ npx -y skills add avdlee/xcode-build-optimization-agent-skill --skill spm-build-analysis --agent claude-code

Installs into .claude/skills of the current project.

Files

SPM Build Analysis

Use this skill when package structure, plugins, or dependency configuration are likely contributing to slow Xcode builds.

Core Rules

  • Treat package analysis as evidence gathering first, not a mandate to replace dependencies.
  • Separate package-graph issues from project-setting issues.
  • Do not rewrite package manifests or dependency sources without explicit approval.

What To Inspect

  • Package.swift and Package.resolved
  • local packages vs remote packages
  • package plugin and build-tool usage
  • binary target footprint
  • dependency layering, repeated imports, and potential cycles
  • build logs or timing summaries that show package-related work

Verification Before Recommending

Before including any local package in a recommendation, verify that it is actually part of the project's dependency graph. A Vendor/ directory may contain packages that are not linked to any target.

  • Check project.pbxproj for XCLocalSwiftPackageReference entries that reference the package path.
  • Check XCSwiftPackageProductDependency entries to confirm the package's product is linked to at least one target.
  • If a local package exists on disk but is not referenced in the project, do not include it in build-time recommendations.

When recommending version pins for branch-tracked dependencies:

  • Use the helper script to scan all branch-pinned dependencies at once:
    python3 scripts/check_spm_pins.py --project App.xcodeproj
    
    This checks git ls-remote --tags for each branch-pinned package and reports which have tags available for pinning.
  • If no tags exist, recommend pinning to a specific commit revision hash for determinism instead.
  • Note which packages are branch-pinned because the upstream simply has no tags, versus packages that have tags but are intentionally tracking a branch.

Focus Areas

  • package graph shape and how much work changes trigger downstream
  • plugin overhead during local development and CI
  • checkout or fetch cost signals that show up in clean environments
  • configuration drift that forces duplicate module builds
  • risks from package targets that use different macros or options while sharing dependencies
  • dependency direction violations (features depending on each other instead of shared lower layers)
  • circular dependencies between modules (extract shared contracts into a protocol module)
  • oversized modules (200+ files) that widen incremental rebuild scope
  • umbrella modules using @_exported import that create hidden dependency chains
  • missing interface/implementation separation that blocks build parallelism
  • test targets depending on the app target instead of the module under test
  • Swift macro rebuild cascading: heavy use of Swift macros (e.g., TCA, swift-syntax-based libraries) can cause a trivial source change to cascade into near-full rebuilds because macro expansion invalidates downstream modules
  • swift-syntax building universally (all architectures) when no prebuilt binary is available, adding significant clean-build overhead
  • multi-platform build multiplication: adding a secondary platform target (e.g., watchOS) can cause shared SPM packages to build multiple times (e.g., iOS arm64, iOS x86_64, watchOS arm64), multiplying SwiftCompile, SwiftEmitModule, and ScanDependencies tasks

Modular SDK Migration Caveat

Migrating a dependency from a monolithic target to a modular multi-target SDK (e.g., replacing one umbrella library with separate Core, RUM, Logs, Trace modules) does not automatically reduce build time. Modular targets increase the number of SwiftCompile, SwiftEmitModule, and ScanDependencies tasks because each target must be compiled, scanned, and emit its module independently. The build-time trade-off depends on the project's parallelism headroom and how many of the modular targets are actually needed.

When considering a modular SDK migration:

  • Compare the total SwiftCompile task count before and after.
  • Benchmark both configurations before recommending the migration for build speed.
  • If the motivation is API surface reduction (importing only what you use), note that build time may stay flat or increase while import hygiene improves.
  • Only recommend modular SDK migration for build speed when the project currently compiles large portions of the monolithic SDK that it does not use, and the modular alternative lets it skip those unused portions entirely.

Explicit Module Dependency Angle

When the same module appears multiple times in timing output, investigate whether different package or target options are forcing extra module variants. Uniform options often matter more than shaving a small amount of source code.

Reporting Format

For each finding, include:

  • evidence
  • affected package or plugin
  • likely clean-build vs incremental-build impact
  • CI impact if relevant
  • estimated impact
  • approval requirement

If the main problem is not package-related, hand off to xcode-project-analyzer or xcode-compilation-analyzer by reading the target skill's SKILL.md and applying its workflow to the same project context.

Additional Resources

  • For the detailed audit checklist, see references/spm-analysis-checks.md
  • For the shared recommendation structure, see references/recommendation-format.md
  • For source citations, see references/build-optimization-sources.md
SKILL.md on GitHub

Sponsors

SnugThe clipboard manager you and your agent can use, safelyAgent CaffeineClose your lid, come back to finished workWaxBlock anything with supervision, without erasing your iPhoneOpen StepsSponsoredFree and open-source skills that make AI coding agents easier to understand, verify, and control.

Details

Repository
github.com/avdlee/xcode-build-optimization-agent-skill
Categories
DevOps & CI/CD, AI & Agent Building, Debugging, Mobile Development
First seen
Apr 16, 2026

More from avdlee/xcode-build-optimization-agent-skill

All 6
  • Xcode Build Benchmark3.4K
  • Xcode Build Fixer3.6K
  • Xcode Build Orchestrator3.6K
  • Xcode Project Analyzer3.5K
  • Xcode Compilation Analyzer3.4K

Recommended

More DevOps & CI/CD
1getsentry avatarsentry-setup-ai-monitoringgetsentry/sentry-for-aiSetup Sentry AI Agent Monitoring in any project. Use when asked to monitor LLM calls, track AI agents, track conversations, or instrument OpenAI/Anthropic/Verce3Kinstalls
2elastic avatarobservability-service-healthelastic/agent-skillsAssess APM service health using SLOs, alerts, ML, throughput, latency, error rate, and dependencies. Use when checking service status, performance, or when the 2.9Kinstalls
3elastic avatarobservability-edot-python-instrumentelastic/agent-skillsInstrument a Python application with the Elastic Distribution of OpenTelemetry (EDOT) Python agent for automatic tracing, metrics, and logs. Use when adding obs2.7Kinstalls
4elastic avatarobservability-edot-java-instrumentelastic/agent-skillsInstrument a Java application with the Elastic Distribution of OpenTelemetry (EDOT) Java agent for automatic tracing, metrics, and logs. Use when adding observa2.7Kinstalls
5elastic avatarobservability-edot-dotnet-instrumentelastic/agent-skillsInstrument a .NET application with the Elastic Distribution of OpenTelemetry (EDOT) .NET SDK for automatic tracing, metrics, and logs. Use when adding observabi2.7Kinstalls
6elastic avatarobservability-edot-dotnet-migrateelastic/agent-skillsMigrate a .NET application from the classic Elastic APM .NET agent to the EDOT .NET SDK. Use when switching from Elastic.Apm.* packages to Elastic.OpenTelemetry2.7Kinstalls