axiom-swift-testing

axiom-swift-testing is a skill for Claude Code, Codex from ComeOnOliver/skillshub. It costs 48 tokens per session (5,190 once invoked), scanned A, original, MIT.

Guidance for writing Swift tests with Apple's Swift Testing framework, a modern alternative to XCTest. It covers test annotations, expected values, asynchronous code, and organizing code so tests can run without launching the full app.

In plain words
What is it for?
Use it to write unit tests with @Test and #expect, test async behavior, improve testability, and choose faster test targets.
Why use it?
It helps make tests faster, more reliable, and easier to maintain, especially when moving away from XCTest or testing concurrent code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit Use it to write unit tests with @Test and #expect, test async behavior, improve testability, and choose faster test targets.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/comeonoliver/skillshub/axiom-swift-testing
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 ComeOnOliver/skillshub --skill axiom-swift-testing
Clone the repo
git clone --depth 1 https://github.com/ComeOnOliver/skillshub

Made for: Claude Code, 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 axiom-swift-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/comeonoliver/skillshub/axiom-swift-testing/github.svg)](https://agentmods.dev/skills/comeonoliver/skillshub/axiom-swift-testing)
Your own site
<a href="https://agentmods.dev/skills/comeonoliver/skillshub/axiom-swift-testing"><img src="https://agentmods.dev/badge/skills/comeonoliver/skillshub/axiom-swift-testing/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 axiom-swift-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/comeonoliver/skillshub/axiom-swift-testing"><img src="https://agentmods.dev/badge/skills/comeonoliver/skillshub/axiom-swift-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,190 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00048 $0.05190
Opus 5 $0.00024 $0.02595
Sonnet 5 $0.00010 $0.01038
Haiku 4.5 $0.00005 $0.00519

Measured 7d ago against content hash 58c02824f040, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

axiom-swift-testing scanned grade A with 1 finding 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 7d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

let user = try await userService.fetch(id: 123)
skills/CharlesWiltgen/Axiom/axiom-swift-testing/SKILL.md · 832 lines

How it starts

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

Swift Testing

Overview

Swift Testing is Apple's modern testing framework introduced at WWDC 2024. It uses Swift macros (@Test, #expect) instead of naming conventions, runs tests in parallel by default, and integrates seamlessly with Swift concurrency.

Core principle: Tests should be fast, reliable, and expressive. The fastest tests run without launching your app or simulator.

The Speed Hierarchy

Tests run at dramatically different speeds depending on how they're configured:

Configuration Typical Time Use Case
swift test (Package) ~0.1s Pure logic, models, algorithms
Host Application: None ~3s Framework code, no UI dependencies
Bypass app launch ~6s App target but skip initialization
Full app launch 20-60s UI tests, integration tests

Key insight: Move testable logic into Swift Packages or frameworks, then test with swift test or "None" host application.


Building Blocks

@Test Functions

import Testing

@Test func videoHasCorrectMetadata() {
    let video = Video(named: "example.mp4")
    #expect(video.duration == 120)
}

Key differences from XCTest:

  • No test prefix required — @Test attribute is explicit
  • Can be global functions, not just methods in a class
  • Supports async, throws, and actor isolation
  • Each test runs on a fresh instance of its containing suite

#expect and #require

// Basic expectation — test continues on failure
#expect(result == expected)
#expect(array.isEmpty)
#expect(numbers.contains(42))

// Required expectation — test stops on failure
let user = try #require(await fetchUser(id: 123))
#expect(user.name == "Alice")

// Unwrap optionals safely
let first = try #require(items.first)
#expect(first.isValid)

Why #expect is better than XCTAssert:

  • Captures source code and sub-values automatically
  • Single macro handles all operators (==, >, contains, etc.)
  • No need for specialized assertions (XCTAssertEqual, XCTAssertNil, etc.)

Read the full file on GitHub · 832 lines

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. 7d ago First seen · 832 lines · 48 tokens per session scan A 58c02824f040

Subscribe to this mod's changes

axiom-swift-testing is a skill published in the GitHub repository ComeOnOliver/skillshub (63 stars, last pushed 2mo ago), licensed MIT. It adds 48 tokens to every session and 5,190 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.