.agents/skills/swift-testing-expert/SKILL.md
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.
npx skillsauth add clerk/clerk-ios swift-testing-expertInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
XCUIApplication), performance metrics (XCTMetric), and Objective-C-only test code.#expect as the default assertion and use #require when subsequent lines depend on a prerequisite value..serialized..enabled, .disabled, .timeLimit, .bug, tags) over naming conventions or ad-hoc comments.@available on test functions for OS-gated behavior instead of runtime #available checks inside test bodies; never annotate suite types with @available.Testing in test targets, never in app/library/binary targets.references/fundamentals.md#expect, #require, and throw expectations -> references/expectations.mdreferences/traits-and-tags.mdreferences/parameterized-testing.md.serialized, isolation strategy -> references/parallelization-and-isolation.mdreferences/performance-and-best-practices.mdreferences/async-testing-and-waiting.mdreferences/migration-from-xctest.mdreferences/xcode-workflows.mdreferences/_index.mdtestFooCaseA/testFooCaseB/... methods -> replace with one parameterized @Test(arguments:).try #require(...) then assert on unwrapped value..serialized only as a transition step.withKnownIssue for temporary known failures to preserve signal.CustomTestStringConvertible for focused test diagnostics.#require where failure should stop the test.references/_index.mdreferences/fundamentals.mdreferences/expectations.mdreferences/traits-and-tags.mdreferences/parameterized-testing.mdreferences/parallelization-and-isolation.mdreferences/performance-and-best-practices.mdreferences/async-testing-and-waiting.mdreferences/migration-from-xctest.mdreferences/xcode-workflows.mddevelopment
Refactor and review SwiftUI view files for consistent structure, dependency injection, and Observation usage. Use when asked to clean up a SwiftUI view’s layout/ordering, handle view models safely (non-optional when possible), or standardize how dependencies and @Observable state are initialized and passed.
development
Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance. Use when reading, writing, or reviewing SwiftUI projects.
development
Expert guidance on Swift Concurrency best practices, patterns, and implementation. Use when developers mention: (1) Swift Concurrency, async/await, actors, or tasks, (2) "use Swift Concurrency" or "modern concurrency patterns", (3) migrating to Swift 6, (4) data races or thread safety issues, (5) refactoring closures to async/await, (6) @MainActor, Sendable, or actor isolation, (7) concurrent code architecture or performance optimization, (8) concurrency-related linter warnings (SwiftLint or similar; e.g. async_without_await, Sendable/actor isolation/MainActor lint).
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.