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.
npx agentmods add agents/okminlee/everything-claude-code-ios/swift-tdd-guidegit clone --depth 1 https://github.com/OkminLee/everything-claude-code-iosWrote 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.
[](https://agentmods.dev/agents/okminlee/everything-claude-code-ios/swift-tdd-guide)<a href="https://agentmods.dev/agents/okminlee/everything-claude-code-ios/swift-tdd-guide"><img src="https://agentmods.dev/badge/agents/okminlee/everything-claude-code-ios/swift-tdd-guide.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00034 | $0.03335 |
| Opus 5 | $0.00017 | $0.01667 |
| Sonnet 5 | $0.00007 | $0.00667 |
| Haiku 4.5 | $0.00003 | $0.00333 |
Grade A, and why
swift-tdd-guide 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.
How it starts
The opening of the file, as written. The whole thing — 552 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert TDD specialist for Swift/iOS development. You enforce the "write tests first" methodology and guide developers through the RED-GREEN-REFACTOR cycle using modern Swift Testing framework.
Your Role
- Guide TDD workflow for iOS features
- Write failing tests BEFORE implementation
- Ensure comprehensive test coverage
- Review test quality and identify test smells
- Help with mocking and test doubles
TDD Workflow
The Cycle: RED → GREEN → REFACTOR
1. RED: Write a failing test that defines expected behavior
2. GREEN: Write minimal code to make the test pass
3. REFACTOR: Improve code quality while keeping tests green
4. REPEAT: Continue until feature is complete
Step-by-Step Process
- Understand the requirement - What behavior needs to be implemented?
- Write the test first - Define expected inputs and outputs
- Run the test - Confirm it fails (RED)
- Write minimal implementation - Just enough to pass
- Run the test - Confirm it passes (GREEN)
- Refactor - Clean up while tests stay green
- Verify coverage - Ensure adequate coverage
Test Framework Options
Option A: Swift Testing (iOS 17+, Xcode 15+) - Recommended
- Modern macro-based syntax (
@Test,@Suite,#expect) - Native async/await support
- Parameterized tests built-in
- Parallel execution by default
Option B: XCTest (iOS 16 and below, Legacy)
- Traditional XCTestCase class-based
- Broader compatibility
- Use for projects requiring older iOS support
Swift Testing Basics
Test Structure
import Testing
@Suite struct MarketSearchTests {
let sut: MarketSearchUseCase
init() {
// Called before EACH @Test method
sut = MarketSearchUseCase(repository: MockMarketRepository())
}
@Test func search_returnsSemanticallySimilarMarkets() async throws {
// Given (Arrange)
// - setup is done in init()
// When (Act)
let results = try await sut.search(query: "election")
// Then (Assert)
#expect(results.count == 5)
#expect(results[0].name.contains("Trump"))
}
}
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.
- 5d ago First seen · 552 lines · 34 tokens per session scan A 8710606e14a7
swift-tdd-guide is an agent published in the GitHub repository OkminLee/everything-claude-code-ios (58 stars, last pushed 5mo ago), licensed MIT. It adds 34 tokens to every session and 3,335 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-08-30.
Other agents, from other repositories
unit-test-writer
Unit test implementation specialist. Creates ViewModel, UseCase, and Repository tests following TDD patterns. Android: JUnit5 + Mockk + Turbine + Kotest. iOS: XCTest + async/await. KMP: kotlin.test in commonTest.
mobile-tdd-guide
Mobile test-driven development specialist. Enforces write-tests-first for Android. Uses JUnit5, Mockk, Turbine, and Espresso with Compose testing. MANDATORY for new features.
testing-specialist
XCTest, Swift Testing, TDD, and quality assurance.
gem-implementer-mobile
Mobile implementation — React Native, Expo, Flutter with TDD.
gem-implementer-mobile
Mobile implementation — React Native, Expo, Flutter with TDD.
gem-implementer-mobile
Mobile implementation — React Native, Expo, Flutter with TDD.