Individual skill

swift-testing-expert

Expert guidance for Swift Testing: test structure, #expect/#require macros, traits and tags, parameterized tests, test plans, parallel execution, async waiting patterns, and XCTest migration. Use when writing new Swift tests, modernizing XCTest suites, debugging flaky tests, or improving test quality and maintainability in Apple-platform or Swift server projects.

swift-testing-expert/SKILL.md

Read pinned source

Source commit 798e9b1a2bcac164d4f0c781908199e754f0bab6

What was checked

Matches the observed repository HEAD
Yes
Scanner rules are current
Yes
Repository scan complete
Yes
Skill scan complete
Yes
Observed behavior
Instructions only
Last checked
Nov 10, 2026

These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.

Install this skill

Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.

Claude Code

Destination .claude/skills/swift-testing-expert

( set -euo pipefail destination='./.claude/skills/swift-testing-expert' if [ -e "$destination" ] || [ -L "$destination" ]; then printf '%s\n' 'Destination already exists; nothing overwritten.' >&2; exit 1; fi work=$(mktemp -d) trap 'rm -rf -- "$work"' EXIT git clone --filter=blob:none --no-checkout -- 'https://github.com/AvdLee/Swift-Testing-Agent-Skill.git' "$work/repo" git -C "$work/repo" checkout --detach 798e9b1a2bcac164d4f0c781908199e754f0bab6 git -C "$work/repo" archive --format=tar '798e9b1a2bcac164d4f0c781908199e754f0bab6:swift-testing-expert' > "$work/skill.tar" mkdir -p -- './.claude/skills' mkdir -- "$destination" tar -xf "$work/skill.tar" -C "$destination" )
Codex

Destination .agents/skills/swift-testing-expert

( set -euo pipefail destination='./.agents/skills/swift-testing-expert' if [ -e "$destination" ] || [ -L "$destination" ]; then printf '%s\n' 'Destination already exists; nothing overwritten.' >&2; exit 1; fi work=$(mktemp -d) trap 'rm -rf -- "$work"' EXIT git clone --filter=blob:none --no-checkout -- 'https://github.com/AvdLee/Swift-Testing-Agent-Skill.git' "$work/repo" git -C "$work/repo" checkout --detach 798e9b1a2bcac164d4f0c781908199e754f0bab6 git -C "$work/repo" archive --format=tar '798e9b1a2bcac164d4f0c781908199e754f0bab6:swift-testing-expert' > "$work/skill.tar" mkdir -p -- './.agents/skills' mkdir -- "$destination" tar -xf "$work/skill.tar" -C "$destination" )
Cursor

Destination .cursor/skills/swift-testing-expert

( set -euo pipefail destination='./.cursor/skills/swift-testing-expert' if [ -e "$destination" ] || [ -L "$destination" ]; then printf '%s\n' 'Destination already exists; nothing overwritten.' >&2; exit 1; fi work=$(mktemp -d) trap 'rm -rf -- "$work"' EXIT git clone --filter=blob:none --no-checkout -- 'https://github.com/AvdLee/Swift-Testing-Agent-Skill.git' "$work/repo" git -C "$work/repo" checkout --detach 798e9b1a2bcac164d4f0c781908199e754f0bab6 git -C "$work/repo" archive --format=tar '798e9b1a2bcac164d4f0c781908199e754f0bab6:swift-testing-expert' > "$work/skill.tar" mkdir -p -- './.cursor/skills' mkdir -- "$destination" tar -xf "$work/skill.tar" -C "$destination" )
Gemini CLI

Destination .gemini/skills/swift-testing-expert

( set -euo pipefail destination='./.gemini/skills/swift-testing-expert' if [ -e "$destination" ] || [ -L "$destination" ]; then printf '%s\n' 'Destination already exists; nothing overwritten.' >&2; exit 1; fi work=$(mktemp -d) trap 'rm -rf -- "$work"' EXIT git clone --filter=blob:none --no-checkout -- 'https://github.com/AvdLee/Swift-Testing-Agent-Skill.git' "$work/repo" git -C "$work/repo" checkout --detach 798e9b1a2bcac164d4f0c781908199e754f0bab6 git -C "$work/repo" archive --format=tar '798e9b1a2bcac164d4f0c781908199e754f0bab6:swift-testing-expert' > "$work/skill.tar" mkdir -p -- './.gemini/skills' mkdir -- "$destination" tar -xf "$work/skill.tar" -C "$destination" )
GitHub Copilot

Destination .github/skills/swift-testing-expert

( set -euo pipefail destination='./.github/skills/swift-testing-expert' if [ -e "$destination" ] || [ -L "$destination" ]; then printf '%s\n' 'Destination already exists; nothing overwritten.' >&2; exit 1; fi work=$(mktemp -d) trap 'rm -rf -- "$work"' EXIT git clone --filter=blob:none --no-checkout -- 'https://github.com/AvdLee/Swift-Testing-Agent-Skill.git' "$work/repo" git -C "$work/repo" checkout --detach 798e9b1a2bcac164d4f0c781908199e754f0bab6 git -C "$work/repo" archive --format=tar '798e9b1a2bcac164d4f0c781908199e754f0bab6:swift-testing-expert' > "$work/skill.tar" mkdir -p -- './.github/skills' mkdir -- "$destination" tar -xf "$work/skill.tar" -C "$destination" )
OpenCode

Destination .opencode/skills/swift-testing-expert

( set -euo pipefail destination='./.opencode/skills/swift-testing-expert' if [ -e "$destination" ] || [ -L "$destination" ]; then printf '%s\n' 'Destination already exists; nothing overwritten.' >&2; exit 1; fi work=$(mktemp -d) trap 'rm -rf -- "$work"' EXIT git clone --filter=blob:none --no-checkout -- 'https://github.com/AvdLee/Swift-Testing-Agent-Skill.git' "$work/repo" git -C "$work/repo" checkout --detach 798e9b1a2bcac164d4f0c781908199e754f0bab6 git -C "$work/repo" archive --format=tar '798e9b1a2bcac164d4f0c781908199e754f0bab6:swift-testing-expert' > "$work/skill.tar" mkdir -p -- './.opencode/skills' mkdir -- "$destination" tar -xf "$work/skill.tar" -C "$destination" )

Repository context

Repository stars (not skill ratings)
479
Repository last updated
Sep 14, 2026
License
MIT

Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.

Files and excerpt

File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.

Browse files
Read excerpt

# Swift Testing

## Overview

Use this skill to write, review, migrate, and debug Swift tests with modern Swift Testing APIs. Prioritize readable tests, robust parallel execution, clear diagnostics, and incremental migration from XCTest where needed.

## Agent behavior contract (follow these rules)

1. Prefer Swift Testing for Swift unit and integration tests, but keep XCTest for UI automation (`XCUIApplication`), performance metrics (`XCTMetric`), and Objective-C-only test code.
2. Treat `#expect` as the default assertion and use `#require` when subsequent lines depend on a prerequisite value.
3. Default to parallel-safe guidance. If tests are not isolated, first propose fixing shared state before applying `.serialized`.
4. Prefer traits for behavior and metadata (`.enabled`, `.disabled`, `.timeLimit`, `.bug`, tags) over naming conventions or ad-hoc comments.
5. Recommend parameterized tests when multiple tests share logic and differ only in input values.
6. Use `@available` on test functions for OS-gated behavior instead of runtime `#available` checks inside test bodies; never annotate suite types with `@available`.
Back to top