ios-testing

ios-testing is a skill for Claude Code, Codex from TalissonVitorino/kmp-ios-skills. It costs 69 tokens per session (2,268 once invoked), scanned A, original, MIT.

A testing guide for Swift and SwiftUI apps, using Swift Testing for new unit tests and XCTest for interface tests and performance measurements.

In plain words
What is it for?
Use it to test view models, asynchronous operations, data loading, SwiftUI interfaces, and app performance.
Why use it?
It helps developers check app behavior automatically and choose the appropriate Apple testing framework for each kind of test.

Skill for Claude CodeCodex

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

Good fit Use it to test view models, asynchronous operations, data loading, SwiftUI interfaces, and app performance.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/talissonvitorino/kmp-ios-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 TalissonVitorino/kmp-ios-skills --skill ios-testing
Clone the repo
git clone --depth 1 https://github.com/TalissonVitorino/kmp-ios-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/talissonvitorino/kmp-ios-skills/ios-testing/github.svg)](https://agentmods.dev/skills/talissonvitorino/kmp-ios-skills/ios-testing)
Your own site
<a href="https://agentmods.dev/skills/talissonvitorino/kmp-ios-skills/ios-testing"><img src="https://agentmods.dev/badge/skills/talissonvitorino/kmp-ios-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/talissonvitorino/kmp-ios-skills/ios-testing"><img src="https://agentmods.dev/badge/skills/talissonvitorino/kmp-ios-skills/ios-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,268 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00069 $0.02268
Opus 5 $0.00034 $0.01134
Sonnet 5 $0.00014 $0.00454
Haiku 4.5 $0.00007 $0.00227

Measured 6d ago against content hash 60e953ee33c4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

ios-testing 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 6d 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.

ios/ios-testing/SKILL.md · 355 lines

How it starts

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

iOS Testing

Testing patterns for Swift and SwiftUI apps.

Prefer the Swift Testing framework (Xcode 16+) for new unit tests; XCTest is still required for UI tests (XCUITest) and performance measurement.

Swift Testing

import Testing
@testable import MyApp

// @Test replaces test-prefixed methods; the name is a plain description.
@Test("Loading users populates the list")
func loadUsersSucceeds() async throws {
    let mockService = MockUserService()
    mockService.usersToReturn = [User.mock1, User.mock2]
    let sut = UserViewModel(service: mockService)

    await sut.loadUsers()

    // #expect for soft assertions (test continues on failure).
    #expect(sut.users == [User.mock1, User.mock2])
    #expect(sut.isLoading == false)
    #expect(sut.errorMessage == nil)
}

@Test func fetchReturnsUsers() async throws {
    let sut = makeSUT()
    let users = try await sut.fetchUsers()
    // #require unwraps an optional (or checks a condition) and STOPS the test on failure.
    let first = try #require(users.first)
    #expect(!first.name.isEmpty)
}

Suites and setup

// @Suite groups tests; init replaces setUp and each test gets a fresh
// instance (parallel by default, no shared mutable state). For tearDown,
// use deinit — that requires a class or actor suite, not a struct.
@Suite("UserViewModel")
struct UserViewModelTests {
    let sut: UserViewModel
    let mockService: MockUserService

    init() {
        mockService = MockUserService()
        sut = UserViewModel(service: mockService)
    }

    @Test func failureSetsErrorMessage() async {
        mockService.shouldThrowError = true
        await sut.loadUsers()
        #expect(sut.users.isEmpty)
        #expect(sut.errorMessage != nil)
    }
}

Parameterized tests

// One @Test runs once per argument (each shown separately in results).
@Test(arguments: [
    "[email protected]",
    "[email protected]",
    "[email protected]"
])
func validEmails(_ email: String) {
    #expect(Validator.isValidEmail(email))
}

// Expected errors:
@Test func throwsOnBadInput() async throws {
    await #expect(throws: NetworkError.noConnection) {
        try await sut.failingCall()
    }
}

// confirmation replaces XCTestExpectation for callback-based APIs:
@Test func delegateIsNotified() async {
    await confirmation("delegate called") { confirmed in
        sut.onUpdate = { confirmed() }
        await sut.refresh()
    }
}

Read the full file on GitHub · 355 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. 6d ago First seen · 355 lines · 69 tokens per session scan A 60e953ee33c4

Subscribe to this mod's changes

ios-testing is a skill published in the GitHub repository TalissonVitorino/kmp-ios-skills (12 stars, last pushed 15d ago), licensed MIT. It adds 69 tokens to every session and 2,268 once invoked, about $0.0003 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-09-03.

Related

Other skills, from other repositories

cmp-qa-prep

Bring up the E2E harness for a Kotlin/Compose Multiplatform app — boot the Android emulator, install the debug build, run the Maestro smoke — or, simpler, run the verify lane, which does all three itself. Use this when the user wants to run E2E/device tests on their CMP/KMP app, "prep my KMP test environment", "smoke…

kvdm-co-pilot/create-cmp · 131 tokens

cmp-test

Generate a regression test suite for a Compose Multiplatform app by OBSERVING it — read the running app's semantics tree as JSON via the cmp-inspector MCP (testTags, text, clickables, bounds, nav state), derive a test plan from what actually rendered, and write the tests into the app's shipped harness (Maestro flows…

kvdm-co-pilot/create-cmp · 159 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

mobile-automation

Control Android and iOS devices, emulators and simulators — launch apps, tap, swipe, type, take screenshots, read the accessibility tree. Use when a task involves a mobile device or app, mobile UI testing, or reproducing a bug on a phone.

mobile-next/mobile-mcp · 58 tokens

argent-create-flow

Create, record, edit, replay, or repair reusable Argent flow YAML files. Use when the user asks to record or replay a repeatable device path, set up profiling or an A/B comparison, or invoke the authoring engine behind argent-qa-flows. Also use before repeating three or more interactions. For one-off UI checks…

software-mansion/argent · 100 tokens

roborazzi

Use when working with Roborazzi screenshot tests on Android/JVM — setting up the Roborazzi Gradle plugin, running record/compare/verify tasks, writing tests with captureRoboImage or RoborazziRule, Compose Preview screenshot testing (ComposablePreviewScanner), Compose Multiplatform (iOS/desktop) screenshots, AI-powered…

takahirom/roborazzi · 95 tokens