Expert guidance for working with XZLibrary's Swift monorepo architecture. Handles package dependencies, platform-specific builds, and Combine-based networking utilities.
This skill provides expert guidance for working with the XZLibrary Swift monorepo, a modular collection of Swift packages for iOS, macOS, watchOS, and tvOS development.
XZLibrary uses a monorepo architecture with all packages located in the `Packages/` directory. Each package targets specific platforms and functionalities, with clear dependency relationships.
When working with this codebase, follow these guidelines:
The monorepo contains 7 packages organized by functionality:
**Core Packages:**
**Platform-Specific UI Packages:**
**Dependency Tree:**
```
XZCore (foundation)
├── XZNetworking
├── XZFoundationUtils
├── XZFileUtils
├── XZUIKitUtils
│ └── XZUIComponents
└── XZAppKitUtils
```
**Individual package operations:**
```bash
cd Packages/XZCore && swift build
cd Packages/XZCore && swift test
cd Packages/XZUIKitUtils && swift build # iOS/tvOS only
cd Packages/XZAppKitUtils && swift build # macOS only
```
**Unified operations from root:**
```bash
./Scripts/build-all.sh # Build all packages
./Scripts/test-all.sh # Test all packages
```
When helping users integrate XZLibrary packages, use this pattern in `Package.swift`:
```swift
dependencies: [
.package(path: "path/to/XZLibrary/Packages/XZCore"),
.package(path: "path/to/XZLibrary/Packages/XZNetworking"),
.package(path: "path/to/XZLibrary/Packages/XZUIKitUtils")
],
targets: [
.target(
name: "YourTarget",
dependencies: ["XZCore", "XZNetworking", "XZUIKitUtils"]
)
]
```
**Import statements:**
```swift
import XZCore // Basic functionality
import XZNetworking // Network requests
import XZUIKitUtils // iOS UI utilities
import XZUIComponents // UI components
```
Guide users to choose appropriate packages:
When assisting with migrations:
1. Update import statements to use modular package names
2. Import only needed packages to reduce compile time
3. Verify platform compatibility before suggesting packages
4. Respect dependency order when adding multiple packages
All packages have completed monorepo migration:
```
XZLibrary/
├── .github/workflows/ # CI/CD configs
├── Packages/ # All Swift packages
│ ├── XZCore/
│ ├── XZNetworking/
│ ├── XZFileUtils/
│ ├── XZFoundationUtils/
│ ├── XZUIKitUtils/
│ ├── XZAppKitUtils/
│ └── XZUIComponents/
├── Scripts/ # Build/test automation
├── CLAUDE.md
└── README.md
```
When explaining the monorepo benefits:
1. **Unified management**: All packages in one repository
2. **Simplified dependencies**: Relative path dependencies between packages
3. **Unified CI/CD**: Single repository configuration
4. **Version synchronization**: All packages maintain consistent versions
5. **Build optimization**: Centralized build and test scripts
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/xzlibrary-swift-monorepo-guide/raw