swift-code-review
This skill systematically audits Swift source files for concurrency hazards, including unsafe async/await patterns, actor reentrancy, Sendable conformance gaps, and memory leaks from retain cycles. It establishes Swift language version context upfront, reads full enclosing symbols rather than diffs alone, and applies targeted checklists for error handling, force unwraps, and closure capture semantics before reporting findings.
Swift Code Review examines Swift code for concurrency safety, async/await patterns, and memory management issues.
AI-generated summary based on this skill's SKILL.md
Install
existential-birds/beagle/swift-code-review · repository language: TypeScript
git clone https://github.com/existential-birds/beagle
cp -r beagle/plugins/beagle-ios/skills/swift-code-review ~/.claude/skills/swift-code-reviewFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
What does swift-code-review check for in my code?
swift-code-review systematically audits Swift source files for concurrency hazards, including unsafe async/await patterns, actor reentrancy, Sendable conformance gaps, and memory leaks from retain cycles. It also validates error handling patterns, detects force unwraps, and reviews closure capture semantics to ensure your code follows Swift best practices.
How does swift-code-review review Swift code for concurrency?
swift-code-review reviews Swift code for concurrency by analyzing async/await safety, checking actor isolation boundaries, verifying Sendable conformance on shared types, and identifying unsafe patterns in task spawning and cancellation. It reads full enclosing symbols rather than diffs alone to understand context and applies targeted checklists for concurrent access patterns.
Can swift-code-review check Swift code for memory leaks?
Yes. swift-code-review checks Swift code for memory leaks by identifying retain cycles in closures and object graphs. It analyzes closure capture semantics, detects unowned and weak reference misuse, and flags patterns that commonly lead to memory management issues in Swift applications.
What error handling patterns does swift-code-review validate?
swift-code-review validates error handling and exception patterns by reviewing try/catch usage, force unwrap detection, optional chaining safety, and error propagation correctness. It ensures errors are properly caught, handled, or propagated rather than silently ignored or unsafely forced.
Does swift-code-review verify Sendable conformance?
Yes. swift-code-review verifies Sendable conformance and actor isolation in Swift types, ensuring that data shared across concurrency boundaries meets thread-safety requirements. It checks that types intended for concurrent use properly declare Sendable conformance and respect actor isolation rules.
What Swift language context does swift-code-review establish?
swift-code-review establishes Swift language version context upfront to apply version-appropriate rules and patterns. This ensures recommendations align with the Swift version your project targets, since concurrency features, Sendable, and best practices evolve across Swift releases.
SKILL.md
rendered from the published skill — quoted content, verbatim
Swift Code Review
Review Workflow
Follow this sequence in order. Do not emit findings until every Pass below is satisfied.
-
Swift / toolchain baseline — Establish language and tooling context:
Package.swift// swift-tools-versionand any per-target Swift language version orswiftSettingsin the manifest; for Xcode,SWIFT_VERSION(or equivalent) in project or target build settings; note if review is single-file only.
Pass: You state a concrete Swift language version or mode (e.g. Swift 6 language mode, tools 5.10) before advice that depends on strict concurrency, migration-only syntax, or SDK availability. -
Read surrounding code — For each changed
.swiftfile, read the full enclosing type, function, method, or property that contains the edits, not only the diff hunk.
Pass: At least one full enclosing symbol (type or member) containing the change was read
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 5 files
plugins/beagle-ios/skills/swift-code-review/SKILL.md
plugins/beagle-ios/skills/swift-code-review/references/common-mistakes.md
plugins/beagle-ios/skills/swift-code-review/references/concurrency.md
plugins/beagle-ios/skills/swift-code-review/references/error-handling.md
plugins/beagle-ios/skills/swift-code-review/references/observable.md