swift-testing-pro

swift-testing-pro is a skill for Codex from jacklandrin/OnlySwitch. It costs 34 tokens per session (959 once invoked), scanned A, original, MIT.

A coding guide for Swift Testing, Apple’s newer framework for writing automated tests in Swift. It helps write and review unit and integration tests, including tests that use asynchronous code.

In plain words
What is it for?
Use it to write, review, improve, or migrate Swift Testing tests in Swift 6.2 or later projects. It covers async tests, networking mocks, test time limits, actor isolation, and newer Swift Testing features.
Why use it?
It helps catch incorrect test structure, assertions, dependency setup, concurrency handling, and outdated APIs. It also guides migrations from XCTest, the older Swift testing framework, while leaving UI tests on XCTest.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to write, review, improve, or migrate Swift Testing tests in Swift 6.2 or later projects. It covers async tests, networking mocks, test time limits, actor isolation, and newer Swift Testing features.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jacklandrin/onlyswitch/swift-testing-pro
About the project

OnlySwitch is a macOS menu bar app that groups system toggles and shortcuts in one customizable control panel. It is used to change settings such as dark mode, desktop icon visibility, notch hiding, and audio controls, with optional widgets and keyboard shortcuts.

jacklandrin/OnlySwitch · 5,992 stars · on GitHub · onlyswitch.click

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jacklandrin/OnlySwitch --skill swift-testing-pro
Clone the repo
git clone --depth 1 https://github.com/jacklandrin/OnlySwitch

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for swift-testing-pro

README.md
[![agentmods](https://agentmods.dev/badge/skills/jacklandrin/onlyswitch/swift-testing-pro/github.svg)](https://agentmods.dev/skills/jacklandrin/onlyswitch/swift-testing-pro)
Your own site
<a href="https://agentmods.dev/skills/jacklandrin/onlyswitch/swift-testing-pro"><img src="https://agentmods.dev/badge/skills/jacklandrin/onlyswitch/swift-testing-pro/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for swift-testing-pro

Your own site · 80×15
<a href="https://agentmods.dev/skills/jacklandrin/onlyswitch/swift-testing-pro"><img src="https://agentmods.dev/badge/skills/jacklandrin/onlyswitch/swift-testing-pro.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 959 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.00959
Opus 5.5 $0.00014 $0.00384
Sonnet 5.5 $0.00007 $0.00192
Haiku 4.5 $0.00003 $0.00096

Measured 1mo ago against content hash ad4f1bff44b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

swift-testing-pro scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

3 near-identical copies found in the catalogue:

doc/skills/swift-testing-pro/SKILL.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Read the full file on GitHub · 98 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 98 lines · 34 tokens per session scan A ad4f1bff44b5

Subscribe to this mod's changes

swift-testing-pro is a skill published in the GitHub repository jacklandrin/OnlySwitch (5,992 stars, last pushed today), licensed MIT. It adds 34 tokens to every session and 959 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

creating-test

Scaffold a unit test file using the Swift Testing framework. Use when the user asks to create tests, add unit tests, write tests for a manager/presenter/interactor, or scaffold a test file. Mirrors the app's folder structure with Tests naming convention.

SwiftfulThinking/SwiftfulStarterProject · 56 tokens

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…

AvdLee/Swift-Testing-Agent-Skill · 73 tokens

guide-swift-testing

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.

Prisma-Labs-Dev/apple-skills · 41 tokens

swift-expert

Expert-level Swift development for iOS, macOS with SwiftUI, Combine, and modern Swift 5.9+. Use when the user mentions iOS, macOS, SwiftUI, Combine, async await, or Apple platforms, or when the task involves Modern Swift Features, Basics and Optionals, Functions and Closures, or Structs and Classes.

personamanagmentlayer/pcl · 76 tokens

swift-testing

WHEN writing, running, or diagnosing Swift Testing suites, including migrating XCTest tests to them and a crashing or non-reporting test target under xcodebuild; NOT for authoring XCTest or XCUITest tests; returns macro-driven test patterns, the XCTest boundary, and the correct way to read xcodebuild results.

mintuz/skills · 66 tokens

modernize-tests

Modernize test suites to use modern Swift Testing features or migrate from XCTest.

aduermael/herm · 19 tokens