Logo: Axiom Resolve Spm

Axiom Resolve Spm

CommunautéitBeléift
CharlesWiltgen
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.

Iwwersiicht

EditeurCharlesWiltgen
RepositoryAxiom
Skill-Nummaxiom-resolve-spm
Stären
1.2K
Forks
86
Matgeliwwert Dateien
1
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 1 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    CharlesWiltgen huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Axiom Resolve Spm an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/CharlesWiltgen/Axiom/tree/main/axiom-codex/skills/axiom-resolve-spm
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/CharlesWiltgen/Axiom.git /tmp/Axiom
mkdir -p .claude/skills
cp -r /tmp/Axiom/axiom-codex/skills/axiom-resolve-spm .claude/skills/axiom-resolve-spm
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Axiom Resolve Spm an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Axiom Resolve Spm automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Axiom Resolve Spm net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Note: This audit may use Bash commands to run builds, tests, or CLI tools.

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, or project.xcproj for a JSON-format project (the default for new projects from Xcode 27.2) - Xcode project packages. In project.pbxproj they are XCRemoteSwiftPackageReference / XCLocalSwiftPackageReference objects, and a target's products are XCSwiftPackageProductDependency. In project.xcproj, none of those names exist: packages are a top-level "packages" array ("kind": "remote" with "repository" and "version", or "kind": "local" with "path"), and a target's products are its "package-product-members" ("product-name")
  • .swiftpm/ - SPM cache/state

Project Package Relationships

Locate both inner filenames recursively, excluding dependency/cache directories. Check command -v xcproject, then use xcproject inspect --root . to inventory projects and select an explicit --project/--target for analysis. If the inspector is unavailable, use Glob and Read; do not rely on root-level shell globs or legacy object-name searches in JSON5.

Read complete structured values. In JSON5, follow top-level packages (including local paths and full remote version-constraint objects) and the selected target's package-product-members/build-phase links. Phase entries can be strings or objects. In OpenStep, follow PBXProject.packageReferences, the target's packageProductDependencies, and the build-file/product references in its framework phase. Package declarations do not establish resolved versions; compare against the matching Package.resolved and dependency graph. Structural inspection does not resolve packages.

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
# Inspect selected package-product and framework-phase relationships, then Read the graph.
xcproject inspect --project "$PROJECT" --target "$TARGET"

# 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")
  1. 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")
  2. 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"],
    swiftSettings: [
        // Enable Swift 6 for your code
        .swiftLanguageMode(.v6),
        // OldPackage will use its own mode
    ]
)

Or use gradual migration:

swift
.enableExperimentalFeature("StrictConcurrency")

Resolution Commands

bash
# Step 1: Clean SPM cache
rm -rf .build
rm -rf ~/Library/Caches/org.swift.swiftpm

# Step 2: Reset Package.resolved
rm Package.resolved

# Step 3: Resolve fresh
swift package resolve

# Step 4: Verify
swift build

# If in Xcode project
# File → Packages → Reset Package Caches
# File → Packages → Resolve Package Versions

Dependency Graph

MyApp
├── Alamofire 5.8.0
├── PackageA 2.0.0
│   └── Alamofire 5.8.0 ✓ (matches)
└── PackageB 3.1.0
    └── Alamofire 5.8.0 ✓ (matches)

Verification

After resolution:

bash
# Clean build
rm -rf .build && swift build

# Run tests
swift test

# Check for warnings
swift build 2>&1 | grep -i warning

## When No Issues Found

```markdown
# SPM Dependency Analysis

## Summary
No conflicts detected.

## Package Health
- ✅ All version constraints satisfied
- ✅ No duplicate dependencies
- ✅ Swift tools version compatible
- ✅ Platform requirements met

## Dependency Graph
[Show clean dependency tree]

## Recommendations
- Consider updating packages:
  ```bash
  swift package update
  • Check for security advisories:
    bash
    swift package diagnose-api-breaking-changes

## Common SPM Commands Reference

```bash
# Resolve dependencies
swift package resolve

# Update all packages
swift package update

# Update specific package
swift package update PackageName

# Show dependencies
swift package show-dependencies
swift package show-dependencies --format json

# Clean build
rm -rf .build

# Reset SPM cache (nuclear option)
rm -rf ~/Library/Caches/org.swift.swiftpm
rm -rf .build
rm Package.resolved
swift package resolve

# Diagnose issues
swift package diagnose-api-breaking-changes

# Edit package locally (for debugging)
swift package edit PackageName
swift package unedit PackageName

Xcode-Specific Commands

# In Xcode:
File → Packages → Reset Package Caches
File → Packages → Resolve Package Versions
File → Packages → Update to Latest Package Versions

# Trust macro package:
Product → Swift Packages → Trust & Enable Package Plugin

Invocation Examples

Prompts that should launch this agent:

Explicit command: Users can also invoke this agent directly with axiom-resolve-spm

Scope

Analyzes Package.swift and Package.resolved to diagnose and resolve Swift Package Manager dependency conflicts.

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill 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.

Firwat Axiom Resolve Spm op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Axiom Resolve Spm besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Axiom Resolve Spm an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/CharlesWiltgen/Axiom/tree/main/axiom-codex/skills/axiom-resolve-spm an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Axiom Resolve Spm benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Axiom Resolve Spm benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Axiom Resolve Spm domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Axiom Resolve Spm gratis?

Jo. CharlesWiltgen huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇