swift-testing-code-review
Reviews Swift Testing code for proper use of
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/anderskev/swift-testing-code-reviewWhat This Skill Does
The swift-testing-code-review skill is an advanced analytical tool designed to audit Swift codebases that utilize the modern Swift Testing framework. It acts as an automated expert reviewer, ensuring that your test suites follow Apple's recommended best practices and avoid common pitfalls associated with the new testing library. The skill focuses on correct macro usage, robust parameterized testing, proper async flow management, and efficient test organization.
Installation
To integrate this skill into your environment, run the following command in your terminal:
clawhub install openclaw/skills/skills/anderskev/swift-testing-code-review
Use Cases
This skill is ideal for teams migrating from XCTest to Swift Testing, developers looking to improve their unit test reliability, and automated CI pipelines that perform linting for testing patterns. Use it during pull request reviews to ensure developers aren't masking error diagnostics by pre-computing booleans within #expect or failing to leverage zip() for clean parameterized input injection. It is also excellent for identifying architectural issues like missing documentation on disabled tests or improper use of serial execution tags.
Example Prompts
- "Review my latest test file, LoginTests.swift, and check if my parameterized tests are using zip() correctly or creating accidental Cartesian products."
- "I am testing a series of completion handlers; does my use of confirmation() follow the recommended patterns, or should I be using withCheckedContinuation?"
- "Can you audit this test suite for proper usage of #expect vs #require and ensure my error handling tests aren't using overly generic error types?"
Tips & Limitations
The swift-testing-code-review skill is optimized for Swift Testing (SE-0431). It does not substitute for a compiler; it performs semantic analysis based on patterns and best practices. For best results, ensure your test code is clean and reachable by the parser. Note that the skill relies on the provided documentation links (e.g., expect-macro.md) to provide context-aware feedback. If your project has custom testing wrappers or wrappers around macros, ensure you provide those definitions to the agent to avoid false-positive reports. Always review the 'Review Checklist' provided in the tool's core logic to understand the specific criteria being evaluated in each run.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-anderskev-swift-testing-code-review": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read
Related Skills
tutorial-docs
Tutorial patterns for documentation - learning-oriented guides that teach through guided doing
fetch-pr-feedback
Fetch review comments from a PR and evaluate with receive-feedback skill
rust-testing-code-review
Reviews Rust test code for unit test patterns, integration test structure, async testing, mocking approaches, and property-based testing. Covers Rust 2024 edition changes including async fn in traits for mocks,
wish-ssh-code-review
Reviews Wish SSH server code for proper middleware, session handling, and security patterns. Use when reviewing SSH server code using charmbracelet/wish.
explanation-docs
Explanation documentation patterns for understanding-oriented content - conceptual guides that explain why things work the way they do