Swift Testing
Swift Testing patterns, test-double taxonomy, and migration guidance for @Test-based suites.
Test report
- Verdict
- Tested · Works
- Score
- Tested
- Jul 13, 2026
- Environment
- Claude Code 2.x (agent harness)
- Upstream re-checked
- Jul 18, 2026 · 5d36e69
Asked for a test suite for an email validator plus a repository mock: the skill version used @Suite/@Test parameterization across 3-4 inputs each, correctly renamed the naive 'MockUserRepository' to a 'SpyingStub' per Fowler's taxonomy, and placed it next to the protocol under #if DEBUG exactly as the skill mandates — the baseline used plain XCTest and mislabeled the stub as a mock.
Scored on four weighted criteria — install, triggering, output vs. baseline, docs. How scoring works
- Installs cleanly 5/5
- Triggers reliably 5/5
- Output vs. baseline 9/10
- Docs & honesty 5/5
What Swift Testing does
Encodes Swift Testing conventions (@Test/#expect/#require/@Suite), Martin Fowler's test-double taxonomy (correcting the community habit of calling every stub a 'Mock'), and fixture/mock placement rules, backed by nine reference files covering organization, async, migration, parameterized, and snapshot testing. Triggers on Swift Testing keywords, XCTest-migration requests, or test-double/fixture/TDD questions scoped to Swift.
How to install Swift Testing
git clone https://github.com/bocato/swift-testing-agent-skill
cd swift-testing-agent-skill
mkdir -p ~/.claude/skills
cp -r swift-testing ~/.claude/skills/swift-testing
Skills live in ~/.claude/skills/ (global) or .claude/skills/
(per-project). Restart Claude Code after installing.
Commands — how to trigger Swift Testing
-
/swift-testingSwift Testing patterns, test-double taxonomy, and migration guidance for @Test-based suites.
It also activates on plain-language prompts like these:
-
Migrate these XCTest cases to Swift Testing with @Test and #expect -
Should this test double be a stub or a mock in my Swift Testing suite -
Write parameterized Swift Testing cases for this async function
Frequently asked questions
- Is the Swift Testing skill free?
- Yes. The skill itself is free from bocato/swift-testing-agent-skill. SkillProof publishes the install command and an independent test verdict at no cost.
- Does Swift Testing work with Claude Code?
- We tested it with Claude Code 2.x (agent harness) on Jul 13, 2026. Verdict: Tested · Works. Asked for a test suite for an email validator plus a repository mock: the skill version used @Suite/@Test parameterization across 3-4 inputs each, correctly renamed the naive 'MockUserRepository' to a 'SpyingStub' per Fowler's taxonomy, and placed it next to the protocol under #if DEBUG exactly as the skill mandates — the baseline used plain XCTest and mislabeled the stub as a mock.
- What is the Swift Testing SkillProof Score?
- 9.6/10 — installs cleanly 5/5, triggers reliably 5/5, output vs. baseline 9/10, docs & honesty 5/5.
- How do I install Swift Testing?
- Copy the install command from this page, run it in your terminal, and restart Claude Code. Skills live in ~/.claude/skills/ (global) or .claude/skills/ inside a project.
- Can I use Swift Testing with Cursor, Copilot, Gemini CLI, Codex or other AI tools?
- The SKILL.md format is native to Claude (Claude Code, Desktop, claude.ai). The instructions inside adapt to other assistants: Cursor rules, GitHub Copilot instructions, Windsurf rules, Custom GPTs, AGENTS.md for OpenAI Codex, and GEMINI.md for Google Gemini CLI — our conversion guides cover each, and the free converter on the tools page does the wrapping for you.