Swift Code Reviewer

    by Vinicius Carvalho

    1

    Automated Swift/SwiftUI code reviews with spec adherence, Swift 6 concurrency safety, and CLAUDE.md standard enforcement.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Swift Code Reviewer

    Example session with this skill installed

    Review the uncommitted changes in my local branch against the current main branch and check for Swift 6 concurrency issues.

    • Read your context and instructions
    • Compiled the swift code reviewer

    Scope: local (base: main) · modified: 2 (0 pushed, 2 uncommitted) · related: 4

    Code Review — local

    Summary

    Files: 2 | Critical: 1 | High: 1 | Medium: 0 | Low: 0

    Spec Adherence

    Source: Local changes (no PR/Issue context found)
    Note: Spec adherence marked as not assessed due to missing context.


    PaymentViewModel.swift

    [Critical] Swift Quality (line 42)

    Current

    let transaction = repository.lastTransaction!
    

    Fix: crashes if lastTransaction is nil.

    guard let transaction = repository.lastTransaction else {
        logger.error("No transaction found")
        return
    }
    

    [High] Swift Concurrency (line 15)

    Current

    func updateBalance() async {
        self.balance = await api.fetchBalance()
    }
    

    Fix: @Published or @Observable properties must be mutated on the @MainActor.

    @MainActor
    func updateBalance() async {
        self.balance = await api.fetchBalance()
    }
    

    Positive Observations

    • Clean separation of networking logic into the repository layer.

    Prioritized Action Items

    • [Must fix] Replace force-unwraps in PaymentViewModel.swift to prevent runtime crashes.
    • [Must fix] Add @MainActor isolation to UI-mutating functions in view models.

    Agent Loop Feedback

    Recurring patterns suggest the following rules are missing in .claude/CLAUDE.md:

    Pattern: Force-unwraps (1 occurrence)

    Suggested rule:

    Never use !. Use guard let with explicit early return.

    Pattern: MainActor Isolation (1 occurrence)

    Suggested rule:

    All ViewModels mutating UI state must be marked with @MainActor.

    Next steps

    • Apply the @MainActor fix to PaymentViewModel.swift.
    • Replace the force-unwrap on line 42 with a guard statement.
    • Initialize a PR to run the full spec-adherence check.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Reviewing Swift and SwiftUI code requires balancing modern Swift 6 concurrency rules with project-specific architecture. This skill automates the detection of crashes, data races, and spec deviations before code reaches production.

    What it does

    • Spec Adherence Tracking maps every acceptance criterion from PR descriptions or Jira/GitHub issues to specific code changes.
    • Swift 6 Concurrency Checks identifies data races, missing @MainActor isolation, and Sendable violations.
    • Severity-Ranked Audits categorizes findings into Critical, High, Medium, and Low severities with specific file:line references.
    • Agent Loop Optimization detects recurring patterns in AI-generated code to suggest specific rule updates for your CLAUDE.md file.
    • Performance Analysis flags costly SwiftUI view bodies, ForEach identity issues, and retain cycles.

    How it works

    1. Resolve Scope via gh pr view or git diff to identify modified, deleted, and related files.
    2. Context Gathering reads the linked issue or PR body to establish the technical requirements.
    3. Multi-Layer Analysis scans for Swift quality, SwiftUI patterns, security, and architecture compliance.
    4. Report Generation outputs a prioritized list of action items, code diffs, and project standard suggestions.

    Frameworks & tools

    Uses gh (GitHub CLI) or glab (GitLab CLI) for metadata. Optimized for Swift 6, SwiftUI, and modern architectures like MVVM and TCA.

    Why this beats prompting it yourself

    Generic prompts often miss the subtle context of a PR spec or the specific concurrency requirements of Swift 6. This skill enforces a strict multi-phase workflow that ensures no requirement is left unimplemented while providing ready-to-paste code fixes.

    Use cases

    • Auditing AI-generated PRs for scope creep and safety.
    • Enforcing strict project standards defined in .claude/CLAUDE.md.
    • Validating Swift 6 migration efforts for thread safety.
    • Performing architectural reviews on new feature branches.

    Known limitations

    Spec adherence requires a PR description or linked issue to function. gh or glab must be authenticated for full PR metadata support.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 2 months ago

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Listed2 months ago

    What's inside

    Frequently Asked Questions

    The reviewer uses a multi-layer analysis that maps code changes directly to requirements found in your PR body or linked issues, ensuring every requested feature is implemented and no 'scope creep' occurs.

    Yes, the skill is specifically optimized for Swift 6 and focuses on identifying data races, Sendable violations, and missing @MainActor annotations that standard linters might miss.

    It is designed to work with any agentic IDE or CLI tool that supports GitHub/GitLab CLI integration, though it performs best when given access to a CLAUDE.md file for project-specific standards.

    You will need the GitHub (gh) or GitLab (glab) CLI installed and authenticated to allow the skill to fetch PR metadata and issue descriptions.

    Beyond standard bug detection, the skill analyzes SwiftUI view body efficiency, ForEach identity stability, and potential retain cycles to ensure your UI remains responsive.

    The skill includes an Agent Loop Optimization feature that tracks patterns in your code and suggests specific rule updates for your CLAUDE.md to prevent the same mistakes in future AI generations.

    New in Mobile Development

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Mobile Development.