Skip to main content
swift-common

Cross-platform Swift utilities for Apple platforms — Foundation Core + SwiftUI UI, from a single SwiftPM package.

App.swift
import Foundation
import MatrixSwiftBaseCore

// Helpers
let clamped = MathHelper.clamp(150, min: 0, max: 100)
try await SleepHelper.milliseconds(250)
let token = RandomHelper.string(length: 32)

// Networking
struct User: Decodable { let id: Int; let name: String }
struct Me: Endpoint { let path = "/users/me" }

let client = APIClient(baseURL: URL(string: "https://api.example.com")!)
let user: User = try await client.send(Me())
.package(url: "https://github.com/rtorcato/swift-common", branch: "main")

Use with AI

A skill ships in the repo so AI coding tools use swift-common the way it's meant to be used.

Read the rules →
Any coding agent
Pull the skill into any tool the skills CLI supports.
npx skills add https://github.com/rtorcato/swift-common --skill swift-common
Claude Code
The repo is its own plugin marketplace — register it once, then install the plugin.
/plugin marketplace add rtorcato/swift-common
/plugin install swift-common@swift-common
Cursor, Copilot, Codex
They read AGENTS.md from the repo root. Copy it into your project's agent config.
https://github.com/rtorcato/swift-common/blob/main/AGENTS.md
Two products, pay-what-you-use
Two products, pay-what-you-use
Core ships Foundation-only utilities. UI adds SwiftUI on top. Import only what you need.
Every Apple platform
Every Apple platform
iOS 16+, macOS 13+, tvOS 16+, watchOS 9+. Multi-platform builds verified in CI.
Modern Swift
Modern Swift
async / await throughout. Sendable-ready. Built on the latest stable toolchain.
130+ utilities
130+ utilities
Helpers, extensions, networking, managers, SwiftUI components, modifiers, and styles.

Core and UI, side by side

Two SwiftPM products. Four Apple platforms. 130+ types organised by what they need at compile time.

View full API →

Sibling projects

More from @rtorcato — same conventions, same release pipeline.