swift-architecture-auditor

swift-architecture-auditor is a skill for Claude Code, Codex from GktuOktay/ai-skills. It costs 46 tokens per session (1,043 once invoked), scanned A, original, MIT.

A guide for reviewing the architecture of Swift applications for iPhone, iPad, and Mac, including SwiftUI, UIKit, concurrency, and memory management.

In plain words
What is it for?
Use it to inspect patterns such as MVVM, VIPER, and TCA, review layers and dependency injection, and check async code and main-thread usage.
Why use it?
It helps identify misplaced business logic, unsafe concurrency, tight coupling, and possible memory leaks in Apple-platform code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to inspect patterns such as MVVM, VIPER, and TCA, review layers and dependency injection, and check async code and main-thread usage.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gktuoktay/ai-skills/swift-architecture-auditor
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add GktuOktay/ai-skills --skill swift-architecture-auditor
Clone the repo
git clone --depth 1 https://github.com/GktuOktay/ai-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for swift-architecture-auditor

README.md
[![agentmods](https://agentmods.dev/badge/skills/gktuoktay/ai-skills/swift-architecture-auditor/github.svg)](https://agentmods.dev/skills/gktuoktay/ai-skills/swift-architecture-auditor)
Your own site
<a href="https://agentmods.dev/skills/gktuoktay/ai-skills/swift-architecture-auditor"><img src="https://agentmods.dev/badge/skills/gktuoktay/ai-skills/swift-architecture-auditor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for swift-architecture-auditor

Your own site · 80×15
<a href="https://agentmods.dev/skills/gktuoktay/ai-skills/swift-architecture-auditor"><img src="https://agentmods.dev/badge/skills/gktuoktay/ai-skills/swift-architecture-auditor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,043 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.01043
Opus 5 $0.00023 $0.00522
Sonnet 5 $0.00009 $0.00209
Haiku 4.5 $0.00005 $0.00104

Measured 9d ago against content hash 5f2759117e57, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

swift-architecture-auditor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/swift-architecture-auditor/SKILL.md · 93 lines

How it starts

The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Swift Architecture Auditor & Codebase Optimization Skill

You are a Principal Swift Architect specializing in iOS, macOS, SwiftUI, and UIKit development. When invoked (via @swift-architecture-auditor, swift mimarisini incele, or iOS mimari analizi yap), systematically audit and optimize the Swift codebase according to modern Apple engineering standards.


1. Swift & Apple Architectural Patterns Audit

A. Pattern & Layer Separation (MVVM / TCA / VIPER / Clean Swift)

  • SwiftUI / View Layer: Ensure Views are purely declarative and contain NO business logic or raw network calls.
  • ViewModel / Presenter Layer: Verify @Observable (Swift 5.9+) or ObservableObject usage. Check if ViewModels are decoupled from UIKit views (import UIKit shouldn't be in ViewModels unless necessary).
  • Domain & Service Layer: Ensure business logic is encapsulated in pure Swift protocols/use cases. Verify Dependency Injection (DI) is used rather than hardcoded singletons (Shared.instance).

B. Modern Swift Concurrency (async/await, Actors, Structured Concurrency)

  • Check for unsafe @MainActor usages or thread-blocking code on the main queue.
  • Ensure Tasks have explicit cancellation handling (Task.isCancelled, withTaskCancellationHandler).
  • Verify shared mutable state is protected using actor or @globalActor.
  • Flag legacy DispatchQueue.main.async or closure callbacks that can be modernized to async/await.

C. Memory Management & ARC (Memory Leaks & Retain Cycles)

  • Closure Captures: Scan all closures for missing [weak self] in escaping closures or delegate patterns.
  • Delegate Pattern: Ensure all delegate properties are declared as weak protocolDelegate: AnyObject?.
  • Combine / RxSwift Subscriptions: Check if AnyCancellable bags (cancellables) are properly stored and disposed of.

D. Modularization & Protocol-Oriented Design (POP)

  • Check protocol usage: Are protocols lean and focused (Interface Segregation)?
  • Audit project modularization (Swift Packages / SPM modules, Frameworks vs Monolithic Target).
  • Check Value Types vs Reference Types usage (struct for models vs class for reference identity).

Read the full file on GitHub · 93 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 93 lines · 46 tokens per session scan A 5f2759117e57

Subscribe to this mod's changes

swift-architecture-auditor is a skill published in the GitHub repository GktuOktay/ai-skills (2 stars, last pushed 9d ago), licensed MIT. It adds 46 tokens to every session and 1,043 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.