Agent skill

Swift Testing Expert

by AvdLee in AvdLee/Swift-Testing-Agent-Skill

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.

MITAuto-check passedMobile

Install Swift Testing Expert

skills CLI
$ npx skills add AvdLee/Swift-Testing-Agent-Skill --skill swift-testing-expert -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install AvdLee/Swift-Testing-Agent-Skill swift-testing-expert --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/AvdLee/Swift-Testing-Agent-Skill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/swift-testing-expert .claude/skills/swift-testing-expert && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
swift-testing-expert
GitHub stars
469
Used in
1 other repo
Token cost
~1.2k tokens
SKILL.md length
487 words
Files
11 (incl. references)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

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.

  • Works in 8 steps: Prefer Swift Testing for Swift unit and… → Treat #expect as the default assertion… → Default to parallel-safe guidance. If… → …
  • Writing new Swift tests
  • SKILL.md covers Overview, Agent behavior contract…, First 60 seconds (triage… and Routing map (read the right…, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Swift Testing Expert is an agent skill from AvdLee/Swift-Testing-Agent-Skill. 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.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files, including reference files (for example `references/_index.md`, `references/async-testing-and-waiting.md` and `references/expectations.md`).

It sits in Mobile, covering iOS development. The repository describes itself as: An agent skill focused entirely on Swift Testing, helping you write better tests, migrate from XCTest, improve test architecture, and adopt modern Swift testing patterns with… The licence is MIT.

When your agent uses it

  • Writing new Swift tests
  • Modernizing XCTest suites
  • Debugging flaky tests
  • Improving test quality and maintainability in Apple-platform

Example prompts

  • “/swift-testing-expert”

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Prefer Swift Testing for Swift unit and integration tests, but keep XCTest for UI automation (XCUIApplication), performance metrics…
  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…
  7. Keep migration advice incremental: convert assertions first, then organize suites, then introduce parameterization/traits.
  8. Only import Testing in test targets, never in app/library/binary targets.

What it can do on your machine

Read from SKILL.md and the folder at commit 798e9b1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Swift Testing Expert loads about 1.2k tokens when it runs, and up to ~10k if it reads all its reference files. Until then it costs about 97 tokens; SKILL.md has 487 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~97
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~10k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from AvdLee/Swift-Testing-Agent-Skill at commit 798e9b1, republished under its MIT licence (© AvdLee). 487 words, ~1,227 tokens.

Download SKILL.mdSave it as .claude/skills/swift-testing-expert/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
swift-testing-expert
description
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

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.
  7. Keep migration advice incremental: convert assertions first, then organize suites, then introduce parameterization/traits.
  8. Only import Testing in test targets, never in app/library/binary targets.

First 60 seconds (triage template)

  • Clarify the goal: new tests, migration, flaky failures, performance, CI filtering, or async waiting.
  • Collect minimal facts:
    • Xcode/Swift version and platform targets
    • Whether tests currently use XCTest, Swift Testing, or both
    • Whether failures are deterministic or flaky
    • Whether tests access shared resources (database, files, network, global state)
  • Branch quickly:
    • repetitive tests -> parameterized tests
    • noisy or flaky failures -> known issue handling and test isolation
    • migration questions -> XCTest mapping and coexistence strategy
    • async callback complexity -> continuation/await patterns
Show full SKILL.md (226 more words)Show less

Routing map (read the right reference fast)

  • Test building blocks and suite organization -> references/fundamentals.md
  • #expect, #require, and throw expectations -> references/expectations.md
  • Traits, tags, and Xcode test-plan filtering -> references/traits-and-tags.md
  • Parameterized test design and combinatorics -> references/parameterized-testing.md
  • Default parallel execution, .serialized, isolation strategy -> references/parallelization-and-isolation.md
  • Test speed, determinism, and flakiness prevention -> references/performance-and-best-practices.md
  • Async waiting and callback bridging -> references/async-testing-and-waiting.md
  • XCTest coexistence and migration workflow -> references/migration-from-xctest.md
  • Test navigator/report workflows and diagnostics -> references/xcode-workflows.md
  • Index and quick navigation -> references/_index.md

Common pitfalls -> next best move

  • Repetitive testFooCaseA/testFooCaseB/... methods -> replace with one parameterized @Test(arguments:).
  • Failing optional preconditions hidden in later assertions -> try #require(...) then assert on unwrapped value.
  • Flaky integration tests on shared database -> isolate dependencies or in-memory repositories; use .serialized only as a transition step.
  • Disabled tests that silently rot -> prefer withKnownIssue for temporary known failures to preserve signal.
  • Unclear failure values for complex types -> conform type to CustomTestStringConvertible for focused test diagnostics.
  • Test-plan include/exclude by names -> use tags and tag-based filters instead.

Verification checklist

  • Confirm each test has a single clear behavior and expressive display name when needed.
  • Confirm prerequisites use #require where failure should stop the test.
  • Confirm repeated logic is parameterized instead of duplicated.
  • Confirm tests are parallel-safe or intentionally serialized with rationale.
  • Confirm async code is awaited and callback APIs are bridged safely.
  • Confirm migration keeps unsupported XCTest-only scenarios on XCTest.

References

  • references/_index.md
  • references/fundamentals.md
  • references/expectations.md
  • references/traits-and-tags.md
  • references/parameterized-testing.md
  • references/parallelization-and-isolation.md
  • references/performance-and-best-practices.md
  • references/async-testing-and-waiting.md
  • references/migration-from-xctest.md
  • references/xcode-workflows.md

© AvdLee, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 10 other files (references) in swift-testing-expert of AvdLee/Swift-Testing-Agent-Skill.

  • SKILL.md
  • references/_index.md
  • references/async-testing-and-waiting.md
  • references/expectations.md
  • references/fundamentals.md
  • references/migration-from-xctest.md
  • references/parallelization-and-isolation.md
  • references/parameterized-testing.md
  • references/performance-and-best-practices.md
  • references/traits-and-tags.md
  • references/xcode-workflows.md

Open the folder on GitHubat commit 798e9b1

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in AvdLee/Swift-Testing-Agent-Skill, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Swift Testing Expert next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Swift Testing Expert compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Swift Testing Expert this skillAvdLee/Swift-Testing-Agent-Skill4691 repos~1.2kAutomated safety check: PassMIT
Swiftui Protwostraws/SwiftUI-Agent-Skill5.1k2 repos~1.5kAutomated safety check: PassMIT
Orca iOS Simulator Controlstablyai/orca87k1 repos~584Automated safety check: PassApache-2.0
Swiftui UI PatternsAFK-surf/OpenBridge4304 repos~887Automated safety check: PassMIT
Swiftui Performance Auditharperreed/dotfiles3348 repos~1.4kAutomated safety check: PassNone
Fory Version Bumpapache/fory4.6k—~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • Swiftui Pro

    twostraws/SwiftUI-Agent-Skill

    Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance.

    5.1k GitHub starsUsed in 2 repos~1.5k tokens
    MobileAuto-check passed
  • iOS Simulator control from inside Orca, with the live device view in Orca's emulator pane. Use when driving a booted Apple Simulator on macOS: taps, gestures…

    87k GitHub starsUsed in 1 repo~584 tokens
    MobileAuto-check passed
  • Swiftui UI Patterns

    AFK-surf/OpenBridge

    Best practices and example-driven guidance for building SwiftUI views and components.

    430 GitHub starsUsed in 4 repos~887 tokens
    MobileAuto-check passed
  • Swiftui Performance Audit

    harperreed/dotfiles

    Audit and improve SwiftUI runtime performance from code review and architecture.

    334 GitHub starsUsed in 8 repos~1.4k tokens
    MobileAuto-check passed
  • Bump Apache Fory release or post-release development versions across Java, Kotlin, Scala, Python, Rust, Go, C++, C, Dart, JavaScript, Swift, integration tests, examples, and source docs.

    4.6k GitHub stars~1.1k tokensUpdated yesterday
    MobileAuto-check passed
  • Hig Project Context

    raintree-technology/hig-doctor

    Create or update a shared Apple design context document that other HIG skills use to tailor guidance.

    143 GitHub starsUsed in 5 repos~1.2k tokens
    MobileAuto-check passed

Questions about Swift Testing Expert

What does Swift Testing Expert do?

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. Swift Testing Expert is an agent skill from AvdLee/Swift-Testing-Agent-Skill. 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.

When should I use Swift Testing Expert?

Swift Testing Expert fits situations like: writing new Swift tests; modernizing XCTest suites; debugging flaky tests; improving test quality and maintainability in Apple-platform.

How do I install Swift Testing Expert in Claude Code?

Run `npx skills add AvdLee/Swift-Testing-Agent-Skill --skill swift-testing-expert -a claude-code`. Or copy the skill folder (swift-testing-expert in AvdLee/Swift-Testing-Agent-Skill) into .claude/skills/swift-testing-expert in your project. Claude Code loads it when a task matches its description.

How do I install Swift Testing Expert in Codex?

Run `npx skills add AvdLee/Swift-Testing-Agent-Skill --skill swift-testing-expert -a codex`. Or copy the skill folder (swift-testing-expert in AvdLee/Swift-Testing-Agent-Skill) into .agents/skills/swift-testing-expert in your project. Codex loads it when a task matches its description.

Can I use Swift Testing Expert in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add AvdLee/Swift-Testing-Agent-Skill --skill swift-testing-expert -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/swift-testing-expert, .gemini/skills/swift-testing-expert, .github/skills/swift-testing-expert and .opencode/skills/swift-testing-expert in your project.

What does Swift Testing Expert need to run?

SKILL.md names no scripts, command-line tools or credentials: Swift Testing Expert is instructions for the agent only.

Does Swift Testing Expert access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Swift Testing Expert safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Swift Testing Expert use?

Swift Testing Expert is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Swift Testing Expert use?

About 1.2k tokens (SKILL.md is roughly 4.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 9.1k tokens, read only when the agent opens those files.

What are the alternatives to Swift Testing Expert?

Skills that share tags, products or a category with Swift Testing Expert: Swiftui Pro (twostraws/SwiftUI-Agent-Skill, 5.1k stars), Orca iOS Simulator Control (stablyai/orca, 87k stars), Swiftui UI Patterns (AFK-surf/OpenBridge, 430 stars) and Swiftui Performance Audit (harperreed/dotfiles, 334 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Swift Testing Expert?

AvdLee (a GitHub user) maintains it in AvdLee/Swift-Testing-Agent-Skill, which has 469 GitHub stars. The repository was last updated on September 14, 2026.

Source: AvdLee/Swift-Testing-Agent-Skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.