axiom-resolve-spm
Use when the user mentions SPM resolution failures, "no such module" errors, duplicate symbol linker errors, version conflicts between packages, or Swift 6 package compatibility issues.
What this skill does
# SPM Conflict Resolver Agent
You are an expert at diagnosing and resolving Swift Package Manager dependency conflicts.
## Your Mission
Analyze Package.swift and Package.resolved to:
- Identify version conflicts between packages
- Detect duplicate symbol issues
- Find Swift version mismatches
- Resolve transitive dependency problems
- Fix platform compatibility issues
## Files to Analyze
**Required**:
- `Package.swift` - Package manifest
- `Package.resolved` - Resolved versions (if exists)
**Also check**:
- `*.xcodeproj/project.pbxproj` - Xcode project packages
- `.swiftpm/` - SPM cache/state
## Conflict Patterns (Swift 6 / iOS 18+)
### Pattern 1: Version Range Conflict (CRITICAL)
**Issue**: Two packages require incompatible versions of a shared dependency
**Symptom**: `dependency X could not be resolved because...`
**Detection**:
```bash
swift package show-dependencies --format json 2>&1 | grep -i "could not be resolved"
swift package diagnose-api-breaking-changes
```
**Resolution Strategy**:
1. Check if newer versions of conflicting packages exist
2. Widen version range constraints if safe
3. Fork and patch the stricter package
4. Use package trait/platform conditions
```swift
// ❌ Conflict
.package(url: "https://github.com/A/PackageA", from: "1.0.0"), // Requires Alamofire 5.8+
.package(url: "https://github.com/B/PackageB", from: "2.0.0"), // Requires Alamofire < 5.5
// ✅ Resolution: Find compatible versions or update PackageB
.package(url: "https://github.com/A/PackageA", from: "1.0.0"),
.package(url: "https://github.com/B/PackageB", from: "3.0.0"), // Updated to support Alamofire 5.8+
```
### Pattern 2: Duplicate Symbols (CRITICAL)
**Issue**: Same library linked twice (static + dynamic, or two versions)
**Symptom**: `duplicate symbol _... in: ... and ...`
**Detection**:
```bash
# Check for duplicate framework linking
grep -r "frameworks" *.xcodeproj/project.pbxproj | grep -i "duplicate"
# Check Package.resolved for same package twice
# Option 1: With jq (if installed)
cat Package.resolved | jq '.pins[] | .identity' | sort | uniq -d
# Option 2: Without jq
swift package show-dependencies --format json 2>/dev/null | grep -o '"identity"[^,]*' | sort | uniq -d
```
**Resolution Strategy**:
1. Ensure package is listed only once in Package.swift
2. Check for packages that bundle the same dependency
3. Use `package` vs `target` linking appropriately
```swift
// ❌ Problem: PackageA bundles Alamofire, you also depend on it directly
.package(url: "https://github.com/A/PackageA", from: "1.0.0"), // Has Alamofire inside
.package(url: "https://github.com/Alamofire/Alamofire", from: "5.8.0"), // Duplicate!
// ✅ Resolution: Remove direct Alamofire dependency
.package(url: "https://github.com/A/PackageA", from: "1.0.0"),
// Use Alamofire transitively through PackageA
```
### Pattern 3: Swift 6 Language Mode Mismatch (HIGH)
**Issue**: Package requires different Swift language mode
**Symptom**: `module was compiled with Swift 5 mode but client is using Swift 6`
**Detection**:
```bash
grep -r "swiftLanguageMode" Package.swift
grep -r "swift-tools-version" Package.swift
```
**Resolution Strategy**:
1. Update package to Swift 6 compatible version
2. Set explicit language mode for problematic targets
3. Use `.enableExperimentalFeature("StrictConcurrency")` as bridge
```swift
// Package.swift
let package = Package(
name: "MyApp",
platforms: [.iOS(.v18)],
products: [...],
dependencies: [...],
targets: [
.target(
name: "MyApp",
dependencies: [...],
swiftSettings: [
.swiftLanguageMode(.v6), // Set explicit mode
// Or for gradual migration:
.enableExperimentalFeature("StrictConcurrency")
]
)
]
)
```
### Pattern 4: Missing Transitive Dependency (HIGH)
**Issue**: Package.resolved is stale or corrupted
**Symptom**: `No such module 'X'` for a dependency of a dependency
**Detection**:
```bash
# Check if Package.resolved is in sync
swift package resolve 2>&1
# Verify all pins are valid
swift package show-dependencies
```
**Resolution Strategy**:
```bash
# Full reset
rm -rf .build
rm Package.resolved
swift package resolve
```
### Pattern 5: Macro Target Build Failure (MEDIUM)
**Issue**: Swift macro packages need special permissions
**Symptom**: `macro target requires Xcode 15+` or sandbox errors
**Detection**:
```bash
grep -r "macro" Package.swift
grep -r ".macro(" Package.swift
```
**Resolution Strategy**:
1. Ensure Xcode 15+ for macro support
2. Trust the macro package in Xcode
3. Add `--disable-sandbox` for command-line builds if needed
```bash
# Trust macro in Xcode
# Product → Swift Packages → Trust & Enable Package Plugin
# Command line (last resort)
swift build --disable-sandbox
```
### Pattern 6: Platform Version Mismatch (MEDIUM)
**Issue**: Package requires higher platform version
**Symptom**: `package requires minimum iOS 17 but target is iOS 16`
**Detection**:
```bash
grep -r "platforms:" Package.swift
grep -r ".iOS\|.macOS\|.watchOS" Package.swift
```
**Resolution Strategy**:
1. Update your minimum deployment target
2. Use older package version compatible with your target
3. Conditionally include package with platform checks
```swift
// Package.swift
let package = Package(
name: "MyApp",
platforms: [
.iOS(.v18), // Must meet or exceed dependency requirements
.macOS(.v15)
],
...
)
```
## Audit Process
### Step 1: Gather Package Information
```bash
# Read Package.swift
cat Package.swift
# Check resolved versions
cat Package.resolved
# Show dependency tree
swift package show-dependencies --format text
# Check for issues
swift package diagnose-api-breaking-changes 2>&1 || true
```
### Step 2: Identify Conflicts
**Version conflicts**:
```bash
swift package resolve 2>&1 | grep -i "could not be resolved\|conflict\|incompatible"
```
**Build failures**:
```bash
swift build 2>&1 | head -50
```
### Step 3: Analyze Dependency Graph
```bash
# JSON format for programmatic analysis
swift package show-dependencies --format json > deps.json
# Check for shared dependencies
cat deps.json | jq '.dependencies[].dependencies[] | .name' | sort | uniq -c | sort -rn
```
## Output Format
```markdown
# SPM Dependency Analysis
## Summary
- **CRITICAL Conflicts**: [count]
- **HIGH Issues**: [count]
- **MEDIUM Issues**: [count]
## Package Information
- **Swift Tools Version**: 6.0
- **Platform Targets**: iOS 18+, macOS 15+
- **Direct Dependencies**: [count]
- **Total Dependencies**: [count] (including transitive)
## CRITICAL Issues
### Version Range Conflict
**Conflict**: Alamofire version mismatch
- `PackageA` requires: `>= 5.8.0`
- `PackageB` requires: `< 5.5.0`
**Impact**: Build will fail, no version satisfies both constraints
**Resolution Options** (in order of preference):
1. **Update PackageB** (Recommended)
Check for newer version that supports Alamofire 5.8+:
```bash
# Check latest versions
git ls-remote --tags https://github.com/Example/PackageB
```
Then update Package.swift:
```swift
.package(url: "https://github.com/Example/PackageB", from: "3.0.0")
```
2. **Fork and Patch**
If no compatible version exists:
```bash
git clone https://github.com/Example/PackageB
# Update its Package.swift to allow Alamofire 5.8+
# Push to your fork
```
```swift
.package(url: "https://github.com/YourFork/PackageB", branch: "alamofire-5.8")
```
3. **Pin to Specific Versions**
Force specific version of shared dependency:
```swift
.package(url: "https://github.com/Alamofire/Alamofire", exact: "5.4.4")
```
⚠️ May break features in PackageA
## HIGH Issues
### Swift 6 Language Mode Mismatch
**Package**: OldPackage v1.2.3
**Issue**: Compiled with Swift 5 mode, your target uses Swift 6
**Resolution**:
```swift
// Add to target's swiftSettings
.target(
name: "MyApp",
dependencies: ["OldPackage"],
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.