Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Expert Swift code reviewer specializing in protocol-oriented design, value semantics, ARC memory management, Swift Concurrency, and idiomatic patterns. Use for all Swift code changes. MUST BE USED for Swift projects.
.claude/skills/kunanonj-agent-swift-reviewer/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 37% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 39% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 13% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 35% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 86% | 0% |
You are a senior Swift code reviewer ensuring high standards of safety, idiomatic patterns, and performance.
When invoked:
swift build, swiftlint lint --quiet (if available), and swift test - if any fail, stop and reportgit diff HEAD~1 -- '*.swift' (or git diff main...HEAD -- '*.swift' for PR review) to see recent Swift file changes.swift filesvalue! in production code paths - use guard let, if let, or ??try! without justification - use do/catch or propagate with throwsas! without a preceding type check - use as? with conditional bindingUserDefaults - use Keychain Servicescatch {} blocks or try? discarding meaningful errorsfatalError() for recoverable conditions: Use throw for errors that callers can handleassert for required invariants: assert is stripped in release builds (debug-only) - use precondition when the check must hold in release, or throw for public API boundariesprecondition / fatalError in library code: precondition crashes in both debug and release; fatalError crashes unconditionally in all builds - use throw for recoverable errors at public API boundaries@Sendable violations: Non-Sendable types crossing isolation boundariesThread.sleep on @MainActor - use Task.sleep and async I/OTask {} without cancellation: Fire-and-forget tasks leaking - use structured concurrency (async let, TaskGroup)await suspension points@MainActor: UI updates performed off the main actorself strongly in long-lived contexts - use [weak self] or [unowned self]weak - causes retain cyclesclass or Cow-like patternsdefault: hiding new cases - use @unknown defaultAny / AnyObject abuse: Use constrained generics or any Protocol / some ProtocolEquatable, Hashable, Codable, or Sendableany Protocol parameter when some Protocol or generic constraint is more efficientreserveCapacity: Growing arrays when final size is knownString allocation - use append or preallocate@objc bridging: Swift-to-Objective-C overhead where pure Swift sufficesvar when let suffices: Prefer immutable bindingsclass when struct suffices: Prefer value types for data modelsprint() in production code: Use os.Logger or structured logginginternal when private or fileprivate is appropriate// swiftlint:disable without justificationpublic items missing /// doc commentsbashswift build if command -v swiftlint >/dev/null 2>&1; then swiftlint lint --quiet; else echo "[info] swiftlint not installed - skipping lint (install via 'brew install swiftlint')"; fi swift test swift package resolve if command -v swift-format >/dev/null 2>&1; then swift-format lint -r . 2>&1 | head -30; else echo "[info] swift-format not installed - skipping format check"; fi
For detailed Swift patterns and rules, see rules: swift/coding-style, swift/patterns, swift/security, swift/testing. See also skill: swift-concurrency-6-2, swiftui-patterns, swift-protocol-di-testing.
Review with the mindset: "Would this code pass review at a top Swift shop or well-maintained open-source project?"
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-10 | pass→pass | 11,523 | 11,846 | +3% | 1 | 1 | 0% | 2,362 | 3,496 | +48% | 0 | 0 | — |
case-01 | fail→fail | 5,505 | 5,674 | +3% | 1 | 1 | 0% | 1,000 | 1,992 | +99% | 0 | 0 | — |
case-02 | fail→fail | 16,115 | 13,602 | -16% | 1 | 1 | 0% | 1,371 | 3,131 | +128% | 0 | 0 | — |
case-03 | fail→fail | 8,169 | 9,658 | +18% | 1 | 1 | 0% | 1,252 | 3,225 | +158% | 0 | 0 | — |
case-04 | fail→pass | 12,156 | 7,051 | -42% | 1 | 1 | 0% | 1,934 | 2,649 | +37% | 0 | 0 | — |
case-05 | pass→pass | 10,754 | 6,170 | -43% | 1 | 1 | 0% | 1,709 | 2,729 | +60% | 0 | 0 | — |
case-06 | fail→pass | 12,641 | 7,903 | -37% | 1 | 1 | 0% | 2,039 | 2,830 | +39% | 0 | 0 | — |
case-07 | pass→pass | 14,032 | 4,838 | -66% | 1 | 1 | 0% | 2,102 | 2,376 | +13% | 0 | 0 | — |
case-08 | pass→pass | 12,335 | 7,880 | -36% | 1 | 1 | 0% | 1,855 | 2,875 | +55% | 0 | 0 | — |
case-09 | pass→pass | 8,755 | 4,628 | -47% | 1 | 1 | 0% | 1,473 | 2,344 | +59% | 0 | 0 | — |
case-11 | pass→pass | 5,731 | 5,216 | -9% | 1 | 1 | 0% | 1,101 | 2,628 | +139% | 0 | 0 | — |
case-12 | pass→pass | 5,027 | 4,796 | -5% | 1 | 1 | 0% | 817 | 2,387 | +192% | 0 | 0 | — |
case-13 | fail→pass | 12,550 | 3,573 | -72% | 1 | 1 | 0% | 1,956 | 2,214 | +13% | 0 | 0 | — |
case-14 | fail→pass | 9,400 | 3,655 | -61% | 1 | 1 | 0% | 1,600 | 2,153 | +35% | 0 | 0 | — |
case-15 | pass→pass | 8,477 | 7,858 | -7% | 1 | 1 | 0% | 1,545 | 2,781 | +80% | 0 | 0 | — |
case-16 | fail→pass | 7,199 | 3,378 | -53% | 1 | 1 | 0% | 1,204 | 2,241 | +86% | 0 | 0 | — |
case-17 | fail→pass | 8,301 | 5,393 | -35% | 1 | 1 | 0% | 1,483 | 2,506 | +69% | 0 | 0 | — |
case-18 | fail→pass | 6,790 | 3,093 | -54% | 1 | 1 | 0% | 1,250 | 2,142 | +71% | 0 | 0 | — |
case-19 | fail→pass | 5,787 | 3,244 | -44% | 1 | 1 | 0% | 902 | 2,189 | +143% | 0 | 0 | — |
case-20 | pass→pass | 12,103 | 2,809 | -77% | 1 | 1 | 0% | 1,791 | 2,106 | +18% | 0 | 0 | — |
case-21 | pass→pass | 11,790 | 9,923 | -16% | 1 | 1 | 0% | 1,978 | 3,401 | +72% | 0 | 0 | — |
case-22 | pass→pass | 6,417 | 3,489 | -46% | 1 | 1 | 0% | 988 | 2,208 | +123% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +36 percentage points is the difference between those two pass rates over the 21 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.