swift-architecture-audit — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited swift-architecture-audit (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Identify the UI framework in use (SwiftUI, UIKit, or Mixed) by scanning the project — look for @main, UIApplicationDelegate, or UIHostingController. Then load the matching structure reference from ../swift-project-setup/references/ and use it as the baseline when identifying structural deviations.
Use subagents to parallelize exploration of large codebases.
Scan for:
UIViewController subclasses vs ViewModel typesView typesCore/ or Protocols/Read representative files from 3-5 key features. Look for:
Red flags (report each with file:line):
View bodiesUIViewController subclassesURLSession.shared or UserDefaults.standard called from Views or ViewControllers@State or @StateObject holding data that belongs in a ViewModel or serviceGreen flags (note these):
ObservableObject or @Observable ViewModels with clear state@EnvironmentFor each audited type, check:
let service = NetworkService()) instead of injected?Scoring:
Identify:
async/await should be used (new code)DispatchQueue.main.async scattered in ViewModel or service layers (use @MainActor)@Published properties updated from background threads without actor isolationSendable types crossing actor boundaries (potential data races)sleep() anywhere in the codebase| Anti-Pattern | Impact | Action |
|---|---|---|
| Massive ViewController | Untestable, unmaintainable | Extract ViewModel + Services |
| No protocol for external deps | Can't mock in tests | Wrap in protocol |
| Singleton abuse | Hidden coupling | Inject via init |
| Completion handlers in new code | Fragile async | Migrate to async/await |
| Force unwrap in production | Crashes | Replace with guard/if let |
| Business logic in View | Untestable | Move to ViewModel |
# Architecture Audit: [ProjectName]
Date: [date]
## Health Summary
Overall: [Good / Needs Work / Critical Issues]
MVVM Compliance: [High / Medium / Low]
Testability: [High / Medium / Low]
Concurrency: [Modern / Mixed / Legacy]
## Critical Issues (Fix First)
- [issue] in `FileName.swift:line` — [impact and suggested fix]
## Architectural Violations
- [violation] — [file(s) affected] — [recommended refactoring]
## Testability Blockers
- [blocker] — [which types are affected] — [fix: add protocol / inject dependency]
## Concurrency Issues
- [issue] — [file:line] — [suggested migration]
## Refactoring Priority
1. [Most critical — blocks testing or causes crashes]
2. [High priority — causes maintainability issues]
3. [Medium priority — worth cleaning up]
4. [Low priority / nice to have]
## Strengths
- [what the codebase does well — acknowledge good patterns]User says: "Audit the architecture, I want to add tests but everything is hard to test"
Actions:
User says: "I just joined this project, give me an architecture overview"
Actions:
../swift-project-setup/references/structure-swiftui.md — expected SwiftUI layout../swift-project-setup/references/structure-uikit.md — expected UIKit layout../swift-project-setup/references/structure-mixed.md — expected Mixed layout../swift-project-setup/references/file-naming.md — naming rules and "What Never Goes Where" tableCodebase is too large to read fully: Use subagents to parallelize exploration. Focus the audit on the 3-5 most critical or highest-risk features (main flows, payment, authentication). Note coverage limitations in the report.
No clear architecture pattern found: Document what exists honestly. Don't assume intent. Recommend a migration path to MVVM with concrete first steps.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.