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 maintainability in Apple-platform or Swift server projects.
Install
Install this Claude and Codex skill with the command below. The command stays visible even when copy support is unavailable.
git clone https://github.com/AvdLee/Swift-Testing-Agent-Skill /tmp/Swift-Testing-Agent-Skill && ln -s /tmp/Swift-Testing-Agent-Skill/swift-testing-expert ~/.claude/skills/swift-testing-expert
From README
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 #expect as the default assertion and use #require when 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.
More skills
swiftui-expert-skill
Used when writing, reviewing, or refactoring SwiftUI code for iOS or macOS, including state management and...
update-swiftui-apis
Scan Apple's SwiftUI documentation for deprecated APIs and update the SwiftUI Expert Skill with modern replacements.
swift-concurrency
Diagnose Swift Concurrency issues, refactor callback-based code to async/await, and guide Swift 6 migration when...