everything-claude-code-mobile: Skill for Claude Code

.opencode/skills/ios-testing/SKILL.md

ios-testing is a skill for Claude Code, OpenCode from ahmed3elshaer/everything-claude-code-mobile. It costs 26 tokens per session (1,642 once invoked), scanned A, original, MIT.

Testing guidance for Swift and SwiftUI apps, including unit tests that check one component at a time and test doubles that stand in for services.

In plain words
What is it for?
Use it to test view models and other app logic with XCTest, set up and clean up test objects, simulate service responses, and verify loading, data, and error states.
Why use it?
It gives developers repeatable patterns for checking successful and failed behavior without depending on real network services or other external systems.

Skill for Claude CodeOpenCode

Written for Claude Code and OpenCode: shipped in a Claude Code plugin, but also installed under .opencode/.

This is ahmed3elshaer/everything-claude-code-mobile's own configuration. It tells Claude Code and OpenCode how to work on everything-claude-code-mobile itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything everything-claude-code-mobile configures →

Part of the everything-claude-code-mobile plugin — 46 skills, 35 commands, 27 agents, 2 hooks, 3 MCP servers shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to ahmed3elshaer/everything-claude-code-mobile. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ahmed3elshaer/everything-claude-code-mobile/main/.opencode/skills/ios-testing/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ahmed3elshaer/everything-claude-code-mobile

Made for: Claude Code, OpenCode.

Or install everything-claude-code-mobile, the plugin that ships this one along with the rest of its 46 skills, 35 commands, 27 agents, 2 hooks, 3 MCP servers.

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/ahmed3elshaer/everything-claude-code-mobile/ios-testing.svg)](https://agentmods.dev/skills/ahmed3elshaer/everything-claude-code-mobile/ios-testing)
Your own site
<a href="https://agentmods.dev/skills/ahmed3elshaer/everything-claude-code-mobile/ios-testing"><img src="https://agentmods.dev/badge/skills/ahmed3elshaer/everything-claude-code-mobile/ios-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,642 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.00026 $0.01642
Opus 5 $0.00013 $0.00821
Sonnet 5 $0.00005 $0.00328
Haiku 4.5 $0.00003 $0.00164

Measured 7d ago against content hash c2b5d42a00e1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, 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 7d 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.

.opencode/skills/ios-testing/SKILL.md · 307 lines

How it starts

The opening of the file, as written. The whole thing — 307 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.

Unit Tests

Basic Unit Test

import XCTest
@testable import MyApp

class UserViewModelTests: XCTestCase {
    var sut: UserViewModel!
    var mockService: MockUserService!

    override func setUp() {
        super.setUp()
        mockService = MockUserService()
        sut = UserViewModel(service: mockService)
    }

    override func tearDown() {
        sut = nil
        mockService = nil
        super.tearDown()
    }

    func testLoadUsers_whenSuccessful_populatesUsers() async throws {
        // Given
        let expectedUsers = [User.mock1, User.mock2]
        mockService.usersToReturn = expectedUsers

        // When
        await sut.loadUsers()

        // Then
        XCTAssertEqual(sut.users, expectedUsers)
        XCTAssertFalse(sut.isLoading)
        XCTAssertNil(sut.errorMessage)
    }

    func testLoadUsers_whenFailure_setsErrorMessage() async throws {
        // Given
        mockService.shouldThrowError = true

        // When
        await sut.loadUsers()

        // Then
        XCTAssertTrue(sut.users.isEmpty)
        XCTAssertNotNil(sut.errorMessage)
    }
}

Mocking

// ✅ Protocol-based mocking
protocol UserServiceProtocol {
    func getUsers() async throws -> [User]
}

class MockUserService: UserServiceProtocol {
    var usersToReturn: [User] = []
    var shouldThrowError = false
    var getUsersCalled = false

    func getUsers() async throws -> [User] {
        getUsersCalled = true
        if shouldThrowError {
            throw NetworkError.noConnection
        }
        return usersToReturn
    }
}

// ✅ Verify method calls
func testRefreshButton_callsService() async {
    // When
    await sut.refresh()

    // Then
    XCTAssertTrue(mockService.getUsersCalled)
}

Async Testing

func testAsyncOperation_completesSuccessfully() async throws {
    // Given
    let expectation = expectation(description: "Async completes")

    // When
    Task {
        await sut.asyncOperation()
        expectation.fulfill()
    }

    // Then
    await fulfillment(of: [expectation], timeout: 1.0)
}

// ✅ Swift async/await
func testAsyncFetch_returnsUsers() async throws {
    let users = try await sut.fetchUsers()
    XCTAssertFalse(users.isEmpty)
}

Read the full file on GitHub · 307 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. 7d ago First seen · 307 lines · 26 tokens per session scan A c2b5d42a00e1

Subscribe to this mod's changes

ios-testing is a skill published in the GitHub repository ahmed3elshaer/everything-claude-code-mobile (65 stars, last pushed 2mo ago), licensed MIT. It adds 26 tokens to every session and 1,642 once invoked, about $0.0001 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-30.

Related

Other skills, from other repositories

maui-unit-testing

Add MAUI app tests around ViewModels, services, platform abstractions, and unit/integration/device boundaries. USE FOR: xUnit, avoiding MauiProgram.CreateMauiApp in unit tests, fakes/mocks, injectable Essentials interfaces, PlatformNotSupportedException, navigation/data services, AppProjectReference, device-test…

dotnet/maui-labs · 84 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

SKILL

This document provides a comprehensive technical reference for KSensor, a Kotlin Multiplatform (KMP) library designed for observing device sensors and system states on Android and iOS.

ShadAdman/KSensor · 0 tokens

swift-testing

Write, review, or migrate Swift unit tests using Swift Testing, while preserving XCTest/XCUITest where their APIs are still required. Use for test design, async behavior, traits, parameterization, migration boundaries, and version-gated testing APIs.

thiennc-tesoglobal/ios-skills · 52 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