ablevarghese/ios-claude-toolkit/ios-review

Claude Code and agent skill by ablevarghese/ios-claude-toolkit

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Check my code, is this correct, what do you think of this, review my changes, pre-merge check, PR feedback, look over my implementation. Comprehensive iOS code review covering architecture, SwiftUI patterns, concurrency, security, and accessibility. Use for code quality checks, architecture violation audits, pre-merge review, or any request for feedback on Swift/SwiftUI code. Trigger on 'does this look right', 'anything wrong here', 'review before I merge'. For implementing fixes, use forge-development. For security-focused PR review, use trailofbits-differential-review.

Install

npx vskill@latest install ablevarghese/ios-claude-toolkit/ios-review

SKILL.md

The same SKILL.md was published earlier as ablevarghese/ios-claude-toolkit/ios-review.

iOS Code Review — 5-Phase Review Protocol

Perform comprehensive iOS-specific code review covering architecture compliance, SwiftUI patterns, concurrency safety, security, and accessibility. Every finding is specific: file, line, issue, fix.

Iron Law: "Every review finding must cite a specific file, line number, and concrete fix — never generic advice."
Project Discovery: Before executing, determine project-specific values (project name, scheme, bundle ID, target, architecture layers, ViewModel base class, dependency flow) from project configuration files (CLAUDE.md, project.yml, .xcodeproj, Package.swift).

Pre-Review Gate: Is This a Review or a Refactor?

START: You've been asked to review code.
Q1: Are you being asked to READ and ASSESS code?
├── YES → This is a review. Proceed with the 5-phase protocol below.
└── NO →
Q2: Are you being asked to CHANGE or FIX code?
├── YES → This is implementation work. Use `forge-development` skill.
└── UNCLEAR → Ask the user. Do not guess.
CRITICAL GATE: During review, you MAY NOT:
- Edit files (review is read-only)
- Refactor code (that's a separate task)
- Implement fixes (report them; owner decides priority)
- Expand scope beyond changed files (unless investigating a finding)

Why this gate exists: Review scope creep is the most common way reviews become multi-hour refactoring sessions. A review produces a report. Fixing the findings is a separate task with its own prioritization.


Phase 1: Triage — Classify Changed Files by Risk

Before reading code, classify every changed file. This determines review depth.

Risk Classification
Risk LevelWhat It TouchesReview DepthExamples
HIGHAuth, crypto, payments, keychain, token handling, PIILine-by-line, every pathAuthService.swift, KeychainManager.swift, PaymentViewModel.swift
MEDIUMBusiness logic, state management, data models, navigationFull method review, all error pathsTransferService.swift, UserProfileViewModel.swift, AppRouter.swift
LOWTests, UI styling, documentation, asset catalogsScan for anti-patternsTransferServiceTests.swift, Colors.swift, README.md
Triage Process
  1. List all changed files (from diff or file list)
  2. Classify each file as HIGH / MEDIUM / LOW
  3. Order review: HIGH files first, then MEDIUM, then LOW
  4. Budget time: 60% on HIGH, 30% on MEDIUM, 10% on LOW
Example Triage Output:
HIGH RISK (review line-by-line):
- Sources/Services/AuthService.swift (auth logic)
- Sources/Infrastructure/KeychainAdapter.swift (credential storage)
MEDIUM RISK (full method review):
- Sources/ViewModels/TransferViewModel.swift (state management)
- Sources/Domain/TransferService.swift (business logic)
LOW RISK (scan for anti-patterns):
- Tests/TransferServiceTests.swift (test coverage)
- Sources/Views/TransferDetailView.swift (UI only)
Phase Gate: TRIAGE

Cannot proceed to ANALYSIS until:

  • [ ] EVERY changed file is listed with risk classification (HIGH/MEDIUM/LOW)
  • [ ] No file is unclassified
  • [ ] HIGH files are identified for line-by-line review

If you classified everything as LOW: Recheck. PRs that touch auth, payments, or data models are never LOW. If everything genuinely is LOW, document why.


Phase 2: Architecture Audit

Check for structural violations that undermine the entire codebase. These are always BLOCKER or CRITICAL severity.

Checks
  1. Layer violations — Does any file import from a layer it shouldn't?
  • Domain imports SwiftUI/UIKit? → BLOCKER
  • Presentation imports Infrastructure directly? → CRITICAL
  • Infrastructure imports Presentation? → BLOCKER
  1. Dependency injection compliance — Are all dependencies protocol-based and injected?
  • .shared singleton access? → CRITICAL
  • Concrete type used instead of protocol? → CRITICAL
  • Missing init-based injection? → CRITICAL
  1. Dependency direction — Do all arrows point inward?
  • Verify: Presentation → Domain ← Infrastructure
  • Any outward dependency is a violation
  1. Import analysis — Grep for suspicious imports:

`` Grep for: import UIKit in Domain/ Grep for: import SwiftUI in Domain/ Grep for: import (InfrastructureModule) in Presentation/ Grep for: .shared in ViewModels/ ``

Architecture Findings Template
FINDING: Layer violation — Domain imports SwiftUI
FILE: Sources/Domain/Entities/User.swift:3
SEVERITY: BLOCKER
CURRENT: import SwiftUI
FIX: Remove SwiftUI import. Use platform-agnostic types (String for color hex, Foundation.URL for URLs).
Map to SwiftUI types in Presentation layer extension.

Phase 3: Concurrency Audit

Swift 6 strict concurrency violations cause data races that crash at runtime. These are often invisible without careful review.

Checks
  1. @MainActor on ViewModels — Every ViewModel class must be @MainActor

`` Grep for: class.*ViewModel.*ObservableObject Verify each has @MainActor annotation Missing? → BLOCKER ``

  1. @Published mutation isolation — @Published properties must only be mutated from @MainActor context

`` Look for: @Published var modifications inside Task {} without @MainActor Found? → BLOCKER (data race) ``

  1. Sendable conformance — Types crossing concurrency domains must be Sendable

`` Check: Are entities passed between actors marked Sendable? Check: Are closures passed to Task {} marked @Sendable? Missing conformance? → CRITICAL ``

  1. Actor isolation — Mutable shared state must be protected

`` Look for: var properties on classes without actor isolation Look for: mutable state accessed from multiple Task {} blocks Found? → BLOCKER (data race) ``

  1. @unchecked Sendable audit — Each usage must have a justification comment

`` Grep for: @unchecked Sendable Missing justification? → CRITICAL Wrapping mutable state without synchronization? → BLOCKER ``

Concurrency Findings Template
FINDING: Missing @MainActor on ViewModel
FILE: Sources/ViewModels/TransferViewModel.swift:5
SEVERITY: BLOCKER
CURRENT: final class TransferViewModel: ObservableObject {
FIX: @MainActor final class TransferViewModel: ObservableObject {
REASON: @Published properties are mutated in async methods. Without @MainActor,
these mutations are data races under Swift 6 strict concurrency.

Phase 4: Security & Quality Scan

Security Checks
CheckPattern to FindSeverityFix
Force unwraps! (not !=)CRITICALReplace with guard let or if let
Hardcoded secretsAPI keys, tokens, passwords in sourceBLOCKERMove to environment/config, load at runtime
PII in logsprint(), logger.info() with user dataBLOCKERRemove PII, log only correlation IDs
UserDefaults for secretsUserDefaults storing tokens/passwordsBLOCKERUse Keychain via KeychainAdapter
Try without catchtry? silently discarding errorsWARNINGHandle error explicitly or document why ignored
Force castas!CRITICALUse as? with guard or if-let
Implicitly unwrapped optionalsvar x: Type!CRITICALUse Type? with proper unwrapping
Quality Checks
CheckPattern to FindSeverityFix
Completion handlerscompletionHandler:, callback:, { result inCRITICALConvert to async/await
Retain cyclesself. in closures without [weak self]WARNINGAdd [weak self] or verify no cycle exists
View body complexitybody > 30 lines or > 3 nesting levelsWARNINGExtract subviews with @ViewBuilder
Missing error handlingcatch { } (empty catch)CRITICALHandle or log the error
Hardcoded stringsUser-facing strings not in localizationWARNINGUse String(localized:)
File size> 300 linesWARNINGSplit by concern
N+1 queriesLoop containing async call per itemWARNINGBatch request or use TaskGroup
Security Findings Template
FINDING: Sensitive data stored in UserDefaults
FILE: Sources/Services/AuthService.swift:47
SEVERITY: BLOCKER
CURRENT: UserDefaults.standard.set(token, forKey: "auth_token")
FIX: Use Keychain via KeychainAdapter:
try await keychainAdapter.store(token, for: .authToken)
REASON: UserDefaults is not encrypted. Tokens stored there are readable by
any process with file system access to the app's container.

Phase Gate: ANALYSIS

Cannot proceed to REPORT until:

  • [ ] Every HIGH file has been read line-by-line
  • [ ] Every finding follows format: [File:Line] | [Issue] | [Severity] | [Fix]
  • [ ] Every reviewed file has at least ONE observation (finding OR explicit "no issues — checked X, Y, Z")

Hard Stop: Generic findings are not findings. "Code looks clean" is not an observation. "Checked TransferService.swift:42-89 for actor isolation — all @MainActor usage correct, no cross-actor access" IS an observation. Be specific or go back.

Counter: If you found zero issues across 5+ changed files, you almost certainly missed something. Return to the highest-risk file and look again — specifically for: missing error handling, force unwraps, concurrency violations, missing accessibility labels.


Phase 5: Report Generation

Compile all findings into a structured report. The report is the deliverable of a review.

Report Format
markdown
# Code Review Report
**Reviewed**: [date]
**Files**: [count] files reviewed
**Risk Profile**: [X HIGH, Y MEDIUM, Z LOW]
## Summary
| Severity | Count |
|----------|-------|
| BLOCKER | X |
| CRITICAL | Y |
| WARNING | Z |
| NOTE | W |
## Findings
| # | File:Line | Issue | Severity | Fix |
|---|-----------|-------|----------|-----|
| 1 | `AuthService.swift:47` | Token stored in UserDefaults | BLOCKER | Use KeychainAdapter |
| 2 | `TransferViewModel.swift:5` | Missing @MainActor | BLOCKER | Add @MainActor annotation |
| 3 | `User.swift:3` | Domain imports SwiftUI | BLOCKER | Remove import, use Foundation types |
| 4 | `PaymentView.swift:82` | Force unwrap on optional | CRITICAL | Use guard let |
| 5 | `TransferService.swift:15` | Empty catch block | CRITICAL | Log error or propagate |
## Verdict
-**MERGE BLOCKED**: [X] BLOCKER findings must be fixed first
-**Estimated fix time**: [estimate based on findings]
-**Recommended priority**: Fix blockers → Fix criticals → Address warnings in next PR
Phase Gate: REPORT

Report must include ALL of these sections (missing = incomplete):

  • [ ] Summary table: | # | File:Line | Issue | Severity | Fix |
  • [ ] Files reviewed count and risk breakdown
  • [ ] At least one finding per HIGH-risk file (or documented "no issues with evidence")
  • [ ] Recommendation: APPROVE / REQUEST CHANGES / BLOCK (with justification)

Hard Stop: If you're about to write "LGTM" or "looks good" without the summary table — STOP. That is not a code review. Return to ANALYSIS.

Severity Definitions
SeverityDefinitionMerge Impact
BLOCKERWill cause crashes, data loss, security breach, or data race at runtimeCannot merge. Must fix.
CRITICALSignificant code quality issue, architectural violation, or potential bugShould fix before merge. Rare exceptions with owner approval.
WARNINGImprovement opportunity, minor code quality issue, or tech debtDocument for future. Does not block merge.
NOTEStyle preference, minor suggestion, or informational observationOptional.

Rationalizations (Do Not Skip)

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ablevarghese/ios-claude-toolkit/ios-review/badge)](https://verified-skill.com/skills/ablevarghese/ios-claude-toolkit/ios-review)

Something wrong with this skill or its page? Tell us.