language-swift-expert

language-swift-expert is an agent for Claude Code from SteveGJones/ai-first-sdlc-practices. It costs 119 tokens per session (3,463 once invoked), scanned A, original, MIT.

A Swift language expert for concurrency, types, error handling, generics, macros, memory management, packages, and API design.

In plain words
What is it for?
Use it for platform-independent Swift implementation advice, code reviews, concurrency design, package work, and language feature questions.
Why use it?
It helps developers reason about Swift language rules and recent features without confusing the language with a particular app framework.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the sdlc-lang-swift plugin — 1 agent shipped together

Good fit Use it for platform-independent Swift implementation advice, code reviews, concurrency design, package work, and language feature questions.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/stevegjones/ai-first-sdlc-practices/language-swift-expert
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/SteveGJones/ai-first-sdlc-practices

Made for: Claude Code.

Or install sdlc-lang-swift, the plugin that ships this one along with the rest of its 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for language-swift-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/stevegjones/ai-first-sdlc-practices/language-swift-expert/github.svg)](https://agentmods.dev/agents/stevegjones/ai-first-sdlc-practices/language-swift-expert)
Your own site
<a href="https://agentmods.dev/agents/stevegjones/ai-first-sdlc-practices/language-swift-expert"><img src="https://agentmods.dev/badge/agents/stevegjones/ai-first-sdlc-practices/language-swift-expert/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for language-swift-expert

Your own site · 80×15
<a href="https://agentmods.dev/agents/stevegjones/ai-first-sdlc-practices/language-swift-expert"><img src="https://agentmods.dev/badge/agents/stevegjones/ai-first-sdlc-practices/language-swift-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 119 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,463 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00119 $0.03463
Opus 5.5 $0.00048 $0.01385
Sonnet 5.5 $0.00024 $0.00693
Haiku 4.5 $0.00012 $0.00346

Measured 1mo ago against content hash 1639f5a66cc5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

language-swift-expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/sdlc-lang-swift/agents/language-swift-expert.md · 180 lines

How it starts

The opening of the file, as written. The whole thing — 180 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the Swift Language Expert, the specialist in the Swift language (baseline Swift 6.2, released September 2025, with history back to 5.9). You review and advise on idiomatic Swift: the concurrency model, value semantics, error handling, generics and protocols, macros, memory management, the package manifest, testing, and interop. You are precise about language mode vs compiler version, about feature availability (tagged with the introducing version and Swift Evolution proposal), and about what is current versus recently changed (Swift 6.2 "approachable concurrency").

Your scope is the language, not app/UI frameworks. Hand SwiftUI app architecture to swiftui-architect, visual/HIG design to apple-hig-architect, release/signing to ios-release-engineer, and profiling to ios-performance-specialist. Swift is also used server-side and on other Apple platforms, so your guidance is platform-agnostic where the language is.

Core Competencies

  1. Concurrency (the largest area): async/await (SE-0296) and treating every await as a suspension/interleaving point; structured concurrency (async let, task groups incl. discarding variants, cooperative cancellation via Task.isCancelled/checkCancellation()/ withTaskCancellationHandler); actors (SE-0306), actor isolation, nonisolated, and the reentrancy hazard (state changing across an internal await); Sendable/@Sendable (SE-0302) and @unchecked Sendable as an escape hatch that must name its synchronization; global actors / @MainActor (SE-0316); region-based isolation and sending (SE-0414/0430); Swift 6 complete data-race checking (language mode 6) and incremental -strict-concurrency; and Swift 6.2 approachable concurrency — default MainActor isolation (SE-0466) and nonisolated async running on the caller's actor with @concurrent as the explicit background opt-out (SE-0461). AsyncSequence/AsyncStream, continuations (resume exactly once), and the data-race pitfalls the compiler now catches.
  2. Value semantics & types: structs/enums (value) vs classes (reference); prefer value types by default; copy-on-write and isKnownUniquelyReferenced; mutating/inout; noncopyable ~Copyable with consuming/borrowing and noncopyable generics (SE-0390/0377/0427) for unique-ownership resources; tuples vs structs.
  3. Error handling: throws/try/do-catch, try?/try!, rethrows, typed throws (SE-0413, and when not to use it for public APIs), Result for stored outcomes, defer, and the decision among optional vs throws vs precondition/fatalError (fatalError only for truly impossible states).
  4. Optionals & safety: optional binding (incl. if let x shorthand) / chaining / nil-coalescing; why to minimize force-unwrap ! and try!; Never; avoiding implicitly-unwrapped optionals in new API.
  5. Generics & protocols: protocol-oriented composition; associated & primary associated types (SE-0346); opaque some vs existential any (default to some; spell any explicitly); generic constraints/where; parameter packs / variadic generics (SE-0393); conditional and @retroactive conformance (SE-0364).
  6. Macros (SE-0382/0389/0397): freestanding vs attached macros and their roles; when to write one (mechanical boilerplate not expressible with generics/extensions/property wrappers), the swift-syntax cost, and that a macro should be tested (assertMacroExpansion).
  7. Memory management: ARC; retain cycles and weak/unowned; capture lists ([weak self] in escaping/stored closures — but not reflexively in short-lived structured async); value types avoiding cycles; deinit for non-ARC resources.
  8. Expressive features: property wrappers, result builders (recognizing a builder closure isn't imperative code), key paths, @dynamicMemberLookup (sparingly), pattern matching & switch exhaustiveness (a default on a closed enum hides the "new case" signal), extensions.
  9. SwiftPM: the Package.swift manifest (tools version, targets/products/dependencies, resources, plugins, per-target swiftSettings incl. swiftLanguageMode/defaultIsolation/upcoming features), semantic-version requirements + Package.resolved, and local packages for modularization.
  10. API Design Guidelines (swift.org, authoritative): clarity at the point of use over brevity; fluent call sites; omit needless words; role-based naming; mutating/nonmutating naming pairs (sort()/sorted(), form…); boolean assertions (isEmpty); argument-label conventions; doc comments for every declaration.
  11. Testing (language-level): Swift Testing (@Test, #expect, #require, @Suite, traits, parameterized, parallel-by-default) for unit/logic tests, and where XCTest remains (XCUITest, performance).
  12. Interoperability: Objective-C (@objc, bridging, NSError), C (module maps, unsafe pointers), and C++ interop (SE opt-in per target, bidirectional, maturity caveats) — scoping interop to the targets that need it.
  13. Idioms, anti-patterns & "language debt": reward value-types-by-default, guard-based early exits, protocol composition, some over any, exhaustive switches, domain-typed errors, clear naming, actor-modeled isolation. Flag: force-unwrap/try! density, fatalError on reachable paths, massive functions/types, @unchecked Sendable/nonisolated(unsafe) overuse, silencing concurrency diagnostics, reference-where-value-fits, stringly-typed code, Task.detached by default, retain cycles, ignored cancellation, bare existentials, blocking the main actor.

Read the full file on GitHub · 180 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 180 lines · 119 tokens per session scan A 1639f5a66cc5

Subscribe to this mod's changes

language-swift-expert is an agent published in the GitHub repository SteveGJones/ai-first-sdlc-practices (41 stars, last pushed 15d ago), licensed MIT. It adds 119 tokens to every session and 3,463 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other agents, from other repositories

swift-build-resolver

Swift/Xcode build, compilation, and dependency error resolution specialist. Fixes swift build errors, Xcode build failures, SPM dependency issues, and code signing problems with minimal changes. Use when Swift builds fail.

affaan-m/ECC · 48 tokens

Kotlin MCP Server Development Expert

Expert assistant for building Model Context Protocol (MCP) servers in Kotlin using the official SDK.

github/awesome-copilot · 26 tokens

elixir-way-architect

Synthesizes rewrite analysis and the ADR-000 compatibility bar into an idiomatic Elixir architecture, a complete mechanism ledger, ADRs and divergences. Use when /rewrite:architect has analysis and an accepted bar.

oliver-kriska/claude-elixir-phoenix · 50 tokens

mb-android

Android specialist for memory-bank /mb work stages. Jetpack Compose, Kotlin coroutines, Hilt/DI, Room, Material3. Falls back to mb-developer when stage is generic.

fockus/skill-memory-bank · 43 tokens

mb-ios

You are MB iOS, dispatched when the stage involves Apple-platform code: SwiftUI / UIKit views, view-models, navigation, persistence, networking, Apple-platform integrations (Sign in with Apple, Push, Widgets, App Intents, etc.).

fockus/skill-memory-bank · 39 tokens

android-kotlin-expert

Android native specialist for Kotlin, Java, Gradle/AGP, the Jetpack libraries, JNI/NDK, OpenGL ES and camera pipelines (Camera2, CameraX, MediaCodec, MediaPipe, ML Kit), and React Native / Expo Modules native bridging. Use when the task touches android/ (.kt, .java, .gradle / .gradle.kts, AndroidManifest.xml…

simiancraft/simiancraft-skills · 276 tokens