Przejdź do treści
Biblioteka skilli
Programowanie · Analiza

spm-build-analysis

/spm-build-analysis

Analizuje zależności Swift Package Manager, pluginy i moduły, które spowalniają budowy w Xcode.

Repozytorium
homeclaw ↗
Licencja
MIT
Ostatnia zmiana repozytorium
13.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
5
Skrypty
1
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 13.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scripts/check_spm_pins.py

Co robi i kiedy

Analizuje zależności Swift Package Manager, pluginy i moduły, które spowalniają budowy w Xcode.

Oryginalny opis (EN)

Analyze Swift Package Manager dependencies, package plugins, module variants, and CI-oriented build overhead that slow Xcode builds. Use when a developer suspects packages, plugins, or dependency graph shape are hurting clean or incremental build performance, mentions SPM slowness, package resolution time, build plugin overhead, duplicate module builds from configuration drift, circular dependencies between modules, oversized modules needing splitting, or modularization best practices.

Jak działa

  1. Core Rules
  2. What To Inspect
  3. Verification Before Recommending
  4. Focus Areas
  5. Modular SDK Migration Caveat
  6. Explicit Module Dependency Angle
  7. Reporting Format
  8. Additional Resources
Sekcje z nagłówków SKILL.md, w oryginale · 89 linii, 761 słów
Podgląd SKILL.md
---
name: spm-build-analysis
description: Analyze Swift Package Manager dependencies, package plugins, module variants, and CI-oriented build overhead that slow Xcode builds. Use when a developer suspects packages, plugins, or dependency graph shape are hurting clean or incremental build performance, mentions SPM slowness, package resolution time, build plugin overhead, duplicate module builds from configuration drift, circular dependencies between modules, oversized modules needing splitting, or modularization best practices.
---

# 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:
  ```bash
  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`](../xcode-project-analyzer/SKILL.md) or [`xcode-compilation-analyzer`](../xcode-compilation-analyzer/SKILL.md) 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](references/spm-analysis-checks.md)
- For the shared recommendation structure, see [references/recommendation-format.md](references/recommendation-format.md)
- For source citations, see [references/build-optimization-sources.md](references/build-optimization-sources.md)
Pliki w paczce (5)
  • SKILL.md 6 KB
  • references/build-optimization-sources.md 8 KB
  • references/recommendation-format.md 3 KB
  • references/spm-analysis-checks.md 7 KB
  • scripts/check_spm_pins.py 5 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · omarshahine/homeclaw100MIT
carloshpdoc/ios-workflow-claude100Apache-2.0

Migawka bazy z 13.11.2026 · wersja paczki 13db428ec927 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 5 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100swift-package-manager
    Obsługuje Swift Package Manager: manifest Package.swift, zależności z regułami wersji, targety i produkty, zasoby przez Bundle.module, pakiety lokalne i dodawanie pakietów w Xcode.
  • 100flutter-spm
    Migruje zależności wtyczek Flutter dla iOS i macOS z CocoaPods do Swift Package Manager (SPM).
  • 100axiom-resolve-spm
    Rozwiązuje problemy z Swift Package Manager: błędy rozwiązywania pakietów, „no such module”, zduplikowane symbole w linkerze, konflikty wersji i zgodność pakietów ze Swift 6.
  • 100capacitor-plugin-spm-support
    Dodaje obsługę Swift Package Manager do istniejącej wtyczki Capacitor: manifest Package.swift, zastąpienie mostów Objective-C protokołem CAPBridgedPlugin, aktualizacja .gitignore, pliku projektu Xcode i package.json.
  • 100swift-tooling
    Konfiguruje pakiety SPM, SwiftLint i ustawienia buildu w projektach Swift oraz pilnuje jakości kodu.
  • 100xcode
    Wspiera pracę w Xcode: Swift i SwiftUI, symulatory iOS i macOS, Xcode Cloud, profilowanie Instruments, Swift Package Manager, debugowanie LLDB i podpisywanie.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.