swift-testing

swift-testing is a skill for Claude Code, Codex from memi-design/design-skills. It costs 32 tokens per session (249 once invoked), scanned A, original, MIT.

A guide to testing Apple-platform apps with Swift Testing, XCTest, and UI automation. It explains how to choose tests, isolate outside influences, and keep results repeatable.

In plain words
What is it for?
Use it to plan unit, integration, and UI tests, add meaningful parameterized cases, test asynchronous failures and cancellation, and run the appropriate test suites.
Why use it?
It helps catch behavior and interface regressions without slow, flaky tests caused by real time, randomness, device state, networking, or arbitrary delays.

Skill for Claude CodeCodex

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

Good fit Use it to plan unit, integration, and UI tests, add meaningful parameterized cases, test asynchronous failures and cancellation, and run the appropriate test suites.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/memi-design/design-skills/swift-testing"><img src="https://agentmods.dev/badge/skills/memi-design/design-skills/swift-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 249 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.00032 $0.00249
Opus 5 $0.00016 $0.00125
Sonnet 5 $0.00006 $0.00050
Haiku 4.5 $0.00003 $0.00025

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

Security

Grade A, and why

swift-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 5d 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/swift-testing/SKILL.md · 26 lines

What it actually says

Swift Testing

Workflow

  1. Identify the behavior contract and the cheapest test layer that proves it.
  2. Use Swift Testing for new Swift unit and integration tests when the project toolchain supports it.
  3. Keep XCTest and XCUIAutomation for UI tests and existing Objective-C or mixed-language coverage.
  4. Isolate time, randomness, persistence, networking, notifications, and device state behind deterministic inputs.
  5. Add parameterized cases for meaningful input matrices instead of copy-pasted tests.
  6. Test async failure, cancellation, and actor behavior without arbitrary sleeps.
  7. Run the smallest suite during iteration and the repository test plan before handoff.

Test pyramid

  • Many fast unit tests for pure behavior and state transitions.
  • Fewer integration tests for persistence, networking boundaries, intents, and dependency wiring.
  • A small set of stable UI tests for critical user journeys and accessibility identifiers.
  • Performance baselines only for paths where regressions matter.

Read references/commands.md for command and result requirements.

Files

What ships with it

2 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. 5d ago First seen · 26 lines · 32 tokens per session scan A aec3614d1dfe

Subscribe to this mod's changes

swift-testing is a skill published in the GitHub repository memi-design/design-skills (7 stars, last pushed 1mo ago), licensed MIT. It adds 32 tokens to every session and 249 once invoked, about $0.0002 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

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

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

memstack-development-test-writer

Use this skill when the user says 'write tests', 'add tests', 'test coverage', 'unit tests', 'integration tests', 'component tests', 'mocking', 'edge cases', or needs to generate tests with proper mocking and edge case coverage. Do NOT use for refactoring plans or database migrations.

cwinvestments/memstack · 70 tokens

mobiai-android-testing

Use when writing or running tests in an Android project — unit tests, UI tests, choosing the right framework and patterns.

ArisGuimera/MobiAI-Core · 30 tokens

flutter-testing-skill

Generates Flutter widget tests, integration tests, and golden tests in Dart. Supports local execution and TestMu AI cloud for real device testing. Use when user mentions "Flutter", "widget test", "WidgetTester", "testWidgets", "fluttertest", "integrationtest". Triggers on: "Flutter", "widget test", "Dart test"…

LambdaTest/agent-skills · 89 tokens

rn-testing

Testing React Native: Jest with jest-expo / react-native preset, React Testing Library Native, native module mocking, hook testing. Optional sections for Detox (native automation) and Maestro (declarative YAML e2e). Use this skill to: Configure Jest preset based on workflow. Write component tests with…

AratKruglik/claude-sdlc · 163 tokens