ios-testing

ios-testing is a skill for Claude Code from rusel95/ios-agent-skills. It costs 134 tokens per session (3,865 once invoked), scanned A, original, MIT.

An iOS and Swift testing skill covering unit, integration, snapshot, and user-interface tests. It explains choices such as XCTest versus Swift Testing and patterns for testing common Swift architectures.

In plain words
What is it for?
Writing and reviewing Swift tests, testing asynchronous view models, creating protocol-based mocks, checking snapshots at different device sizes, and managing test setup and cleanup.
Why use it?
It gives structure to tests that can otherwise be slow, dependent on shared state, difficult to repeat, or tied to real networks and devices.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the ios-agent-skills plugin — 12 skills shipped together

Good fit Writing and reviewing Swift tests, testing asynchronous view models, creating protocol-based mocks, checking snapshots at different device sizes, and managing test setup and cleanup.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rusel95/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 rusel95/ios-agent-skills --skill ios-testing
Clone the repo
git clone --depth 1 https://github.com/rusel95/ios-agent-skills

Made for: Claude Code.

Or install ios-agent-skills, the plugin that ships this one along with the rest of its 12 skills.

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/rusel95/ios-agent-skills/ios-testing.svg)](https://agentmods.dev/skills/rusel95/ios-agent-skills/ios-testing)
Your own site
<a href="https://agentmods.dev/skills/rusel95/ios-agent-skills/ios-testing"><img src="https://agentmods.dev/badge/skills/rusel95/ios-agent-skills/ios-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 134 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,865 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.00134 $0.03865
Opus 5 $0.00067 $0.01932
Sonnet 5 $0.00027 $0.00773
Haiku 4.5 $0.00013 $0.00386

Measured 8d ago against content hash 5517029c9cae, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 8d 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-testing/SKILL.md · 256 lines

How it starts

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

Approach: F.I.R.S.T-First, Production-Ready Tests -- Every test produced by this skill must be Fast, Isolated, Repeatable, Self-validating, and Thorough. Architecture changes to production code and improvements to the test suite both follow phased, low-risk PRs tracked in a refactoring/ directory.

iOS Swift Testing

Enterprise-grade testing skill covering 11 areas across all iOS architectures. Opinionated: prescribes Swift Testing (@Test/@Suite/#expect) for all new tests on Xcode 16+, protocol-based mocks with call tracking, F.I.R.S.T compliance checks on every generated test, and architecture-specific patterns for MVVM (UIKit+Combine, SwiftUI+@Observable), VIPER, and TCA.

Test Distribution Rule

Target: 90% unit tests (mocked, milliseconds) | 8% integration (real DB/network stub) | 2% UI (XCUITest). When in doubt, write a unit test.

F.I.R.S.T Principles

Principle What it means Violation signal
Fast Unit tests should run in milliseconds. Avoid unnecessary waits. Real URLSession, Thread.sleep, disk I/O
Isolated Tests don't share state. Order doesn't matter. static var, setUp skipped, test A breaks B
Repeatable Same result on any machine, any time. Date(), UUID(), random data, time zones
Self-validating Pass or fail -- no log inspection. print(result) with no assertion
Thorough Happy path + error path + edge cases. Only green-path tests, 0% error coverage

Quick Decision Trees

"Swift Testing or XCTest?"

Need UI testing?           -> XCTest (XCUITest) only
Need performance testing?  -> XCTest (measure {}) only
Need attachments?          -> XCTest only
Need ObjC support?         -> XCTest only
New unit/integration test? -> Swift Testing (preferred)
Existing XCTest?           -> Migrate incrementally, both coexist

"Which assertion macro?"

Soft check (report + continue)?     -> #expect(expr)
Hard precondition (halt on fail)?   -> try #require(expr)
Unwrap optional + use value?        -> let val = try #require(optional)
Check error thrown?                 -> #expect(throws: Type.self) { }
Check nothing thrown?               -> #expect(throws: Never.self) { }
Record unconditional failure?       -> Issue.record("msg")

Read the full file on GitHub · 256 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. 8d ago First seen · 256 lines · 134 tokens per session scan A 5517029c9cae

Subscribe to this mod's changes

ios-testing is a skill published in the GitHub repository rusel95/ios-agent-skills (7 stars, last pushed 4mo ago), licensed MIT. It adds 134 tokens to every session and 3,865 once invoked, about $0.0007 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

ios-testing

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…

koshkinvv/ios-agent-skills · 206 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

aidex-coverage

Use when writing, placing, or running tests in any project — which layer a behaviour belongs in ("unit or E2E for X", "component test or browser test"), which tests to run for a change instead of the whole suite, when to extract a fixture, setting up an isolated disposable E2E environment, or the per-project testing…

yacb2/aidex · 193 tokens

ui-crawler-max

Autonomous UI crawler for iOS simulator apps — rapid, element-precise data collection. Use whenever the user says "crawl my app", "auto-test the UI", "click/tap through every screen", "monkey test", "explore the app and find errors/crashes", "collect screenshots of all screens", "smoke test the whole app", or asks for…

Dev869/swift-tothemax · 179 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