Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    SwiftUI View Auditor: State, Async, Perf & Accessibility

    1

    Reviews SwiftUI views for real bugs: state ownership, racing tasks, work in body, list identity, localization and VoiceOver gaps.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    SwiftUI View Auditor: State, Async, Perf & Accessibility

    SwiftUI View Auditor: State, Async, Perf & Accessibility

    Example session with this skill installed

    [REAL public repo, run for this test: github.com/Ranchero-Software/NetNewsWire at commit bb5ab3dc]
    User: "Audit iOS/Add/AddFeedView.swift before release."
    Files read: AddFeedView.swift (130 lines), View+Extras.swift (errorAlert), RSCore String+RSCore.swift (mayBeURL, normalizedURL), Account.createFeed(url:name:container:validateFeed:completion:).

    • Read your context and instructions
    • Compiled the swiftui view auditor

    SwiftUI review - iOS/Add/AddFeedView.swift (NetNewsWire, bb5ab3dc)

    Summary: Solid. Dismissal is blocked while adding, errors surface through a shared alert, and the completion handler runs on the main actor. The one thing worth changing before release is reading the pasteboard in init, which can show iOS's paste banner more than once. The rest is polish.

    Findings

    1. Pasteboard read in init - Medium / lines 24-28

    What happens: reading UIPasteboard.general.string makes iOS show the "NetNewsWire pasted from ..." banner, or a paste-permission prompt depending on settings. SwiftUI may call a view's init more than once while the sheet is on screen, for example when the parent re-renders. Each call reads the pasteboard again, even though State(initialValue:) only uses the first value. So the banner can likely appear more than once, or when the user didn't expect a read.
    Why: side effects in a View initializer aren't tied to the view's lifetime.
    Fix: read once when the sheet appears. Better still, check for a URL first without reading the content:

    .task {
      guard urlString.isEmpty, UIPasteboard.general.hasURLs || UIPasteboard.general.hasStrings,
            let s = UIPasteboard.general.string, s.mayBeURL else { return }
      urlString = s.normalizedURL
    }
    

    That keeps the banner to one appearance per sheet. Merge it with the existing focus logic in onAppear (finding 3). A PasteButton in the URL section is the no-banner alternative.

    2. Whitespace-only title becomes the feed's name - Low / line 114

    What happens: a title of " " is passed as the feed name, so the feed shows up blank in the sidebar.
    Why: name.isEmpty ? nil : name doesn't trim. Folder names got trimming in commit 91f0409d. Feed titles didn't.
    Fix:

    let trimmedName = name.trimmingCharacters(in: .whitespacesAndNewlines)
    let feedName = trimmedName.isEmpty ? nil : trimmedName
    

    3. Keyboard re-focus when coming back from the folder picker - Low / lines 80-84 (verify)

    What happens: onAppear on the Form likely fires again when the user pops back from AddFeedContainerPickerView. If the URL is still empty, the keyboard jumps up again. Some people will like that; it can also cover the Folder row they just set.
    Fix: guard with a @State private var didAutoFocus = false, or move the focus into the one-time .task from finding 1.

    4. The progress indicator has no accessibility label - Low / lines 68-70

    VoiceOver will announce a generic progress element in the confirmation slot. Use ProgressView().accessibilityLabel(NSLocalizedString("Adding feed", comment: "...")) so it's clear what's happening and where the Add button went.

    Looked fine

    • createFeed's completion runs inside Task { @MainActor in ... } (Account.swift), so setting isAdding and errorMessage there is safe.
    • .interactiveDismissDisabled(isAdding) and the disabled Cancel button prevent half-finished adds.
    • canAdd uses mayBeURL, which trims whitespace, and addFeed() normalizes before URL(string:).
    • Duplicate-subscription check happens before the network call.
    • All user-facing strings go through NSLocalizedString with comments.
    • BatchUpdate.shared.start() and .end() are balanced on both success and failure paths.

    Not checked

    • AddFeedContainerPickerView and AddFeedDefaultContainer
    • Behaviour on iPad multitasking and with hardware keyboards
    • Runtime behaviour. Findings 1 and 3 are inferred from SwiftUI's documented lifecycle, not observed.

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

    About this skill

    Finds bugs in an existing view, with line numbers — not a style guide. A focused review of one or a few SwiftUI files, the way a careful senior iOS engineer would do it. Few findings, each with line numbers, the user-visible effect, the mechanism and a minimal fix.

    What it checks, in priority order:

    1. State ownership: @State/@StateObject/@Observable mix-ups, view models recreated on render
    2. Async and lifecycle: unstructured Task {} racing .task(id:), swallowed errors that leave a screen stuck loading, missing cancellation
    3. Work in body: linear lookups inside ForEach, formatters, sorting
    4. List identity: unstable ids, rows silently dropped by if-let
    5. Localization: literals missing from the string catalog
    6. Accessibility: unlabeled controls, bare numbers, placeholder content read by VoiceOver

    It opens dependent types before judging and marks guesses as "verify", so no style nitpicks or invented performance numbers. Example reviews, generated by running the skill on real open-source files (Ice Cubes, NetNewsWire), are included.

    Not affiliated with Apple. SwiftUI is a trademark of Apple Inc.

    Cannot verify private dependencies outside provided files. Does not audit styling, naming, or architectural preference. Limited to SwiftUI logic bugs and performance.

    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 any payment.

    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 23 days ago

    Permissions

    Read Files
    Listed23 days ago
    Updated7 days ago

    What's inside

    Frequently Asked Questions

    The auditor specifically targets runtime issues that standard linters miss, such as unstable ForEach identities, improper state ownership that causes data loss, and O(n) performance bottlenecks inside view bodies.

    Yes, it is fully compatible with both the modern @Observable macro introduced in iOS 17 and legacy patterns using ObservableObject, @StateObject, and @ObservedObject.

    For the most accurate results, provide the SwiftUI view file and any related ViewModels or data structures referenced within that view so the auditor can track state dependencies.

    This skill is designed for use with high-reasoning LLMs (like GPT-4 or Claude 3.5) that support large context windows for code analysis.

    You will receive the structured auditing protocol and logic designed to identify SwiftUI-specific bugs, which you can immediately deploy within your preferred AI chat interface or development agent.

    The auditor focuses on functional correctness and performance; it does not critique your choice of architecture (like MVVM vs. TCA) unless a specific implementation creates a direct technical bug or race condition.

    New in Frontend & Web Apps