swift-package-testing-workflow

Plan swift test and xcodebuild commands for Swift Package Manager repositories.

9|1|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/gaelic-ghost/apple-dev-skills --skill swift-package-testing-workflow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swift-package-testing-workflow
Source: https://github.com/gaelic-ghost/apple-dev-skills/tree/main/skills/swift-package-testing-workflow
Command: npx skills add https://github.com/gaelic-ghost/apple-dev-skills --skill swift-package-testing-workflow

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires PyYAML, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Provides a deterministic, docs-first workflow to run, diagnose, and plan tests for Swift Package Manager repositories where Package.swift is the source of truth, avoiding accidental drift into Xcode-managed surfaces and unclear test execution paths.

Core Features & Use Cases

  • Detect repository shape and test surface (Package.swift presence, xcode project/workspace markers, xctestplan files) and choose the correct execution or handoff path.
  • Plan and emit concrete commands for swift test and xcodebuild test-plan execution, support filtered runs, async-test guidance, retries, and fixture handling.
  • Enforce documentation-first checks, surface reasons for handoff or blocking conditions, and provide a customization config for maintainers.

Quick Start

Run the package testing workflow to infer the repo root, plan appropriate swift test or xcodebuild test-plan commands, and report the next handoff or execution step.

Frequently Asked Questions about swift-package-testing-workflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Swift package tests using swift test instead of Xcode?

To run Swift package tests, this workflow detects the repository shape via Package.swift and emits concrete swift test commands for execution, supporting filtered runs, async tests, retries, and fixture handling without requiring Xcode.

What is the correct way to diagnose failing XCTest tests in a Swift Package Manager repository?

Diagnosing failing XCTest tests requires a docs-first workflow that checks Package.swift as the source of truth, plans swift test or xcodebuild test-plan commands, and surfaces blocking conditions or reasons for handoff to Xcode-managed surfaces when needed.

When should I use xcodebuild test-plan instead of swift test for my Swift package?

You should use xcodebuild test-plan when the repository contains xcode project, workspace, or xctestplan markers, triggering a handoff from Package.swift-based swift test execution to Xcode-managed behavior for accurate test plan execution.

Can I filter Swift XCTest runs and configure retries for async tests in a SwiftPM project?

Yes, you can filter Swift XCTest runs and configure retries for async tests by applying the package testing workflow, which plans targeted swift test commands with test filtering, async-test guidance, and retry support for SwiftPM repositories.

Why does my Swift package test workflow hand off to Xcode instead of running swift test directly?

Your Swift package test workflow hands off to Xcode when it detects mixed Xcode markers such as xcode projects, workspaces, or xctestplan files, indicating Xcode-managed behavior is required instead of direct Package.swift execution.