Agent skill
swift-testing-code-review
Reviews Swift Testing code for proper use of
Install this agent skill to your Project
npx add-skill https://github.com/existential-birds/beagle/tree/main/plugins/beagle-ios/skills/swift-testing-code-review
SKILL.md
Swift Testing Code Review
Quick Reference
| Issue Type | Reference |
|---|---|
| #expect vs #require, expression capture, error testing | references/expect-macro.md |
| @Test with arguments, traits, zip() pitfalls | references/parameterized.md |
| confirmation, async sequences, completion handlers | references/async-testing.md |
| @Suite, tags, parallel execution, .serialized | references/organization.md |
Review Checklist
- Expressions embedded directly in
#expect(not pre-computed booleans) -
#requireused only for preconditions,#expectfor assertions - Error tests check specific types (not generic
(any Error).self) - Parameterized tests with pairs use
zip()(not Cartesian product) - No logic mirroring implementation in parameterized expected values
- Async sequences tested with
confirmation(expectedCount:) - Completion handlers use
withCheckedContinuation, notconfirmation -
.serializedapplied only where necessary (shared resources) - Sibling serialized suites nested under parent if mutually exclusive
- No assumption of state persistence between
@Testfunctions - Disabled tests have explanations and bug links
When to Load References
- Reviewing #expect or #require usage -> expect-macro.md
- Reviewing @Test with arguments or traits -> parameterized.md
- Reviewing confirmation or async testing -> async-testing.md
- Reviewing @Suite or test organization -> organization.md
Review Questions
- Could pre-computed booleans in
#expectlose diagnostic context? - Is
#requirestopping tests prematurely instead of revealing all failures? - Are multi-argument parameterized tests creating accidental Cartesian products?
- Could
zip()silently drop test cases due to unequal array lengths? - Are completion handlers incorrectly tested with
confirmation?
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
review-python
Comprehensive Python/FastAPI backend code review with optional parallel agents
review-verification-protocol
Mandatory verification steps for all code reviews to reduce false positives. Load this skill before reporting ANY code review findings.
sqlalchemy-code-review
Reviews SQLAlchemy code for session management, relationships, N+1 queries, and migration patterns. Use when reviewing SQLAlchemy 2.0 code, checking session lifecycle, relationship() usage, or Alembic migrations.
fastapi-code-review
Reviews FastAPI code for routing patterns, dependency injection, validation, and async handlers. Use when reviewing FastAPI apps, checking APIRouter setup, Depends() usage, or response models.
pytest-code-review
Reviews pytest test code for async patterns, fixtures, parametrize, and mocking. Use when reviewing test_*.py files, checking async test functions, fixture usage, or mock patterns.
postgres-code-review
Reviews PostgreSQL code for indexing strategies, JSONB operations, connection pooling, and transaction safety. Use when reviewing SQL queries, database schemas, JSONB usage, or connection management.
Didn't find tool you were looking for?