ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 5/5

swift-code-review

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.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/anderskev/swift-code-review
Or

What This Skill Does

The swift-code-review skill is a specialized diagnostic tool designed to analyze Swift source code for architectural integrity and runtime safety. It acts as an automated senior peer reviewer, specifically focusing on the complexities of modern Swift. The skill evaluates code against rigorous standards regarding memory management, thread safety, and asynchronous execution. By leveraging a structured checklist and referencing comprehensive documentation, it detects common pitfalls that lead to crashes or undefined behavior, such as retain cycles, improper actor isolation, and unsafe force unwrapping. It provides clear, actionable feedback to ensure your codebase adheres to Apple’s latest paradigms.

Installation

To integrate this skill into your environment, use the OpenClaw CLI tool. Run the following command in your terminal: clawhub install openclaw/skills/skills/anderskev/swift-code-review This will download the skill dependencies and add the review capabilities to your active agent session, enabling context-aware analysis for any .swift file you provide.

Use Cases

  • Concurrency Audits: Validate the use of async/await, TaskGroups, and Actor isolation to ensure no data races occur across suspension points.
  • Memory Safety: Automated detection of potential retain cycles in closure-based APIs and ensuring delegate patterns are marked weak.
  • Error Handling Refinement: Transforming try? calls into robust do-catch blocks with LocalizedError implementations.
  • Modern Swift Migration: Checking for the correct implementation of @Observable macros and proper usage of @Bindable in SwiftUI projects.

Example Prompts

  1. "Review this View model for potential memory leaks and check if the async network calls are properly using TaskGroup for concurrency."
  2. "Can you audit this actor implementation to see if it suffers from reentrancy bugs or if the state is correctly protected?"
  3. "Analyze this file for force unwraps and improve the error handling by adding meaningful localized messages for the UI layer."

Tips & Limitations

To get the best results, always provide the full context of a type or module rather than isolated snippets. While the skill is excellent at identifying logical flaws and unsafe patterns, it should not replace comprehensive unit tests or full integration testing. Note that the skill relies on the provided documentation references; if you are using custom internal libraries, ensure those libraries are documented in the skill’s reference folder for deep analysis. Always treat the suggestions as advice and verify the behavior in your test suite before merging into production.

Metadata

Author@anderskev
Stars4473
Views1
Updated2026-05-01
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-anderskev-swift-code-review": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#swift#ios#concurrency#code-review#software-engineering
Safety Score: 5/5

Flags: file-read