Agent skill

Swift Testing Pro

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

Writes, reviews, and improves Swift Testing code using modern APIs and best practices.

MITAuto-check passedMobile

Install Swift Testing Pro

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

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

GitHub CLI
$ gh skill install twostraws/Swift-Testing-Agent-Skill swift-testing-pro --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/twostraws/Swift-Testing-Agent-Skill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/swift-testing-pro .claude/skills/swift-testing-pro && 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-pro
GitHub stars
448
Token cost
~1.1k tokens
SKILL.md length
495 words
Files
11 (incl. references, assets)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Writes, reviews, and improves Swift Testing code using modern APIs and best practices.

  • Works in 5 steps: Ensure tests follow core Swift Testing… → Validate test structure, assertions,… → Check async tests, confirmations, time… → …
  • Reviewing projects that use Swift Testing
  • SKILL.md covers Core Instructions, Output Format and References
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Swift Testing Pro is an agent skill from twostraws/Swift-Testing-Agent-Skill. Writes, reviews, and improves Swift Testing code using modern APIs and best practices. Use when reading, writing, or reviewing projects that use Swift Testing.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 14 other files, including reference files and assets (for example `.claude-plugin/plugin.json`, `agents/openai.yaml` and `references/async-tests.md`).

It sits in Mobile, covering iOS development. The repository describes itself as: Swift Testing agent skill for Claude Code, Codex, and other AI tools. The licence is MIT.

When your agent uses it

  • Reviewing projects that use Swift Testing
  • Tasks that involve iOS development

Example prompts

  • “/swift-testing-pro”

Workflow steps

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

  1. Ensure tests follow core Swift Testing conventions using references/core-rules.md.
  2. Validate test structure, assertions, dependency injection, and other 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, test scopes, exit tests, and attachments are used correctly using references/new-features.md.
  5. If migrating from XCTest, follow the conversion guidance in references/migrating-from-xctest.md.

What it can do on your machine

Read from SKILL.md and the folder at commit 2d6bba1. 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 (its code samples are swift).

    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 Pro loads about 1.1k tokens when it runs, and up to ~10k if it reads all its reference files. Until then it costs about 44 tokens; SKILL.md has 495 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~44
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
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 twostraws/Swift-Testing-Agent-Skill at commit 2d6bba1, republished under its MIT licence (© twostraws). 495 words, ~1,075 tokens.

Download SKILL.mdSave it as .claude/skills/swift-testing-pro/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
swift-testing-pro
description
Writes, reviews, and improves Swift Testing code using modern APIs and best practices. Use when reading, writing, or reviewing projects that use Swift Testing.
license
MIT
metadata.author
Paul Hudson
metadata.version
1.0

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.

Review process:

  1. Ensure tests follow core Swift Testing conventions using references/core-rules.md.
  2. Validate test structure, assertions, dependency injection, and other 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, test scopes, exit tests, and attachments are used correctly using references/new-features.md.
  5. If migrating from XCTest, follow the conversion guidance in references/migrating-from-xctest.md.

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

Core Instructions

  • Target Swift 6.2 or later, using modern Swift concurrency.
  • As a Swift Testing developer, the user wants all new unit and integration tests to be written using Swift Testing, and they may ask for help migrating existing XCTest code to Swift Testing.
  • Swift Testing does not support UI tests – XCTest must be used there.
  • Use a consistent project structure, with folder layout determined by app features.

Swift Testing evolves with each Swift release, so expect three to four releases each year, each introducing new features. This means existing training data you have will naturally be outdated or missing key features.

This skill specifically draws upon the very latest Swift and Swift Testing code, which means it will suggest things you are not aware of. Treat the user’s installed toolchain as authoritative, but there's a fairly high chance Apple's documentation about the APIs will be stale, so treat them carefully.

Output Format

If the user asks for a review, organize findings by file. For each issue:

  1. State the file and relevant line(s).
  2. Name the rule being violated.
  3. Show a brief before/after code fix.

Skip files with no issues. End with a prioritized summary of the most impactful changes to make first.

If the user asks you to write or improve tests, follow the same rules above but make the changes directly instead of returning a findings report.

Example output:

Show full SKILL.md (158 more words)Show less
UserTests.swift

Line 5: Use struct, not class, for test suites.

swift
// Before
class UserTests: XCTestCase {

// After
struct UserTests {

Line 12: Use #expect instead of XCTAssertEqual.

swift
// Before
XCTAssertEqual(user.name, "Taylor")

// After
#expect(user.name == "Taylor")

Line 30: Use #require for preconditions, not #expect.

swift
// Before
#expect(users.isEmpty == false)
let first = users.first!

// After
let first = try #require(users.first)
Summary
  1. Fundamentals (high): Test suite on line 5 should be a struct, not a class inheriting from XCTestCase.
  2. Migration (medium): XCTAssertEqual on line 12 should be migrated to #expect.
  3. Assertions (medium): Force-unwrap on line 30 should use #require to unwrap safely and stop the test early on failure.

End of example.

References

  • references/core-rules.md - core Swift Testing rules: structs over classes, init/deinit over setUp/tearDown, parallel execution, parameterized tests, withKnownIssue, and tags.
  • references/writing-better-tests.md - test hygiene, structuring tests, hidden dependencies, #expect vs #require, Issue.record(), #expect(throws:), and verification methods.
  • references/async-tests.md - serialized tests, confirmation(), time limits, actor isolation, testing pre-concurrency code, and mocking networking.
  • references/new-features.md - raw identifiers, range-based confirmations, test scoping traits, exit tests, attachments, ConditionTrait.evaluate(), and the updated #expect(throws:) return value.
  • references/migrating-from-xctest.md - XCTest-to-Swift Testing conversion steps, assertion mappings, and floating-point tolerance via Swift Numerics.

© twostraws, 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, assets) in swift-testing-pro of twostraws/Swift-Testing-Agent-Skill.

  • SKILL.md
  • .claude-plugin/plugin.json
  • agents/openai.yaml
  • assets/swift-testing-pro-icon.png
  • assets/swift-testing-pro-icon.svg
  • references/async-tests.md
  • references/core-rules.md
  • references/migrating-from-xctest.md
  • references/new-features.md
  • references/writing-better-tests.md
  • skills

Open the folder on GitHubat commit 2d6bba1

Compare with similar skills

Swift Testing Pro 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 Pro compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Swift Testing Pro this skilltwostraws/Swift-Testing-Agent-Skill448—~1.1kAutomated safety check: PassMIT
Swiftui Protwostraws/SwiftUI-Agent-Skill5.1k2 repos~1.5kAutomated safety check: PassMIT
Swiftui UI PatternsAFK-surf/OpenBridge4304 repos~887Automated safety check: PassMIT
Swiftui Performance Auditharperreed/dotfiles3348 repos~1.4kAutomated safety check: PassNone
Swift Testing ExpertAvdLee/Swift-Testing-Agent-Skill4691 repos~1.2kAutomated safety check: PassMIT
Hig Project Contextraintree-technology/hig-doctor1435 repos~1.2kAutomated safety check: PassMIT

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
  • 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
  • Swift Testing Expert

    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.

    469 GitHub starsUsed in 1 repo~1.2k tokens
    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
  • Hig Components Content

    raintree-technology/hig-doctor

    Apple Human Interface Guidelines for content display components.

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

Categories

Questions about Swift Testing Pro

What does Swift Testing Pro do?

Writes, reviews, and improves Swift Testing code using modern APIs and best practices. Swift Testing Pro is an agent skill from twostraws/Swift-Testing-Agent-Skill. Writes, reviews, and improves Swift Testing code using modern APIs and best practices.

When should I use Swift Testing Pro?

Swift Testing Pro fits situations like: reviewing projects that use Swift Testing; tasks that involve iOS development.

How do I install Swift Testing Pro in Claude Code?

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

How do I install Swift Testing Pro in Codex?

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

Can I use Swift Testing Pro 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 twostraws/Swift-Testing-Agent-Skill --skill swift-testing-pro -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-pro, .gemini/skills/swift-testing-pro, .github/skills/swift-testing-pro and .opencode/skills/swift-testing-pro in your project.

What does Swift Testing Pro need to run?

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

Does Swift Testing Pro 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 Pro 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 Pro use?

Swift Testing Pro is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Swift Testing Pro use?

About 1.1k tokens (SKILL.md is roughly 4.3k 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 9k tokens, read only when the agent opens those files.

What are the alternatives to Swift Testing Pro?

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

Who maintains Swift Testing Pro?

twostraws (a GitHub user) maintains it in twostraws/Swift-Testing-Agent-Skill, which has 448 GitHub stars. The repository was last updated on May 17, 2026.

Source: twostraws/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.