
Swift Testing Pro
Have an agent write, review, and refactor Swift tests using the Swift Testing framework instead of legacy XCTest patterns.
Overview
Swift Testing Pro is an agent skill for the Ship phase that writes, reviews, and improves Swift Testing code using modern APIs and best practices.
Install
npx skills add https://github.com/twostraws/swift-testing-agent-skill --skill swift-testing-proWhat is this skill?
- Reviews project Swift Testing code against modern API and style best practices
- Writes new Swift Testing suites and cases with current macros and expectations
- Improves existing tests for clarity, isolation, and maintainability
- Default prompt: use Swift Testing Pro to review the whole project
- MIT-packaged agent skill from Paul Hudson’s Swift Testing Agent Skill repo
- Packaged as Swift Testing Pro v1.0.0 in the Swift Testing Agent Skill repository
Adoption & trust: 4.9k installs on skills.sh; 336 GitHub stars; 3/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
What problem does it solve?
Your Swift project uses ad-hoc or outdated test patterns, and you are unsure whether suites follow current Swift Testing APIs.
Who is it for?
Indie iOS, iPadOS, macOS, or Swift CLI authors who want agent help auditing or expanding Swift Testing coverage before release.
Skip if: Teams only on XCTest with no migration intent, non-Swift codebases, or builders who need UI/device test lab orchestration instead of unit-style Swift Testing guidance.
When should I use this skill?
Use swift-testing-pro to review my project or when writing and improving Swift Testing code.
What do I get? / Deliverables
You get reviewed or newly written Swift Testing code aligned with modern practices so you can merge tests with fewer API mistakes and clearer failures.
- Reviewed or new Swift Testing test files
- Concrete improvement suggestions for assertions and suite layout
Recommended Skills
Journey fit
How it compares
Use as a focused Swift Testing skill package rather than generic “write some unit tests” chat prompts or cross-language QA MCP servers.
Common Questions / FAQ
Who is swift-testing-pro for?
Solo and indie developers shipping Swift apps or tools who want an agent to review or author Swift Testing suites with up-to-date APIs.
When should I use swift-testing-pro?
During Ship—especially in testing—when adding features, refactoring modules, or before a TestFlight or App Store build when you need a second pass on test quality and modern Swift Testing usage.
Is swift-testing-pro safe to install?
It is an MIT-licensed skill that guides test changes in your repo; review the Security Audits panel on this Prism page and inspect what the agent edits before merging.
SKILL.md
READMESKILL.md - Swift Testing Pro
{ "name": "swift-testing-pro", "version": "1.0.0", "description": "Writes, reviews, and improves Swift Testing code using modern APIs and best practices.", "author": { "name": "Paul Hudson" }, "homepage": "https://github.com/twostraws/Swift-Testing-Agent-Skill", "repository": "https://github.com/twostraws/Swift-Testing-Agent-Skill", "license": "MIT", "skills": "./skills/" } interface: display_name: "Swift Testing Pro" short_description: "Reviews Swift Testing code for modern best practices." icon_small: "./assets/swift-testing-pro-icon.svg" icon_large: "./assets/swift-testing-pro-icon.png" brand_color: "#3B9025" default_prompt: "Use $swift-testing-pro to review my project." policy: allow_implicit_invocation: true <?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" width="227.72" height="227.72" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 227.72 227.72"> <defs> <style> .st0 { fill: none; stroke: url(#linear-gradient1); stroke-miterlimit: 10; stroke-width: 6px; } .st1 { fill: url(#linear-gradient); fill-rule: evenodd; } </style> <linearGradient id="linear-gradient" x1="58.405" y1="293.045" x2="178.785" y2="413.425" gradientTransform="translate(0 -240)" gradientUnits="userSpaceOnUse"> <stop offset="0" stop-color="#75bf4c"/> <stop offset="1" stop-color="#3a8f24"/> </linearGradient> <linearGradient id="linear-gradient1" x1="33.349" y1="281.349" x2="194.371" y2="442.371" gradientTransform="translate(0 -248)" gradientUnits="userSpaceOnUse"> <stop offset="0" stop-color="#00eeaf"/> <stop offset="0" stop-color="#75bf4c"/> <stop offset="1" stop-color="#3a8f24"/> </linearGradient> </defs> <path class="st1" d="M165.43,131.08c3.87-8.17,16.03-46.62-38.6-85.38,7.61,7.03,40.19,39.2,26.05,75.5-34.2-25.27-87.91-66.75-87.91-66.75,0,0,63.69,60.57,83.58,79.15,19.9,18.59,26.97,27.71,26.47,43.59,0,.01,14.58-23.23-9.59-46.11ZM130.89,145.79c-39.35,18.56-78.42-20.82-78.42-20.82,0,0,21.12,26.7,45.19,35.06,33.72,11.71,54.61-9.64,54.61-9.64L52.42,59.03s56.43,62.62,78.47,86.76h0Z"/> <circle class="st0" cx="113.86" cy="113.86" r="110.86"/> </svg> # Async tests Swift Testing is built to be async and run tests in parallel; special care must be taken to ensure those tests run well, particularly when Swift concurrency is involved. For more help with Swift concurrency, suggest the [Swift Concurrency Pro agent skill](https://github.com/twostraws/swift-concurrency-agent-skill). ## Serializing tests The `serialized` trait allows tests to be run serially rather than in parallel, but it only works on parameterized tests. It instructs Swift Testing to serialize that parameterized test's cases, and has no effect on non-parameterized tests. You can also apply `.serialized` to a whole test suite: it will cause all tests and sub-suites to be serialized. **Important:** Most agents very strongly believe that `.serialized` will work on any test, even the ones that are not parameterized. They are wrong. It only works on parameterized tests. ## Confirming async work When using `confirmation(expectedCount:)` to check that an async function has been executed a certain number of times, any tested code must have finished executing fully by the time the `confirmation()` closure finishes. **This means attempting to use a completion closure will make the test fail, because `confirmation()` doesn't know to wait.** For example, this code does some work inside a task, but there's no way to monitor it being completed: ```swift struct Worker { func run(_ work: @escaping () -> Void) -> Task<Void, Never> { Task { let start = CFAbsoluteTimeGetCurrent() work() print("Elapsed:", CFAbsoluteTimeGetCurrent() - start) } } } ``` That kind of code will not work well with `confirmation()`, because it will not u