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/onmyway133/claude-code-plugins/swift-testingnpx skills add onmyway133/claude-code-plugins --skill swift-testinggit clone --depth 1 https://github.com/onmyway133/claude-code-pluginsWhat 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.00011 | $0.02957 |
| Opus 5 | $0.00005 | $0.01478 |
| Sonnet 5 | $0.00002 | $0.00591 |
| Haiku 4.5 | $0.00001 | $0.00296 |
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 3d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- swift_testing — 86% identical, 135 lines differ
How it starts
The opening of the file, as written. The whole thing — 566 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Swift Testing
You are a Swift testing expert using the modern Swift Testing framework (not XCTest). Apply these patterns when writing tests.
Framework Basics
Import and Structure
import Testing
@testable import MyApp
struct UserTests {
@Test func createsUserWithValidEmail() {
let user = User(email: "[email protected]")
#expect(user.isValid)
}
}
Key Differences from XCTest
| XCTest | Swift Testing |
|---|---|
class with XCTestCase |
struct (preferred) or class |
func testSomething() |
@Test func something() |
XCTAssertEqual(a, b) |
#expect(a == b) |
XCTAssertTrue(x) |
#expect(x) |
XCTAssertNil(x) |
#expect(x == nil) |
XCTAssertThrowsError |
#expect(throws:) |
setUpWithError() |
init() |
tearDown() |
deinit |
Expectations
Basic Expectations
@Test func basicExpectations() {
let value = 42
// Boolean
#expect(value > 0)
#expect(value == 42)
// Optionals
let optional: String? = "hello"
#expect(optional != nil)
// Collections
let array = [1, 2, 3]
#expect(array.contains(2))
#expect(array.count == 3)
}
Require (Unwrapping)
@Test func requireUnwrapping() throws {
let optional: String? = "hello"
// Unwrap or fail test
let value = try #require(optional)
#expect(value == "hello")
// With custom message
let user = try #require(fetchUser(), "User should exist")
#expect(user.isActive)
}
Error Expectations
@Test func errorHandling() {
// Expect any error
#expect(throws: (any Error).self) {
try riskyOperation()
}
// Expect specific error type
#expect(throws: ValidationError.self) {
try validate(email: "invalid")
}
// Expect specific error value
#expect(throws: ValidationError.invalidEmail) {
try validate(email: "")
}
}
Test Organization
Suites (Grouping)
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.
- 3d ago First seen · 566 lines · 11 tokens per session scan A c334019fc70c
Swift Testing is a skill published in the GitHub repository onmyway133/claude-code-plugins (5 stars, last pushed 7mo ago), licensed MIT. It adds 11 tokens to every session and 2,957 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-31.
Other skills, from other repositories
golang-testing
Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…
golang-stretchr-testify
Comprehensive guide to stretchr/testify for Golang testing. Covers assert, require, mock, and suite packages in depth. Use when writing tests with testify, creating mocks, setting up test suites, or choosing between assert and require. Covers testify assertions, mock expectations, argument matchers, call verification…
ios_developer
Comprehensive iOS development guidance covering SwiftUI, Swift Concurrency, Core Data, and Swift Testing.
sqlite_data
SQLiteData persistence library (Point-Free) - a fast SwiftData alternative using SQLite/GRDB. Use when working with SQLiteData, GRDB, type-safe SQL queries, @Table macro, @FetchAll/@FetchOne property wrappers, or migrating from SwiftData to SQLite-based persistence.
swift_testing
Modern Swift Testing framework patterns and best practices.
swift-testing-pro
Writes, reviews, and improves Swift Testing code using modern APIs and best practices. Use when reading, writing, or reviewing projects that use Swift Testing.