Skip to main content
skill CX Codex

guide-swift-testing — Claude Code skill: what it does, how to install

Provides patterns and review rules for Swift Testing. Helps write and audit test suites targeting Swift 6.2 concurrency.

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

What guide-swift-testing does

This skill guides coding agents through modern Swift Testing conventions targeting Swift 6.2. It enforces using structs over classes, @Suite containers, parallel test execution, and #expect or #require checks.

The review workflow relies on reference guides located in references/. They cover async handling via confirmation(), actor isolation, exit tests, and attachments. The instructions explicitly tell the agent to report genuine issues only and avoid nitpicking.

Swift Testing does not support UI testing. UI tests require XCTest. The guide also instructs agents never to convert existing XCTest suites unless explicitly requested.

What it helps with

  • migrate test suites from XCTest to modern Swift Testing
  • validate async tests with confirmation() and actor isolation
  • review test suites against Swift 6.2 concurrency standards
  • implement exit tests and test attachments correctly

Example prompts for the agent

  • Review this test suite against modern Swift Testing concurrency rules
  • Help me migrate this XCTest class to a Swift Testing struct
  • Add an exit test and attachment using Swift Testing patterns

How to install guide-swift-testing

1Skills CLI (Vercel)

npx skills add Prisma-Labs-Dev/apple-skills --skill guide-swift-testing -a claude-code

2Manually: put the files in place

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

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

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about guide-swift-testing

How to install guide-swift-testing in Claude Code?

Run npx skills add Prisma-Labs-Dev/apple-skills --skill guide-swift-testing -a claude-code in your terminal.

What does guide-swift-testing do?

It provides workflow rules and review guidelines for Swift Testing in Swift 6.2, covering async assertions, migrations, and exit tests.

Can guide-swift-testing be used for UI tests?

No. Swift Testing lacks UI test support, so all user interface automation must stay in XCTest.

Source text

SKILL.md · MIT
---
name: guide-swift-testing
description: Swift Testing patterns — structs over classes, async confirmations, parameterized tests, exit tests, attachments, common agent mistakes. Use when writing, reviewing, or migrating Swift Testing code.
type: guide
origin: https://github.com/twostraws/Swift-Testing-Agent-Skill
license: MIT
---

> **Guide Skill** — This is an expert workflow/pattern guide, not API reference documentation.
> Originally from [twostraws/Swift-Testing-Agent-Skill](https://github.com/twostraws/Swift-Testing-Agent-Skill) by Paul Hudson. MIT License.

# Swift Testing Patterns

Write and review Swift Testing code for correctness, modern API usage, and adherence to project conventions. Report only genuine problems — do not nitpick or invent issues.

## Core Instructions

- Target Swift 6.2 or later, using modern Swift concurrency.
- Swift Testing does *not* support UI tests — XCTest must be used there.
- Do not rewrite existing XCTest to Swift Testing unless requested.

## Review Process

1. Ensure tests follow core conventions using `references/core-rules.md`.
2. Validate structure, assertions, dependency injection, and best practices using `references/writing-better-tests.md`.
3. Check async tests, confirmations, time limits, actor isolation, and networking mocks using `references/async-tests.md`.
4. Ensure new features like raw identifiers, exit tests, and attachments are used correctly using `references/new-features.md`.
5. If migrating from XCTest, follow `references/migrating-from-xctest.md`.

If doing partial work, load only the relevant reference files.

## References

| Topic | Reference |
|-------|-----------|
| Structs over classes, `@Suite`, parallel execution, `withKnownIssue`, tags | `references/core-rules.md` |
| Test hygiene, structure, DI, `#expect` vs `#require`, `Issue.record()`, verification methods | `references/writing-better-tests.md` |
| Serialized tests, `confirmation()`, time limits, actor isolation, mocking networking | `references/async-tests.md` |
| Raw identifiers, exit tests, attachments, test scoping traits, range-based confirmations | `references/new-features.md` |
| XCTest-to-Swift Testing conversion, assertion mappings, floating-point tolerance | `references/migrating-from-xctest.md` |

© Prisma-Labs-Dev · MIT · Prisma-Labs-Dev/apple-skills

Similar skills

Everything for Testing and QA →

From the same set21

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