ios-concurrency

ios-concurrency is a skill for Claude Code, Codex from koshkinvv/ios-agent-skills. It costs 191 tokens per session (2,469 once invoked), scanned A, original, MIT.

A guide to writing asynchronous Swift code, where slow work can continue without blocking the app's interface. It covers async/await, tasks, actors, cancellation, and Swift's compiler checks for safely shared data.

In plain words
What is it for?
Use it when building iPhone or iPad features that fetch data, handle callbacks, update the UI, or share changing state across tasks.
Why use it?
It helps prevent frozen interfaces, data races, leaked tasks, and errors when code runs concurrently, especially with Swift 6's stricter checks.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when building iPhone or iPad features that fetch data, handle callbacks, update the UI, or share changing state across tasks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/koshkinvv/ios-agent-skills/ios-concurrency
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.

Any agent
npx skills add koshkinvv/ios-agent-skills --skill ios-concurrency
Clone the repo
git clone --depth 1 https://github.com/koshkinvv/ios-agent-skills

Made for: Claude Code, Codex.

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 ios-concurrency

README.md
[![agentmods](https://agentmods.dev/badge/skills/koshkinvv/ios-agent-skills/ios-concurrency/github.svg)](https://agentmods.dev/skills/koshkinvv/ios-agent-skills/ios-concurrency)
Your own site
<a href="https://agentmods.dev/skills/koshkinvv/ios-agent-skills/ios-concurrency"><img src="https://agentmods.dev/badge/skills/koshkinvv/ios-agent-skills/ios-concurrency/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 ios-concurrency

Your own site · 80×15
<a href="https://agentmods.dev/skills/koshkinvv/ios-agent-skills/ios-concurrency"><img src="https://agentmods.dev/badge/skills/koshkinvv/ios-agent-skills/ios-concurrency.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 191 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,469 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.00191 $0.02469
Opus 5 $0.00096 $0.01234
Sonnet 5 $0.00038 $0.00494
Haiku 4.5 $0.00019 $0.00247

Measured 11d ago against content hash 14441ffd7861, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

ios-concurrency 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 11d 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.

skills/ios-concurrency/SKILL.md · 331 lines

How it starts

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

iOS Concurrency Skill

Core Rules

  1. Use async/await for ALL new asynchronous code. Do not use completion handlers or Combine for async operations in new code.
  2. Use structured concurrency (Task, TaskGroup). Avoid unstructured task leaks. Prefer async let or TaskGroup over spawning loose Task {} blocks.
  3. Mark UI-updating code with @MainActor. SwiftUI views are already @MainActor-isolated. UIKit code that touches UI must run on @MainActor.
  4. Use actors for shared mutable state instead of locks, semaphores, or serial dispatch queues.
  5. All types crossing actor boundaries must be Sendable. The compiler enforces this in strict concurrency mode.
  6. Prefer value types (struct, enum) for Sendable. They are implicitly Sendable when all stored properties are Sendable.
  7. Use withCheckedContinuation to bridge callback-based APIs to async/await. Never resume a continuation more than once.
  8. Use AsyncStream for bridging delegate/callback patterns to AsyncSequence.
  9. Task.detached is rarely needed. Use Task {} with explicit actor isolation instead. Detached tasks lose actor context and priority inheritance.
  10. Always handle Task cancellation cooperatively. Check Task.isCancelled or call try Task.checkCancellation() at appropriate points.

Decision Guide

Scenario Solution
Single async operation async func / Task {}
Multiple independent operations TaskGroup / async let
Sequential dependent operations await one after another
Shared mutable state actor
UI updates from background @MainActor / MainActor.run {}
Bridge callback API withCheckedContinuation / withCheckedThrowingContinuation
Bridge delegate pattern AsyncStream with continuation
Streaming data AsyncSequence / AsyncStream
Debounce user input Task cancellation pattern
Non-Sendable legacy type @preconcurrency import / @unchecked Sendable (last resort)
Combine publisher to async .values property on publisher
Timer / periodic work AsyncTimerSequence (from swift-async-algorithms) or AsyncStream
Parallel with limit TaskGroup with semaphore-like counter

Read the full file on GitHub · 331 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 331 lines · 191 tokens per session scan A 14441ffd7861

Subscribe to this mod's changes

ios-concurrency is a skill published in the GitHub repository koshkinvv/ios-agent-skills (6 stars, last pushed 5mo ago), licensed MIT. It adds 191 tokens to every session and 2,469 once invoked, about $0.0010 per session on Opus 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-08-31.

Related

Other skills, from other repositories

compose-multiplatform

Use when building one shared Compose UI in Kotlin across Android, iOS, and desktop — commonMain @Composables, expect/actual, source-set placement, native interop, multiplatform ViewModel/navigation/Koin. NOT a single-platform native build (that is kotlin-android / swift-ios), and NOT Dart/Flutter cross-platform UI…

ericrisco/rsc-harness · 80 tokens

swift-concurrency

Use for any Swift Concurrency question on Apple platforms. Triggers on: actor reentrancy (stale state after await), AsyncStream lifecycle (continuation.finish, onTermination), TaskGroup memory and task throttling (activeProcessorCount), Sendable conformance across actor boundaries (non-Sendable third-party types)…

rusel95/ios-agent-skills · 170 tokens

tca-swiftui

Use for any question about The Composable Architecture (TCA) — defining reducers, managing state, handling navigation, writing tests, or working with dependencies. Essential when encountering TCA-specific types like @Reducer, @ObservableState, StackState, StackAction, @Presents, TestStore, @DependencyClient, Scope, or…

rusel95/ios-agent-skills · 149 tokens

uikit-mvvm

Use for hands-on UIKit MVVM questions: setting up Combine bindings between UIViewController and ViewModel (@Published + sink), extracting business logic from massive ViewControllers step by step, testing ViewModels with XCTestExpectation + Combine publishers, fixing [weak self] retain cycles in sink closures…

rusel95/ios-agent-skills · 125 tokens

kotlin-coroutines-flows

Kotlin Coroutines and Flow patterns for Android and KMP — structured concurrency, Flow operators, StateFlow, error handling, and testing.

hashgraph-online/awesome-codex-plugins · 35 tokens

build-feature

Build an iOS feature using ShipSwift components. Use when the user says "build", "create", "add a feature", or describes an iOS feature they want to implement.

signerlabs/ShipSwift · 40 tokens