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 skills/bocato/swift-testing-agent-skill/swift-testingnpx skills add bocato/swift-testing-agent-skill --skill swift-testinggit clone --depth 1 https://github.com/bocato/swift-testing-agent-skillWrote 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/skills/bocato/swift-testing-agent-skill/swift-testing)<a href="https://agentmods.dev/skills/bocato/swift-testing-agent-skill/swift-testing"><img src="https://agentmods.dev/badge/skills/bocato/swift-testing-agent-skill/swift-testing.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.00124 | $0.02309 |
| Opus 5 | $0.00062 | $0.01154 |
| Sonnet 5 | $0.00025 | $0.00462 |
| Haiku 4.5 | $0.00012 | $0.00231 |
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 4d 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 — 296 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Swift Testing
Overview
This skill provides expert guidance on Swift Testing, covering the modern Swift Testing framework, test doubles (mocks, stubs, spies), fixtures, integration testing, snapshot testing, and migration from XCTest. Use this skill to help developers write reliable, maintainable tests following F.I.R.S.T. principles and Arrange-Act-Assert patterns.
Agent Behavior Contract (Follow These Rules)
- Use Swift Testing framework (
@Test,#expect,#require,@Suite) for all new tests, not XCTest. - Always structure tests with clear Arrange-Act-Assert phases.
- Follow F.I.R.S.T. principles: Fast, Isolated, Repeatable, Self-Validating, Timely.
- Use proper test double terminology per Martin Fowler's taxonomy (Dummy, Fake, Stub, Spy, SpyingStub, Mock).
- Place fixtures close to models with
#if DEBUG, not in test targets. - Place test doubles close to interfaces with
#if DEBUG, not in test targets. - Prefer state verification over behavior verification - simpler, less brittle tests.
- Use
#expectfor soft assertions (continue on failure) and#requirefor hard assertions (stop on failure).
Quick Decision Tree
When a developer needs testing guidance, follow this decision tree:
-
Starting fresh with Swift Testing?
- Read
references/test-organization.mdfor suites, tags, traits - Read
references/async-testing.mdfor async test patterns
- Read
-
Need to create test data?
- Read
references/fixtures.mdfor fixture patterns and placement - Read
references/test-doubles.mdfor mock/stub/spy patterns
- Read
-
Testing multiple inputs?
- Read
references/parameterized-tests.mdfor parameterized testing
- Read
-
Testing module interactions?
- Read
references/integration-testing.mdfor integration test patterns
- Read
-
Testing UI for regressions?
- Read
references/snapshot-testing.mdfor snapshot testing setup
- Read
-
Testing data structures or state?
- Read
references/dump-snapshot-testing.mdfor text-based snapshot testing
- Read
What ships with it
10 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.
- references/_index.md 2.7 KB
- references/async-testing.md 4.7 KB
- references/dump-snapshot-testing.md 6.2 KB
- references/fixtures.md 4.2 KB
- references/integration-testing.md 4.5 KB
- references/migration-xctest.md 5.5 KB
- references/parameterized-tests.md 4.0 KB
- references/snapshot-testing.md 4.3 KB
- references/test-doubles.md 6.0 KB
- references/test-organization.md 4.0 KB
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.
- 4d ago First seen · 296 lines · 124 tokens per session scan A 81b4e5a051d4
swift-testing is a skill published in the GitHub repository bocato/swift-testing-agent-skill (80 stars, last pushed 7mo ago), licensed MIT. It adds 124 tokens to every session and 2,309 once invoked, about $0.0006 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 skills, from other repositories
swift_expert
Swift and iOS/macOS specialist. Protocol-oriented programming and SwiftUI patterns.
Swift Patterns
Use this skill when working on Swift projects (SwiftPM packages, iOS/macOS apps) and you want consistent patterns for concurrency, structure, and safety.
app-ui-design
Mobile app UI design expert for iOS and Android. Use when designing app interfaces, creating design systems, ensuring accessibility, or following platform guidelines. Covers Material Design 3, Human Interface Guidelines, color theory, typography, and 2025 trends.
workflow-audit
Systematic UI workflow auditing for SwiftUI applications. Discovers entry points, traces user flows, detects dead ends and broken promises, audits data wiring, evaluates from user perspective. Triggers: "workflow audit", "audit flows", "find dead ends", "check navigation".
swift-testing-expert
Expert guidance for Swift Testing: test structure, #expect/#require macros, traits and tags, parameterized tests, test plans, parallel execution, async waiting patterns, and XCTest migration. Use when writing new Swift tests, modernizing XCTest suites, debugging flaky tests, or improving test quality and…
swiftui-backports
Find SwiftUIBackports replacements for SwiftUI APIs unavailable on a project deployment target. Use for Swift/SwiftUI compiler availability errors, old iOS/tvOS/watchOS/macOS targets, or when implementing SwiftUI app features that may benefit from SwiftUIBackports.