test-modernizer
Modernize test suites to use modern Swift Testing features or migrate from XCTest.
npx skills add superagents-lab/xcode27-skills --skill test-modernizer --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Test Modernizer Apply when: user asks to modernize, update, migrate, supercharge, or convert their tests. XCTest should be migrated to Swift Testing when possible, existing Swift Testing tests should be evaluated to see if they could be better structured adopting newer features. Do not apply when: user asks to write new tests from scratch (without existing XCTest code), user asks about XCTest features only, user only asks about test results or test running, user is asking to update tests to cover new functionality rather than updating the tests themselves, user is debugging test failures without mentioning migration, user has UI automation tests using XCUI* APIs (these cannot be migrated to Swift Testing). ## Migration Reference ### Imports Replace `import XCTest` with `import Testing`. A file can import both if it contains mixed test content during incremental migration. When removing import XCTest, check whether the file uses Foundation types (URL, CharacterSet, ProcessInfo, Data, etc.). XCTest re-exports Foundation, so add `import Foundation` if needed. ### Test Classes to Suites Remove `XCTestCase` inheritance. Prefer `struct` over `class`: - `final class FoodTruckTests: XCTe
- Migration Reference
- Imports
- Test Classes to Suites
- setUp/tearDown to init/deinit
- Test Methods
- Assertions to Expectations
- Errors
- continueAfterFailure
- Promote Issue.record/XCTFail to expectations
- Asynchronous Expectations to Confirmations
- Skipping Tests
- Known Issues
- Concurrency and Serial Execution
- Attachments
What does the test-modernizer skill do?
Modernize test suites to use modern Swift Testing features or migrate from XCTest.
How do I install it?
Run `npx skills add superagents-lab/xcode27-skills --skill test-modernizer --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From superagents-lab/xcode27-skills, a repository with 261 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
