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 skills add johnrogers/claude-swift-engineering --skill swift-testinggit clone --depth 1 https://github.com/johnrogers/claude-swift-engineeringWrote 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/johnrogers/claude-swift-engineering/swift-testing)<a href="https://agentmods.dev/skills/johnrogers/claude-swift-engineering/swift-testing"><img src="https://agentmods.dev/badge/skills/johnrogers/claude-swift-engineering/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.
<a href="https://agentmods.dev/skills/johnrogers/claude-swift-engineering/swift-testing"><img src="https://agentmods.dev/badge/skills/johnrogers/claude-swift-engineering/swift-testing.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00013 | $0.01096 |
| Opus 5.5 | $0.00005 | $0.00438 |
| Sonnet 5.5 | $0.00003 | $0.00219 |
| Haiku 4.5 | $0.00001 | $0.00110 |
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 3mo 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 — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Swift Testing Framework
Modern testing with Swift Testing framework. No XCTest.
Overview
Swift Testing replaces XCTest with a modern macro-based approach that's more concise, has better async support, and runs tests in parallel by default. The core principle: if you learned XCTest, unlearn it—Swift Testing works differently.
References
Core Concepts
Assertions
| Macro | Use Case |
|---|---|
#expect(expression) |
Soft check — continues on failure. Use for most assertions. |
#require(expression) |
Hard check — stops test on failure. Use for preconditions only. |
Optional Unwrapping
let user = try #require(await fetchUser(id: "123"))
#expect(user.id == "123")
Test Structure
import Testing
@testable import YourModule
@Suite
struct FeatureTests {
let sut: FeatureType
init() throws {
sut = FeatureType()
}
@Test("Description of behavior")
func testBehavior() {
#expect(sut.someProperty == expected)
}
}
Assertion Conversions
| XCTest | Swift Testing |
|---|---|
XCTAssert(expr) |
#expect(expr) |
XCTAssertEqual(a, b) |
#expect(a == b) |
XCTAssertNil(a) |
#expect(a == nil) |
XCTAssertNotNil(a) |
#expect(a != nil) |
try XCTUnwrap(a) |
try #require(a) |
XCTAssertThrowsError |
#expect(throws: ErrorType.self) { } |
XCTAssertNoThrow |
#expect(throws: Never.self) { } |
Error Testing
#expect(throws: (any Error).self) { try riskyOperation() }
#expect(throws: NetworkError.self) { try fetch() }
#expect(throws: NetworkError.timeout) { try fetch() }
#expect(throws: Never.self) { try safeOperation() }
Parameterized Tests
@Test("Validates inputs", arguments: zip(
["a", "b", "c"],
[1, 2, 3]
))
func testInputs(input: String, expected: Int) {
#expect(process(input) == expected)
}
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.
- 3mo ago First seen · 143 lines · 13 tokens per session scan A 2e86cff8c819
swift-testing is a skill published in the GitHub repository johnrogers/claude-swift-engineering (236 stars, last pushed 10mo ago), licensed MIT. It adds 13 tokens to every session and 1,096 once invoked, about $0.0001 per session on Opus 5.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.
swift-testing compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| swift-testingjohnrogers/claude-swift-engineering | Skill | 236 | 10mo ago | MIT | A | 13 | Claude Code |
| swift-testing-projacklandrin/OnlySwitch | Skill | 6.1k | 5d ago | MIT | A | 34 | Codex |
| swift-testingmintuz/skills | Skill | 38 | 2d ago | MIT | A | 66 | Claude Code |
| creating-testSwiftfulThinking/SwiftfulStarterProject | Skill | 75 | 1mo ago | MIT | A | 56 | Claude Code |
| swift-testing-expertAvdLee/Swift-Testing-Agent-Skill | Skill | 483 | 2mo ago | MIT | A | 73 | Claude Code |
| guide-swift-testingPrisma-Labs-Dev/apple-skills | Skill | 361 | 2mo ago | MIT | A | 41 | Claude Code |
| modernize-testsJakubMikolajek/codex-skills-collection | Skill | 7 | yesterday | MIT | A | 55 | Codex |