/apple-skills:testingfrom apple-skills
Provides TDD workflows, test infrastructure, and deterministic quality gates for iOS/macOS apps. Includes characterization tests, snapshot testing, test contracts, fitness functions, coverage ratchets, and mutation testing.
Ships in apple-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Test-driven development workflows and testing infrastructure for Apple platform apps. Works with both new and existing codebases.
Use this skill when the user:
characterization-test-generator/ Capture current behavior of existing code before refactoring. Generates tests that document what code actually does (not what it should do), giving you a safety net for AI-assisted refactoring.
tdd-bug-fix/ Reproduce-first bug fix workflow. Write a failing test that demonstrates the bug, then fix it. Ensures the bug never regresses — critical when AI generates fixes.
tdd-refactor-guard/ Pre-refactor safety checklist. Verifies test coverage exists before allowing AI to touch existing code. Prevents the "refactor without a safety net" problem.
tdd-feature/ Red-green-refactor scaffold for new features. Generates the failing test first, then guides implementation to make it pass, then refactors. The core TDD workflow.
test-contract/ Protocol/interface test suites. Define the contract (e.g., "any DataStore must handle empty state, single item, 100 items, and errors"), and it generates a test suite any implementation must pass.
snapshot-test-setup/ SwiftUI visual regression testing using swift-snapshot-testing. Generates snapshot test boilerplate, configuration, and CI integration.
test-data-factory/ Test fixture factories for your models. Makes writing tests faster by eliminating boilerplate data setup. Supports Builder pattern and static factory methods.
integration-test-scaffold/ Cross-module test harness with mock servers, in-memory stores, and test configuration. For testing networking + persistence + business logic together.
flow-walkthrough/ Drive each user flow in the Simulator (XCUITest + per-step screenshots), audit the navigation graph for dead-ends, and run a human discoverability check.
fitness-functions/ Architecture fitness functions — tests that enforce a project's hard rules (module import boundaries, offline guarantees, count/copy contracts) from inside its own test target. Turns prose constraints into exit codes.
coverage-ratchet/ Coverage floor that only rises: a committed baseline the app target's line coverage may never drop below, gated by a generated xccov script. Includes an advisory CRAP report (complexity × uncovered).
mutation-testing/ EXPERIMENTAL, advisory-only muter setup scoped to engine targets — surviving mutants reveal covered-but-unasserted code. Never a merge gate; includes the manual deliberate-break fallback.
Agent-written tests get slow in the same few ways, and every phase runs the
suite more often, so slow tests cost time on every build. SwiftShip's
/apple:verify times the suite each phase and warns when it gets more than
25% slower or a single test takes over 10 s. Write tests so it never has to:
@Test(arguments:):
@Test(arguments: ["", " ", "\n"])
func rejectsBlankTitle(_ title: String) throws {
#expect(throws: NoteError.blankTitle) { try Note(title: title) }
}
URLSession
calls: inject a protocol, or a URLProtocol stub. No real waiting:
pass a clock or a date provider instead of waiting for time to pass.
SwiftData: an in-memory ModelConfiguration(isStoredInMemoryOnly: true).sleep, no fixed waits. Task.sleep, sleep() and long
XCTWaiter timeouts make every run pay the worst case. Await the
result, or wait on the specific element (waitForExistence(timeout:)
returns as soon as it appears).setUp only when needed, or
reset state through a launch argument instead of a relaunch. Test logic
in unit tests, not through the UI; keep UI tests for flows.integration-test-scaffold/);
keep it in its own target or test plan so the fast suite stays fast.A test over 10 s is a bug in the test, not a fact of life: find which of the five it breaks.
The generators/test-generator/ skill generates test boilerplate (unit, integration, UI tests). These testing skills are complementary — they focus on workflows and methodology (TDD cycle, characterization testing, contracts) rather than just test file generation.
Cross-reference:
test-generator for "add tests to this class"testing/tdd-feature for "I want to TDD this new feature"testing/characterization-test-generator for "I need to safely refactor this"testing/tdd-bug-fix for "fix this bug and make sure it never comes back"coverage-ratchet/templates/coverage-gate.sh (opens in a new tab)coverage-ratchet/templates/crap-report.sh (opens in a new tab)fitness-functions/templates/ContractPinTests.swift (opens in a new tab)fitness-functions/templates/ImportBoundaryTests.swift (opens in a new tab)fitness-functions/templates/NetworkSentinelTests.swift (opens in a new tab)mutation-testing/templates/muter.conf.yml (opens in a new tab)tdd-feature/rules/swiftlint.yml (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
tdd, test-driven-development, ios-testing, macos-testing, quality-gates
23 skills in this plugin
/apple-intelligenceApple Intelligence skills for on-device AI features including Foundation Models, Visual Intelligence, App Intents, and intelligent assistants. Use when implementing AI-powered features./app-storeApp Store optimization and marketing skills for descriptions, screenshots, keywords, review responses, and comprehensive promotional strategy. Use when user needs help with App Store presence, ASO, marketing, or customer communication./core-mlCore ML, Create ML, Vision framework, Natural Language framework, on-device ML integration. Use when user wants image classification, text analysis, object detection, sound classification, model optimization, or custom model integration. Covers Core ML vs Foundation Models decision./designDesign skills for Apple platform UI — Liquid Glass, animations, game feel (haptics, sound, celebrations), UI prototyping, UX writing, SF Symbols, typography, and design-system rules that keep apps cheap to restyle. Use when implementing design language features, adding juice/feedback, writing interface copy, or choosing type and iconography./foundationFoundation framework skills — AttributedString patterns for rich text formatting, alignment, selection, and SwiftUI integration. Use when working with styled text or AttributedString APIs./generatorsCode generator skills that produce production-ready Swift code for common app components. Use when user wants to add logging, analytics, onboarding, review prompts, networking, authentication, paywalls, settings, persistence, error monitoring, CI/CD pipelines, localization, push notifications, deep linking, testing, accessibility, widgets, feature flags, app icons, image caching, pagination, HTTP caching, share cards, social export, subscription lifecycle, referral systems, watermarks, streak tracking, milestone celebrations, what's new screens, lapsed user re-engagement, usage insights, variable rewards, consent flows, account deletion, permission priming, force updates, state restoration, debug menus, offline queues, feedback forms, announcement banners, quick win sessions, Spotlight indexing, App Clips, screenshot automation, background processing, app extensions, data export, or SwiftUI preview sample data and variant matrices.npx claudepluginhub rshankras/claude-code-apple-skills --plugin apple-skillsOther plugins' skills for the same job