Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Prisma-Labs-Dev/apple-skills --skill swift-testing -a claude-code
Open on GitHub

What 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 @Test without fumbling the signature
  • group related tests under @Suite
  • swap XCTAssert calls for #expect and #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 @Test and 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-code

2Manually: put the files in place

~/.claude/skills/swift-testing/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/swift-testing/

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.

From the same set28

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor