ios-testing

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

A set of rules for writing and testing iOS apps, including unit tests, user-interface tests, and performance tests. It explains when to use Swift Testing or XCTest, Apple's testing frameworks.

In plain words
What is it for?
It guides tests for models, view models, services, network requests, SwiftData, and user interfaces, including the use of mock dependencies.
Why use it?
It helps keep tests consistent, avoid unreliable timing-based tests, and make app code easier to test.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit It guides tests for models, view models, services, network requests, SwiftData, and user interfaces, including the use of mock dependencies.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/koshkinvv/ios-agent-skills/ios-testing"><img src="https://agentmods.dev/badge/skills/koshkinvv/ios-agent-skills/ios-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 206 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,694 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00206 $0.02694
Opus 5 $0.00103 $0.01347
Sonnet 5 $0.00041 $0.00539
Haiku 4.5 $0.00021 $0.00269

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

Security

Grade A, and why

ios-testing scanned grade A with 1 finding 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 9d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

let users = try context.fetch(descriptor)
skills/ios-testing/SKILL.md · 339 lines

How it starts

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

iOS Testing Skill

Core Rules

  1. Use Swift Testing (@Test, #expect) for ALL new unit tests -- it is the modern framework (Xcode 16+).
  2. Keep XCTest only for UI tests and performance tests -- Swift Testing does not support these yet.
  3. Both frameworks can coexist in the same target -- migrate incrementally, never rewrite working tests.
  4. Use protocol-based dependency injection for testability.
  5. Use URLProtocol for network mocking (NOT mocking URLSession directly).
  6. Use isStoredInMemoryOnly: true for SwiftData test containers.
  7. Name tests descriptively: @Test("Login succeeds with valid credentials").
  8. One assertion per test is ideal, but pragmatic grouping is fine.
  9. Test behavior, not implementation details.
  10. Never use sleep() in tests -- use expectations, confirmations, or Clock injection.

Framework Choice

Test Type Framework Why
Unit tests (new) Swift Testing Modern, less boilerplate, parameterized tests
Unit tests (existing) XCTest Don't rewrite working tests without reason
UI tests XCTest Swift Testing doesn't support XCUIApplication
Performance tests XCTest measure {} not available in Swift Testing
Snapshot tests XCTest + swift-snapshot-testing Point-Free library, XCTest integration

Test Organization

MyAppTests/                    # Unit test target
  Models/
    UserTests.swift
    OrderTests.swift
  ViewModels/
    LoginViewModelTests.swift
    ProfileViewModelTests.swift
  Services/
    APIClientTests.swift
    AuthServiceTests.swift
  Helpers/
    Mocks/
      MockAPIClient.swift
      MockAuthService.swift
    TestData/
      UserFixtures.swift
      JSONFixtures.swift
MyAppUITests/                  # UI test target
  Screens/                     # Page Objects
    LoginScreen.swift
    HomeScreen.swift
  Flows/
    OnboardingFlowTests.swift
    PurchaseFlowTests.swift
  Helpers/
    XCUIApplication+Launch.swift

Read the full file on GitHub · 339 lines

Files

What ships with it

4 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. 9d ago First seen · 339 lines · 206 tokens per session scan A 87dd07924c00

Subscribe to this mod's changes

ios-testing is a skill published in the GitHub repository koshkinvv/ios-agent-skills (6 stars, last pushed 5mo ago), licensed MIT. It adds 206 tokens to every session and 2,694 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

ios-testing

Invoke any time a user is writing iOS/Swift tests or asking why tests behave a certain way — including XCTest versus Swift Testing (@Test/#expect) choices, async ViewModel tests with @Observable or @Published, snapshot testing across device sizes, mocking protocols for dependency injection, setUp/tearDown lifecycle…

rusel95/ios-agent-skills · 134 tokens

ios-testing

Testing patterns for Swift and SwiftUI apps.

TalissonVitorino/kmp-ios-skills · 69 tokens

mobile-testing

Android and JVM testing - JUnit5, MockK, Turbine for Flow, and Compose UI testing for unit, integration, and UI tests; also applies to KMP commonTest running on the JVM/Android target. For iOS/Swift tests (XCTest, Swift Testing, XCUITest) use ios-testing. For TDD methodology and the three-tier test model (fake-first…

TalissonVitorino/kmp-ios-skills · 102 tokens

swift-testing

Build an Apple-platform test strategy with Swift Testing for unit and integration coverage, XCTest for UI automation, deterministic fixtures, and concise agent-readable results.

memi-design/design-skills · 32 tokens

iOS Testing

XCTest unit tests, XCUITest UI tests, snapshot testing, and performance baselines for iOS apps.

niels-emmer/myace · 27 tokens

argent-test-ui-flow

Autonomously test an app UI (iOS or Android) by running interact-screenshot-verify loops using argent MCP tools. Use when testing UI flows, verifying login works, testing navigation, running end-to-end UI test scenarios, manual QA steps, visible UI changes, or visual behavior.

software-mansion/argent · 64 tokens