{
  "markdown": "# Swift Testing Agent Skill\n\nExpert guidance for any AI coding tool that supports the [Agent Skills open format](https://agentskills.io/home) - modern Swift Testing APIs, XCTest migration, parameterized tests, traits/tags, async testing, and parallel execution patterns.\n\nThis repository distills practical Swift Testing best practices into actionable, concise references for agents and code review workflows.\n\n## Who this is for\n- Teams adopting Swift Testing who want quick, correct defaults\n- Developers migrating existing XCTest suites incrementally\n- Anyone debugging flaky tests, parallel test behavior, or async test reliability\n\n## See also my other skills:\n- [SwiftUI Expert](https://github.com/AvdLee/SwiftUI-Agent-Skill)\n- [Swift Concurrency Expert](https://github.com/AvdLee/Swift-Concurrency-Agent-Skill)\n- [Core Data Expert](https://github.com/AvdLee/Core-Data-Agent-Skill)\n\n## How to Use This Skill\n\n### Option A: Using skills.sh (recommended)\nInstall this skill with a single command:\n\n```bash\nnpx skills add https://github.com/avdlee/swift-testing-agent-skill --skill swift-testing-expert\n```\n\nFor more information, visit the [skills.sh platform page](https://skills.sh/avdlee/swift-testing-agent-skill/swift-testing-expert).\n\nThen use the skill in your AI agent, for example:\n> Use the swift testing skill and review this test target for migration opportunities and flaky parallel behavior.\n\n### Option B: Claude Code Plugin\n\n#### Personal Usage\nTo install this Skill for your personal use in Claude Code:\n\n1. Add the marketplace:\n\n```bash\n/plugin marketplace add AvdLee/Swift-Testing-Agent-Skill\n```\n\n2. Install the Skill:\n\n```bash\n/plugin install swift-testing-expert@swift-testing-agent-skill\n```\n\n#### Updating After a Release\nIf Claude Code still shows an older version after a new GitHub release, refresh the marketplace before reinstalling or updating the Skill:\n\n```bash\n/plugin marketplace update swift-testing-agent-skill\n```\n\nClaude Code reads available plugin versions from your local marketplace copy, so updating the marketplace is what pulls the latest `.claude-plugin/marketplace.json`.\n\n#### Project Configuration\nTo automatically provide this Skill to everyone working in a repository, configure the repository's `.claude/settings.json`:\n\n```json\n{\n  \"enabledPlugins\": {\n    \"swift-testing-expert@swift-testing-agent-skill\": true\n  },\n  \"extraKnownMarketplaces\": {\n    \"swift-testing-agent-skill\": {\n      \"source\": {\n        \"source\": \"github\",\n        \"repo\": \"AvdLee/Swift-Testing-Agent-Skill\"\n      }\n    }\n  }\n}\n```\n\nWhen team members open the project, Claude Code will prompt them to install the Skill.\n\n### Option C: Manual install\n1) **Clone** this repository.  \n2) **Install or symlink** the `swift-testing-expert/` folder following your tool's official skills installation docs (see links below).  \n3) **Use your AI tool** as usual and ask it to use the \"swift-testing-expert\" skill for Swift Testing tasks.\n\n#### Where to Save Skills\nFollow your tool's official documentation, here are a few popular ones:\n- **Codex:** [Where to save skills](https://developers.openai.com/codex/skills/#where-to-save-skills)\n- **Claude:** [Using Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview#using-skills)\n- **Cursor:** [Enabling Skills](https://cursor.com/docs/context/skills#enabling-skills)\n\n**How to verify**:\n\nYour agent should reference the routing/playbook in `swift-testing-expert/SKILL.md` and jump into the relevant file in `swift-testing-expert/references/`.\n\n## What This Skill Offers\n\nThis skill gives your AI coding tool practical Swift Testing guidance. It can:\n\n### Guide Your Test Architecture Decisions\n- Choose when to use suites, traits, tags, and display names\n- Convert repetitive tests into parameterized tests with clean argument design\n- Apply parallel-safe patterns and know when `.serialized` is a temporary compromise\n- Set up tag-driven test plan filtering and report analysis workflows\n\n### Write Better Swift Tests\n- Use `#expect` effectively with rich diagnostics\n- Use `#require` for prerequisite flow and safer unwrapping\n- Model thrown-error expectations clearly\n- Improve output readability with test-specific descriptions\n\n### Migrate from XCTest Pragmatically\n- Coexist Swift Testing and XCTest in one target during migration\n- Map common `XCTAssert*` patterns to Swift Testing macros\n- Keep XCTest where still required (`XCUIApplication`, `XCTMetric`, Objective-C tests)\n- Convert duplicated XCTest methods into parameterized Swift Testing coverage\n\n### Improve Reliability and Performance\n- Remove hidden inter-test dependencies surfaced by randomized, parallel execution\n- Stabilize server-side tests with repository isolation and in-memory implementations\n- Bridge callback APIs to async/await for deterministic tests\n- Reduce CI noise with known-issue handling and actionable trait metadata\n\n## What Makes This Skill Different\n\n**Source-grounded**: Built from SwiftLee's complete Swift Testing article set plus WWDC 2024 sessions \"Meet Swift Testing\" and \"Go further with Swift Testing.\"\n\n**Non-Opinionated**: Focuses on test correctness, readability, and maintainability without forcing a project architecture.\n\n**Modern-first**: Prioritizes Swift Testing primitives, parallel defaults, and macro-based diagnostics over legacy assertion styles.\n\n**Practical and concise**: Emphasizes playbooks and decision points teams actually use during migrations and ongoing test maintenance.\n\n## Skill Structure\n\n<!-- references-structure:start -->\n```text\nswift-testing-expert/\n  SKILL.md\n  references/\n    _index.md\n    async-testing-and-waiting.md - Async waiting, continuations, and callback-event testing\n    expectations.md - #expect, #require, throw checks, and known issues\n    fundamentals.md - @Test, suites, structure, and naming patterns\n    migration-from-xctest.md - Incremental XCTest coexistence and migration strategy\n    parallelization-and-isolation.md - Parallel defaults, randomized order, and .serialized usage\n    parameterized-testing.md - Single/multi-argument tests, zip pairing, and scaling\n    performance-and-best-practices.md - High-signal testing defaults for speed, determinism, and flakiness prevention\n    traits-and-tags.md - Traits, tags, conditions, bug links, and test-plan filtering\n    xcode-workflows.md - Test navigator/report workflows and diagnostics practices\n```\n<!-- references-structure:end -->\n\n## Resources\n\nThis skill is based on:\n- **[Swift Testing category on SwiftLee](https://www.avanderlee.com/category/swift-testing/)** - complete article set on modern Swift Testing patterns\n- **[WWDC 2024-10179: Meet Swift Testing transcript](https://devimages-cdn.apple.com/wwdc-services/transcripts/individual/wwdc2024/wwdc2024-10179/eng_7a6b3a31be5f/wwdc2024-10179-transcript-eng.json)** - foundational APIs and migration context\n- **[WWDC 2024-10195: Go further with Swift Testing transcript](https://devimages-cdn.apple.com/wwdc-services/transcripts/individual/wwdc2024/wwdc2024-10195/eng_2c5849b0d379/wwdc2024-10195-transcript-eng.json)** - advanced workflows for tags, test plans, and parallelism\n- **[Defining test functions (Apple Developer Documentation)](https://developer.apple.com/documentation/testing/definingtests)** - canonical guidance on declaring and customizing tests\n- **[Organizing test functions with suite types (Apple Developer Documentation)](https://developer.apple.com/documentation/testing/organizingtests)** - suite behavior, inheritance, and initializer/availability constraints\n- **[Migrating a test from XCTest (Apple Developer Documentation)](https://developer.apple.com/documentation/testing/migratingfromxctest)** - official migration mappings and async/testing semantics\n\n## Contributing\n\nContributions are welcome! This repository follows the [Agent Skills open format](https://agentskills.io/home), which has specific structural requirements.\n\n**We strongly recommend using AI assistance for contributions:**\n- Use the [skill-creator skill](https://github.com/anthropics/skills/tree/main/skills/skill-creator) to ensure proper formatting\n- This helps maintain the Agent Skills format and ensures your contribution works correctly with AI agents\n\n**Please read [CONTRIBUTING.md](CONTRIBUTING.md) for:**\n- How to update `SKILL.md` and references safely\n- Agent Skills format requirements\n- Quality standards and review criteria\n- Pull request process\n\n## About the Author\n\nCreated by [Antoine van der Lee](https://www.avanderlee.com). This skill distills Swift Testing guidance from SwiftLee articles and WWDC material into an implementation-oriented playbook for AI assistants.\n\n## License\n\nThis skill is open-source and available under the MIT License. See [LICENSE](LICENSE) for details.\n",
  "bytes": 8772,
  "sha": "b3beefbd9ea1eb7931e50a4df4a29feaf1ae844c72066038d42896009eb50fa3",
  "repo_slug": "avdlee/swift-testing-agent-skill",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/skl_avdlee_swift_testing_agent_skill_swift_t_0aa3c0e8/readme"
}