Swift Expert
Jeffallan/claude-skills
Builds Swift apps for Apple platforms with SwiftUI, protocol-oriented design, async/await, actors and Sendable checks, verified with swift build and swift test.
Swift idioms and best practices: value types, Optionals hygiene, protocol-oriented design, async/await and Actor concurrency, and XCTest.
$ npx skills add irahardianto/awesome-agv --skill swift-idioms -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install irahardianto/awesome-agv swift-idioms --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/irahardianto/awesome-agv.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/swift-idioms .claude/skills/swift-idioms && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "swift-idioms" agent skill from https://github.com/irahardianto/awesome-agv/tree/main/.agents/skills/swift-idioms into .claude/skills/swift-idioms/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-idioms", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/irahardianto/awesome-agv/tree/main/.agents/skills/swift-idiomsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add irahardianto/awesome-agv --skill swift-idioms -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install irahardianto/awesome-agv swift-idioms --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/irahardianto/awesome-agv.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/swift-idioms .agents/skills/swift-idioms && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "swift-idioms" agent skill from https://github.com/irahardianto/awesome-agv/tree/main/.agents/skills/swift-idioms into .agents/skills/swift-idioms/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-idioms", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add irahardianto/awesome-agv --skill swift-idioms -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install irahardianto/awesome-agv swift-idioms --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/irahardianto/awesome-agv.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/swift-idioms .cursor/skills/swift-idioms && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "swift-idioms" agent skill from https://github.com/irahardianto/awesome-agv/tree/main/.agents/skills/swift-idioms into .cursor/skills/swift-idioms/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-idioms", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/irahardianto/awesome-agv.git --path .agents/skills/swift-idioms--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add irahardianto/awesome-agv --skill swift-idioms -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install irahardianto/awesome-agv swift-idioms --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/irahardianto/awesome-agv.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/swift-idioms .gemini/skills/swift-idioms && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "swift-idioms" agent skill from https://github.com/irahardianto/awesome-agv/tree/main/.agents/skills/swift-idioms into .gemini/skills/swift-idioms/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-idioms", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install irahardianto/awesome-agv swift-idiomsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add irahardianto/awesome-agv --skill swift-idioms -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/irahardianto/awesome-agv.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/swift-idioms .github/skills/swift-idioms && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "swift-idioms" agent skill from https://github.com/irahardianto/awesome-agv/tree/main/.agents/skills/swift-idioms into .github/skills/swift-idioms/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-idioms", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add irahardianto/awesome-agv --skill swift-idioms -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install irahardianto/awesome-agv swift-idioms --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/irahardianto/awesome-agv.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/swift-idioms .opencode/skills/swift-idioms && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "swift-idioms" agent skill from https://github.com/irahardianto/awesome-agv/tree/main/.agents/skills/swift-idioms into .opencode/skills/swift-idioms/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "swift-idioms", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
swift-idiomsSwift idioms and best practices: value types, Optionals hygiene, protocol-oriented design, async/await and Actor concurrency, and XCTest.
Swift Idioms is an agent skill from irahardianto/awesome-agv. Swift idioms and best practices: value types, Optionals hygiene, protocol-oriented design, async/await and Actor concurrency, and XCTest. Use when writing, refactoring, or reviewing Swift iOS, macOS, or server-side code.
Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Mobile, covering iOS development and Async programming. It works with iOS and macOS. The repository describes itself as: Comprehensive sets of standards and practices designed to elevate the capabilities of AI coding agents. The licence is MIT.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 9e997ba. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are swift).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Swift Idioms loads about 2.1k tokens when it runs. Until then it costs about 58 tokens; SKILL.md has 290 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from irahardianto/awesome-agv at commit 9e997ba, republished under its MIT licence (© irahardianto). 290 words, ~2,120 tokens.
.claude/skills/swift-idioms/SKILL.md (or your agent's skills folder).Swift rewards value types, optionals, and protocol-oriented design. Idiomatic Swift = safe, expressive, Swifty.
Scope: Swift coding idioms. Test naming: .agents/rules/testing-strategy.md.
Prefer structs over classes — value semantics by default. Classes only for identity, inheritance, or reference counting.
Optionals — never force-unwrap (!) in production:
// ✅ Guard let for early exit
guard let task = storage.findById(id) else {
throw TaskError.notFound(id)
}
// ✅ Optional chaining
let title = task?.title ?? "Untitled"
// ✅ if let for conditional binding
if let deadline = task.deadline {
scheduleReminder(for: deadline)
}
// ❌ Force unwrap — crash risk
let task = storage.findById(id)!Property wrappers for reusable behavior:
@propertyWrapper
struct Clamped<Value: Comparable> {
var wrappedValue: Value {
didSet { wrappedValue = min(max(wrappedValue, range.lowerBound), range.upperBound) }
}
let range: ClosedRange<Value>
init(wrappedValue: Value, _ range: ClosedRange<Value>) {
self.range = range
self.wrappedValue = min(max(wrappedValue, range.lowerBound), range.upperBound)
}
}
struct Task {
@Clamped(0...100) var progress: Int = 0
}For universal error handling principles, see
.agents/rules/error-handling-principles.md.
Typed throws (Swift 6) or Error protocol:
enum TaskError: Error, LocalizedError {
case notFound(String)
case validationFailed(field: String, message: String)
case storageUnavailable
var errorDescription: String? {
switch self {
case .notFound(let id): "Task '\(id)' not found"
case .validationFailed(let field, let msg): "Validation failed on \(field): \(msg)"
case .storageUnavailable: "Storage is unavailable"
}
}
}
func getTask(id: String) throws(TaskError) -> Task { ... }Result type for async callbacks (pre-async/await):
func fetchTask(id: String) async -> Result<Task, TaskError> { ... }do/catch with pattern matching:
do {
let task = try getTask(id: "123")
process(task)
} catch TaskError.notFound(let id) {
logger.warn("Task not found", metadata: ["taskId": id])
} catch {
logger.error("Unexpected error", metadata: ["error": "\(error)"])
}defer for cleanup:
func processFile(at path: String) throws -> Data {
let handle = try FileHandle(forReadingFrom: URL(fileURLWithPath: path))
defer { handle.closeFile() } // ✅ Always runs on exit
return handle.readDataToEndOfFile()
}Protocols over abstract classes:
// ✅ Interface defined as protocol
protocol TaskStorage {
func getById(_ id: String) async throws -> Task?
func save(_ task: Task) async throws
}
// ✅ Production implementation
struct PostgresTaskStorage: TaskStorage {
let pool: ConnectionPool
func getById(_ id: String) async throws -> Task? {
try await pool.query("SELECT * FROM tasks WHERE id = $1", [id]).first
}
func save(_ task: Task) async throws {
try await pool.execute("INSERT INTO tasks ...", [task.id, task.title])
}
}
// ✅ Test implementation
struct MockTaskStorage: TaskStorage {
var tasks: [Task] = []
func getById(_ id: String) async throws -> Task? {
tasks.first { $0.id == id }
}
func save(_ task: Task) async throws {
tasks.append(task)
}
}Protocol extensions for default implementations:
protocol Identifiable {
var id: String { get }
}
extension Identifiable {
var isNew: Bool { id.isEmpty }
}Associated types for generic protocols:
protocol Repository {
associatedtype Entity
func findById(_ id: String) async throws -> Entity?
func save(_ entity: Entity) async throws
}Structured concurrency with async/await:
func loadDashboard() async throws -> Dashboard {
async let user = fetchUser(id)
async let tasks = fetchTasks(userId: id)
async let stats = fetchStats()
return Dashboard(
user: try await user,
tasks: try await tasks,
stats: try await stats
)
}@Sendable for closures crossing concurrency domains.
Actors for thread-safe mutable state:
actor TaskCache {
private var cache: [String: Task] = [:]
func get(_ id: String) -> Task? { cache[id] }
func set(_ id: String, task: Task) { cache[id] = task }
func invalidate(_ id: String) { cache.removeValue(forKey: id) }
}
// ✅ Safe concurrent access
let cache = TaskCache()
await cache.set("123", task: newTask)
if let task = await cache.get("123") { ... }TaskGroup for dynamic concurrency:
func fetchAllTasks(ids: [String]) async throws -> [Task] {
try await withThrowingTaskGroup(of: Task.self) { group in
for id in ids {
group.addTask { try await fetchTask(id: id) }
}
return try await group.reduce(into: []) { $0.append($1) }
}
}remove(at:) not removeItem(atIndex:).-able/-ible: Codable, Identifiable.make prefix: makeIterator().isEmpty, hasChanges, isValid.!) in production code — crashes at runtimevar when let suffices — always prefer immutabilitytry? silently discarding errors — log or handle the error caseif let pyramids — use guard let for early returns// ❌ Pyramid of doom
if let user = getUser() {
if let tasks = getTasks(for: user) {
if let first = tasks.first {
process(first)
}
}
}
// ✅ Flat with guard
guard let user = getUser() else { return }
guard let tasks = getTasks(for: user), let first = tasks.first else { return }
process(first)XCTest or Swift Testing (6.0+). Mock via protocols.
// XCTest
final class TaskServiceTests: XCTestCase {
func testGetTask_returnsNotFound() async throws {
let storage = MockTaskStorage()
let service = TaskService(storage: storage)
do {
_ = try await service.getTask(id: "999")
XCTFail("Expected notFound error")
} catch TaskError.notFound(let id) {
XCTAssertEqual(id, "999")
}
}
}
// Swift Testing (6.0+)
@Test func getTask_returnsNotFound() async throws {
let storage = MockTaskStorage()
let service = TaskService(storage: storage)
#expect(throws: TaskError.notFound("999")) {
try await service.getTask(id: "999")
}
}| Tool | Purpose | Command |
|---|---|---|
swift-format | Formatting | swift-format -i -r Sources/ |
| SwiftLint | Linting | swiftlint lint --strict |
| Xcode Analyzer | Static analysis | Built-in |
© irahardianto, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/swift-idioms of irahardianto/awesome-agv.
Open the folder on GitHubat commit 9e997ba
Swift Idioms next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Swift Idioms this skillirahardianto/awesome-agv | 156 | — | ~2.1k | Automated safety check: Pass | MIT | |
| Swift ExpertJeffallan/claude-skills | 12k | — | ~1.5k | Automated safety check: Pass | MIT | |
| Swift ConcurrencyHoangNguyen0403/agent-skills-standard | 572 | — | ~545 | Automated safety check: Pass | MIT | |
| Swift ExpertFNOSP/FlyNarwhal | 509 | — | ~813 | Automated safety check: Pass | AGPL-3.0 | |
| Stellar iOS Mac SDKSoneso/stellar-ios-mac-sdk | 132 | — | ~4.3k | Automated safety check: Pass | Apache-2.0 | |
| iOS Networkingdpearson2699/swift-ios-skills | 1.2k | — | ~4.2k | Automated safety check: Pass | Custom licence |
Jeffallan/claude-skills
Builds Swift apps for Apple platforms with SwiftUI, protocol-oriented design, async/await, actors and Sendable checks, verified with swift build and swift test.
HoangNguyen0403/agent-skills-standard
Implement async/await, Actors, and structured concurrency in Swift.
FNOSP/FlyNarwhal
A skill your agent uses when building iOS/macOS applications with Swift 5.9+, SwiftUI, or async/await concurrency.
Soneso/stellar-ios-mac-sdk
Guides Stellar blockchain development in Swift using stellar-ios-mac-sdk.
dpearson2699/swift-ios-skills
Build, review, or improve networking code in iOS/macOS apps using URLSession with async/await, structured concurrency, and modern Swift patterns.
dotnet/skills
Resolves .NET runtime frames in Apple .ips crash logs to function names, source files and line numbers using dSYM symbols, atos and the Microsoft symbol server.
irahardianto/awesome-agv
Commits to one bold aesthetic direction, sets up a CSS token system for it, then builds the interface in Vue or plain HTML using those tokens.
irahardianto/awesome-agv
Profile-driven performance optimization protocol. An agent skill from irahardianto/awesome-agv.
irahardianto/awesome-agv
Coding conventions for Angular 19 and later: standalone components, signals, OnPush change detection, lazy routes and where RxJS still belongs.
irahardianto/awesome-agv
Rules for designing CI/CD pipelines in layers: universal lint, test and scan stages, container builds with SBOM attestation, and GitOps for orchestrated deployments.
irahardianto/awesome-agv
Hono lightweight web framework patterns: type-safe route handlers, middleware composition, Zod validation, and RPC clients for Cloudflare Workers, Node, or Bun.
irahardianto/awesome-agv
Mobile E2E testing patterns — Flutter integrationtest, Patrol, Maestro, golden testing, device matrix, and test data management.
Categories
Swift idioms and best practices: value types, Optionals hygiene, protocol-oriented design, async/await and Actor concurrency, and XCTest. Swift Idioms is an agent skill from irahardianto/awesome-agv. Swift idioms and best practices: value types, Optionals hygiene, protocol-oriented design, async/await and Actor concurrency, and XCTest.
Swift Idioms fits situations like: reviewing Swift iOS; server-side code.
Run `npx skills add irahardianto/awesome-agv --skill swift-idioms -a claude-code`. Or copy the skill folder (.agents/skills/swift-idioms in irahardianto/awesome-agv) into .claude/skills/swift-idioms in your project. Claude Code loads it when a task matches its description.
Run `npx skills add irahardianto/awesome-agv --skill swift-idioms -a codex`. Or copy the skill folder (.agents/skills/swift-idioms in irahardianto/awesome-agv) into .agents/skills/swift-idioms in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add irahardianto/awesome-agv --skill swift-idioms -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/swift-idioms, .gemini/skills/swift-idioms, .github/skills/swift-idioms and .opencode/skills/swift-idioms in your project.
SKILL.md names no scripts, command-line tools or credentials: Swift Idioms is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Swift Idioms is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.1k tokens (SKILL.md is roughly 8.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Swift Idioms: Swift Expert (Jeffallan/claude-skills, 12k stars), Swift Concurrency (HoangNguyen0403/agent-skills-standard, 572 stars), Swift Expert (FNOSP/FlyNarwhal, 509 stars) and Stellar iOS Mac SDK (Soneso/stellar-ios-mac-sdk, 132 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
irahardianto (a GitHub user) maintains it in irahardianto/awesome-agv, which has 156 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on October 5, 2026.
Source: irahardianto/awesome-agv on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.