swift-testing-expert

Installation
SKILL.md

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)

  1. 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.
  2. Treat #expect as the default assertion and use #require when subsequent lines depend on a prerequisite value.
  3. Default to parallel-safe guidance. If tests are not isolated, first propose fixing shared state before applying .serialized.
  4. Prefer traits for behavior and metadata (.enabled, .disabled, .timeLimit, .bug, tags) over naming conventions or ad-hoc comments.
  5. Recommend parameterized tests when multiple tests share logic and differ only in input values.
  6. Use @available on test functions for OS-gated behavior instead of runtime #available checks inside test bodies; never annotate suite types with @available.
  7. Keep migration advice incremental: convert assertions first, then organize suites, then introduce parameterization/traits.
  8. Only import Testing in test targets, never in app/library/binary targets.

First 60 seconds (triage template)

Installs
3.3K
GitHub Stars
407
First Seen
Feb 12, 2026
swift-testing-expert — avdlee/swift-testing-agent-skill