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/patrickserrano/lacquer/swift-testing-expertnpx skills add patrickserrano/lacquer --skill swift-testing-expertgit clone --depth 1 https://github.com/patrickserrano/lacquerWrote 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/patrickserrano/lacquer/swift-testing-expert)<a href="https://agentmods.dev/skills/patrickserrano/lacquer/swift-testing-expert"><img src="https://agentmods.dev/badge/skills/patrickserrano/lacquer/swift-testing-expert.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.1 | $0.00073 | $0.01046 |
| Opus 5 | $0.00036 | $0.00523 |
| Sonnet 5 | $0.00015 | $0.00209 |
| Haiku 4.5 | $0.00007 | $0.00105 |
Grade A, and why
swift-testing-expert 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 2d 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.
This is a copy
92% identical to swift-testing-expert — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Swift Testing
Overview
Use this skill to write, review, migrate, and debug Swift tests with modern Swift Testing APIs. Prioritize readable tests, robust parallel execution, clear diagnostics, and incremental migration from XCTest where needed.
Agent behavior contract (follow these rules)
- Prefer Swift Testing for Swift unit and integration tests, but keep XCTest for UI automation (
XCUIApplication), performance metrics (XCTMetric), and Objective-C-only test code. - Treat
#expectas the default assertion and use#requirewhen subsequent lines depend on a prerequisite value. - Default to parallel-safe guidance. If tests are not isolated, first propose fixing shared state before applying
.serialized. - Prefer traits for behavior and metadata (
.enabled,.disabled,.timeLimit,.bug, tags) over naming conventions or ad-hoc comments. - Recommend parameterized tests when multiple tests share logic and differ only in input values.
- Use
@availableon test functions for OS-gated behavior instead of runtime#availablechecks inside test bodies; never annotate suite types with@available. - Keep migration advice incremental: convert assertions first, then organize suites, then introduce parameterization/traits.
- Only import
Testingin test targets, never in app/library/binary targets.
First 60 seconds (triage template)
- Clarify the goal: new tests, migration, flaky failures, performance, CI filtering, or async waiting.
- Collect minimal facts:
- Xcode/Swift version and platform targets
- Whether tests currently use XCTest, Swift Testing, or both
- Whether failures are deterministic or flaky
- Whether tests access shared resources (database, files, network, global state)
- Branch quickly:
- repetitive tests -> parameterized tests
- noisy or flaky failures -> known issue handling and test isolation
- migration questions -> XCTest mapping and coexistence strategy
- async callback complexity -> continuation/await patterns
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 1004 B
- references/async-testing-and-waiting.md 3.2 KB
- references/expectations.md 3.4 KB
- references/fundamentals.md 3.7 KB
- references/migration-from-xctest.md 3.3 KB
- references/parallelization-and-isolation.md 2.5 KB
- references/parameterized-testing.md 8.8 KB
- references/performance-and-best-practices.md 4.3 KB
- references/traits-and-tags.md 2.9 KB
- references/xcode-workflows.md 2.2 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.
- 2d ago First seen · 82 lines · 73 tokens per session scan A ab8826c62b61
swift-testing-expert is a skill published in the GitHub repository patrickserrano/lacquer (3 stars, last pushed yesterday), licensed MIT. It adds 73 tokens to every session and 1,046 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 92% identical to swift-testing-expert, differing in 2 lines, and is treated as a copy.
Other skills, from other repositories
mobile-testing
Write and run mobile tests including widget tests, integration tests, and golden tests. Use when implementing test strategies for Flutter or React Native apps.
testing
Use when writing tests, running tests, adding test coverage, or debugging test failures. Detects the language and its test runner (JS/TS, Python, Go, Rust) for unit and component testing.
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…
modernize-tests
Modernize test suites to use modern Swift Testing features or migrate from XCTest.
device-interaction
Verify iOS app behavior on device or simulator via screenshots, UI hierarchy, and touch interactions.
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…