code-review

code-review is a command for coding agents from carloshpdoc/ios-workflow-claude. It costs 18 tokens per session (1,322 once invoked), scanned A, original, Apache-2.0.

A code-review command that checks changed Swift source files for common design, naming, formatting, and duplicated-code problems, then applies fixes.

In plain words
What is it for?
Reviewing and cleaning up new or modified Swift files in the current branch using DRY (avoid repeating code) and SOLID (principles for organizing maintainable software) guidelines.
Why use it?
It reduces the need to inspect every change manually and helps keep code consistent and easier to maintain.

Command

Part of the ios-workflow plugin — 22 commands, 3 agents 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/carloshpdoc/ios-workflow-claude/code-review
Clone the repo
git clone --depth 1 https://github.com/carloshpdoc/ios-workflow-claude

Or install ios-workflow, the plugin that ships this one along with the rest of its 22 commands, 3 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/carloshpdoc/ios-workflow-claude/code-review.svg)](https://agentmods.dev/commands/carloshpdoc/ios-workflow-claude/code-review)
Your own site
<a href="https://agentmods.dev/commands/carloshpdoc/ios-workflow-claude/code-review"><img src="https://agentmods.dev/badge/commands/carloshpdoc/ios-workflow-claude/code-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 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,322 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.00018 $0.01322
Opus 5 $0.00009 $0.00661
Sonnet 5 $0.00004 $0.00264
Haiku 4.5 $0.00002 $0.00132

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

Security

Grade A, and why

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

plugins/ios-workflow/commands/code-review.md · 100 lines

How it starts

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

Project context: Values in angle brackets below (e.g. <scheme>, <JIRA_KEY>, <flag-key-enum>) are resolved at runtime — detect them from the project (xcodebuild -list -json for the scheme, git/gh for repo & owner, the branch name for the Jira key, a codebase search for flag/font files), or ask if they cannot be inferred. This plugin ships no per-project config.

Code Quality Review

You are performing a code quality review on new or modified files in the current branch.

Task

Review all new and modified Swift files (excluding test files) in the current branch, applying the principles below. Then apply the fixes.

Scope

  1. Identify changed files: Run git diff --name-only HEAD~1 or git status to find new/modified Swift source files
  2. Read each file fully before suggesting changes
  3. Apply fixes incrementally, confirming each category of change

Principles to Apply

DRY (Don't Repeat Yourself)

  • Look for duplicated code blocks, repeated patterns, or copy-pasted logic
  • Extract shared behavior into helper methods or computed properties
  • If 3+ lines are repeated across switch cases or conditionals, extract them

SOLID

  • Single Responsibility: Each method/class should have one reason to change — one job, one concern
  • Open/Closed: Classes should be open for extension but closed for modification — prefer adding computed properties to enums over external switch statements, use protocol extensions to add behavior
  • Liskov Substitution: Subclasses/implementations must be substitutable for their base types without breaking behavior — don't restrict capabilities or violate contracts of the parent type
  • Interface Segregation: Don't force classes to depend on interfaces they don't use — split large protocols into smaller, focused ones aligned with client needs
  • Dependency Inversion: High-level modules should depend on abstractions, not concrete types — use protocols for dependencies, inject them rather than hardcoding

Read the full file on GitHub · 100 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 · 100 lines · 18 tokens per session scan A 10fc19f3e1f7

Subscribe to this mod's changes

code-review is a command published in the GitHub repository carloshpdoc/ios-workflow-claude (7 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 18 tokens to every session and 1,322 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-31.