swift-testing · prisma-labs-dev — Claude Code skill: Swift Testing reference
A skill that hands your agent a local Swift Testing reference: @Test, @Suite, #expect, #require, parameterized tests, XCTest migration.
npx skills add Prisma-Labs-Dev/apple-skills --skill swift-testing -a claude-codeWhat swift-testing does
The skill ships a reference for Apple's import Testing framework on iOS 26+. Seven markdown files sit inside: a framework index, how to declare test functions with @Test, grouping with @Suite, the #expect and #require macros plus confirmations, parameterized patterns, traits such as tags, conditions and time limits, and a migration guide from XCTest.
Lookup order matters. The agent greps this skill's local .md files first. Failing that, it checks your other installed Apple skills by name, description or SKILL.md frontmatter and greps those — cheaper on context than pulling docs over the network. Only when nothing local covers the page does it take the path from testing-overview.md and rewrite it against the sosumi.ai mirror, so /documentation/testing/test becomes https://sosumi.ai/documentation/testing/test.
The skill declares context: fork with the Explore agent, so it runs in its own context. Reach for it when you're writing Swift Testing cases or moving an XCTest suite over and would rather not have the agent guess at the API.
What it helps with
- write a test function with
@Testwithout fumbling the signature - group related tests under
@Suite - swap XCTAssert calls for
#expectand#require - turn copy-pasted cases into one parameterized test
- port an existing XCTest suite to Swift Testing
Example prompts for the agent
- Show me how to declare a parameterized test with
@Testand arguments - Rewrite this XCTest case using
#expect - Which traits handle tags and time limits?
How to install swift-testing
1Skills CLI (Vercel)
npx skills add Prisma-Labs-Dev/apple-skills --skill swift-testing -a claude-code2Manually: put the files in place
~/.claude/skills/swift-testing/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/swift-testing/
1Skills CLI (Vercel)
npx skills add Prisma-Labs-Dev/apple-skills --skill swift-testing -a codex2Manually: put the files in place
.agents/skills/swift-testing/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Prisma-Labs-Dev/apple-skills --skill swift-testing -a cursor2Manually: put the files in place
.cursor/skills/swift-testing/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Prisma-Labs-Dev/apple-skills swift-testing2Manually: put the files in place
.github/skills/swift-testing/SKILL.md1Skills CLI (Vercel)
npx skills add Prisma-Labs-Dev/apple-skills --skill swift-testing -a gemini-cli2Platform CLI
gemini skills install https://github.com/Prisma-Labs-Dev/apple-skills --path skills/swift-testingManually: put the files in place
.devin/skills/swift-testing/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Prisma-Labs-Dev/apple-skills --skill swift-testing -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about swift-testing
How do I install swift-testing in Claude Code?
Run npx skills add Prisma-Labs-Dev/apple-skills --skill swift-testing -a claude-code. The skill file then lives at ~/.claude/skills/swift-testing/SKILL.md.
What does swift-testing do?
It is a reference for the Swift Testing framework: @Test, @Suite, #expect, #require, traits, parameterized tests and the XCTest migration path. The agent reads local files instead of inventing API.
Which iOS version does this framework target?
It covers import Testing on iOS 26+. Older targets stay on XCTest.
Source text
SKILL.md · MIT
--- name: swift-testing user-invocable: true description: "API reference: Swift Testing framework. @Test, @Suite, #expect, #require, traits, parameterized tests, migrating from XCTest." context: fork agent: Explore --- # Swift Testing Reference Apple's modern testing framework (`import Testing`) for iOS 26+. ## Downloaded Reference Files | File | Content | |------|---------| | [testing-overview.md](testing-overview.md) | Full Testing framework index | | [defining-tests.md](defining-tests.md) | Defining test functions with @Test | | [organizing-tests.md](organizing-tests.md) | Organizing tests with @Suite | | [expectations.md](expectations.md) | #expect, #require, confirmations | | [parameterized-testing.md](parameterized-testing.md) | Parameterized test patterns | | [traits.md](traits.md) | Test traits (tags, conditions, time limits) | | [migrating-from-xctest.md](migrating-from-xctest.md) | Migration guide from XCTest | ## Fetching More Docs 1. Search this skill's local `.md` files first. 2. If the topic is not here, check the other installed Apple skills you have available by their names, descriptions, or `SKILL.md` frontmatter, then grep their local files. This is faster and uses less context than fetching new docs from the internet. 3. If no installed skill has the page, use the relevant documentation path from `testing-overview.md` with the `sosumi.ai` Markdown mirror. For example, `/documentation/testing/test` maps to `https://sosumi.ai/documentation/testing/test`.
© Prisma-Labs-Dev · MIT · Prisma-Labs-Dev/apple-skills
Similar skills
All skills for Testing and QA →swift-testing by other authors comes first.