Skip to content
Back to skills

Swift Code Review

ASecurity

Reviews Swift code for concurrency safety, error handling, memory management, and common mistakes. Use when reviewing .swift files for async/await patterns, actor isolation, Sendable conformance, or general Swift best practices.

  • 79 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added February 8, 2026
developmentswiftcode-review

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add existential-birds/beagle --skill swift-code-review --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Swift Code Review?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Swift Code Review
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/existential-birds-swift-code-review/badge)](https://www.skillsdirectory.com/skills/existential-birds-swift-code-review)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: swift-code-review
description: Reviews Swift code for concurrency safety, error handling, memory management, and common mistakes. Use when reviewing .swift files for async/await patterns, actor isolation, Sendable conformance, or general Swift best practices.
---

# Swift Code Review

## Quick Reference

| Issue Type | Reference |
|------------|-----------|
| async/await, actors, Sendable, Task | [references/concurrency.md](references/concurrency.md) |
| @Observable, @ObservationIgnored, @Bindable | [references/observable.md](references/observable.md) |
| throws, Result, try?, typed throws | [references/error-handling.md](references/error-handling.md) |
| Force unwraps, retain cycles, naming | [references/common-mistakes.md](references/common-mistakes.md) |

## Review Checklist

- [ ] No force unwraps (`!`) on runtime data (network, user input, files)
- [ ] Closures stored as properties use `[weak self]`
- [ ] Delegate properties are `weak`
- [ ] Independent async operations use `async let` or `TaskGroup`
- [ ] Long-running Tasks check `Task.isCancelled`
- [ ] Actors have mutable state to protect (no stateless actors)
- [ ] Sendable types are truly thread-safe (beware `@unchecked`)
- [ ] Errors handled explicitly (no empty catch blocks)
- [ ] Custom errors conform to `LocalizedError` with descriptive messages
- [ ] Nested @Observable objects are also marked @Observable
- [ ] @Bindable used for two-way bindings to Observable objects

## When to Load References

- Reviewing async/await, actors, or TaskGroups → concurrency.md
- Reviewing @Observable or SwiftUI state → observable.md
- Reviewing error handling or throws → error-handling.md
- General Swift review → common-mistakes.md

## Review Questions

1. Are async operations that could run concurrently using `async let`?
2. Could actor state change across suspension points (reentrancy bug)?
3. Is `@unchecked Sendable` backed by actual synchronization?
4. Are errors logged and presented with helpful context?
5. Could any closure or delegate create a retain cycle?

Files in this skill

  • SKILL.md2 KB
  • references/common-mistakes.md3.7 KB
  • references/concurrency.md3.7 KB
  • references/error-handling.md3.6 KB
  • references/observable.md3.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.