swift-review

swift-review is a command for Claude Code from OkminLee/everything-claude-code-ios. It costs 27 tokens per session (991 once invoked), scanned A, original, MIT.

A command that reviews uncommitted Swift changes in an iOS project for security, memory-management, and code-quality problems. Uncommitted changes are edits that have not yet been saved in Git history.

In plain words
What is it for?
Use it to inspect changed Swift files for security vulnerabilities, concurrency problems, resource-management mistakes, force unwrapping, excessive file or function size, and deeply nested code.
Why use it?
It helps catch issues such as exposed credentials, unsafe data storage, memory leaks, retain cycles, and risky Swift code before the changes are committed.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths.

Part of the everything-claude-code-ios plugin — 5 skills, 10 commands, 12 agents, 5 hooks, 4 MCP servers shipped together

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.

agentmods
npx agentmods add commands/okminlee/everything-claude-code-ios/swift-review
Clone the repo
git clone --depth 1 https://github.com/OkminLee/everything-claude-code-ios

Made for: Claude Code.

Or install everything-claude-code-ios, the plugin that ships this one along with the rest of its 5 skills, 10 commands, 12 agents, 5 hooks, 4 MCP servers.

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-review

README.md
[![agentmods](https://agentmods.dev/badge/commands/okminlee/everything-claude-code-ios/swift-review.svg)](https://agentmods.dev/commands/okminlee/everything-claude-code-ios/swift-review)
Your own site
<a href="https://agentmods.dev/commands/okminlee/everything-claude-code-ios/swift-review"><img src="https://agentmods.dev/badge/commands/okminlee/everything-claude-code-ios/swift-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 991 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00027 $0.00991
Opus 5 $0.00014 $0.00495
Sonnet 5 $0.00005 $0.00198
Haiku 4.5 $0.00003 $0.00099

Measured 6d ago against content hash 7213e5afc278, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

swift-review 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 6d 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.

commands/swift-review.md · 164 lines

How it starts

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

Swift Code Review

Comprehensive security and quality review of uncommitted changes for iOS projects.

This command invokes the swift-code-reviewer agent.

Process

  1. Get changed files: git diff --name-only HEAD

  2. For each changed Swift file, check for:

Security Issues (CRITICAL):

  • Sensitive data in UserDefaults (use Keychain)
  • Hardcoded credentials, API keys, tokens
  • App Transport Security (ATS) exceptions without justification
  • Missing certificate pinning for financial/health apps
  • Biometric auth bypass vulnerabilities
  • Clipboard exposure of sensitive data
  • Debug code in production (#if DEBUG missing)
  • WebView JavaScript injection risks

Memory Management (CRITICAL):

  • Retain cycles in closures (missing [weak self])
  • Delegates not declared as weak
  • NotificationCenter observers not removed
  • Timer not invalidated on deinit
  • URLSession tasks not cancelled
  • Combine: sink without storing cancellable
  • Combine: assign(to:on:) creating retain cycle

Code Quality (HIGH):

  • Force unwrapping (!) without guard/if-let
  • Functions exceeding 40 lines
  • Files exceeding 500 lines
  • Nesting depth exceeding 4 levels
  • Missing access control (private by default)
  • print() statements in production code
  • TODO/FIXME comments
  • Missing documentation for public APIs
  • Empty catch blocks
  • try! or try? without justification

Concurrency (HIGH):

  • UI updates not on main thread
  • Missing @MainActor for ViewModel
  • Data races in shared mutable state
  • Actor isolation violations
  • Sendable compliance issues
  • Task cancellation not handled

Best Practices (MEDIUM):

  • Not using struct for data models (prefer value types)
  • Missing SwiftUI previews for views
  • Accessibility identifiers missing
  • Missing tests for new code
  • Hardcoded strings (should be localized)
  • Magic numbers without constants
  1. Generate report with:
    • Severity: 🔴 CRITICAL, 🟡 HIGH, 🟢 MEDIUM
    • File location: path/to/file.swift:lineNumber
    • Issue description
    • Code example of the problem
    • Suggested fix with code

Read the full file on GitHub · 164 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. 6d ago First seen · 164 lines · 27 tokens per session scan A 7213e5afc278

Subscribe to this mod's changes

swift-review is a command published in the GitHub repository OkminLee/everything-claude-code-ios (58 stars, last pushed 5mo ago), licensed MIT. It adds 27 tokens to every session and 991 once invoked, about $0.0001 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-08-30.