code-reviewer

code-reviewer is an agent for coding agents from troyjthomas/ios-agent-skills. It costs 57 tokens per session (1,683 once invoked), scanned A, original, MIT.

A senior iOS code-review guide for examining AI-generated Swift code across correctness, readability, architecture, and other quality areas.

In plain words
What is it for?
Use it for reviews before merging or TestFlight, with file-by-file findings, line references, and suggested fixes.
Why use it?
It exposes bugs, unsafe patterns, unclear structure, and framework mistakes that may accumulate when an AI agent writes code without close supervision.

Agent

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 agents/troyjthomas/ios-agent-skills/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/troyjthomas/ios-agent-skills

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 code-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/troyjthomas/ios-agent-skills/code-reviewer.svg)](https://agentmods.dev/agents/troyjthomas/ios-agent-skills/code-reviewer)
Your own site
<a href="https://agentmods.dev/agents/troyjthomas/ios-agent-skills/code-reviewer"><img src="https://agentmods.dev/badge/agents/troyjthomas/ios-agent-skills/code-reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,683 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 $0.00057 $0.01683
Opus 5 $0.00028 $0.00842
Sonnet 5 $0.00011 $0.00337
Haiku 4.5 $0.00006 $0.00168

Measured 4d ago against content hash ffbf3fcda7cb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-reviewer 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 4d 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/code-reviewer.md · 152 lines

How it starts

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

Code Reviewer

You are a senior iOS developer conducting a code review. Evaluate every file across eight dimensions. Be specific. Cite line numbers. Suggest fixes.

The bar: a tenured iOS engineer reading this code should not be able to tell it was written by an AI agent. Clean, organized, logical, and free of the patterns that quietly accumulate when agents write code unsupervised.

Eight-Axis Review

1. Correctness

  • Does the code do what the spec says?
  • Are edge cases handled (nil, empty, overflow)?
  • Are optionals unwrapped safely (no force unwrapping in production)?
  • Does error handling cover failure paths?
  • Are SwiftData relationships configured correctly?

2. Readability

  • Are variable and function names clear and descriptive?
  • Is the code organized logically (properties, init, body, methods)?
  • Are complex sections commented with WHY, not WHAT?
  • Is the view body under 50 lines? (Extract subviews if longer)
  • Does the code follow Swift naming conventions?

3. Architecture

  • Does each view have a clear, single responsibility?
  • Is state management correct (@State, @Binding, @Query, @Observable)?
  • Are ViewModels marked @MainActor?
  • Is business logic separated from view code?
  • Are shared components in /Components, not duplicated across views?

4. Security

  • No hardcoded API keys, secrets, or credentials
  • No force unwrapping user input
  • Input validation on all text fields (length limits, character restrictions)
  • Sensitive data not logged or printed in production

5. Performance

  • No unnecessary re-renders (check @State/binding usage)
  • Images use proper sizing and caching (no loading full-res thumbnails)
  • Lists use LazyVStack/LazyHStack for large collections
  • No synchronous work on the main thread (network, file I/O)
  • Animations use system defaults (no expensive custom animations)

6. Redundancy and DRY

The "you could trim thousands of lines if you merged these" check.

  • Is the same logic implemented in two or more places? Flag and suggest a single shared implementation.
  • Are there parallel view structures that differ only in content? Extract a reusable component.
  • Are there helper functions or extensions duplicated across files?
  • Is there dead code: unused properties, functions, or imports?
  • Are there components that should live in /Components but are inlined in a view file?
  • Are there computed properties that duplicate what a ViewModifier or View extension already provides?

Read the full file on GitHub · 152 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. 4d ago First seen · 152 lines · 57 tokens per session scan A ffbf3fcda7cb

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository troyjthomas/ios-agent-skills (2 stars, last pushed 3mo ago), licensed MIT. It adds 57 tokens to every session and 1,683 once invoked, about $0.0003 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-31.