swift-code-reviewer-skill
v1.1.1
Published
Claude Code skill for comprehensive Swift/SwiftUI code reviews with multi-layer analysis
Maintainers
Readme
Swift Code Reviewer Agent Skill
A code review skill for Claude Code that performs multi-layer analysis of Swift and SwiftUI code, combining Apple's best practices with your project-specific coding standards.
Quick Start
npx swift-code-reviewer-skillThat's it. The skill is installed and ready to use. Run it again anytime to update to the latest version.
No cloning, no manual setup. NPX always fetches the latest version automatically.
Usage

Just ask Claude to review your code:
Review this PR
Review LoginView.swift
Review my uncommitted changes
Review all ViewModels in the Features folder
Check if this follows our coding standardsThe skill automatically activates, reads your .claude/CLAUDE.md for project standards, and generates a structured report with severity levels, code examples, and prioritized action items.
Example Output
# Code Review Report
## Summary
- Files Reviewed: 3 | Critical: 0 | High: 1 | Medium: 2 | Low: 1
## File: LoginViewModel.swift
✅ **Excellent Modern API Usage** (line 12)
- Using @Observable instead of ObservableObject
🟡 **Force Unwrap Detected** (line 89)
Current: `let user = repository.currentUser!`
Fix:
guard let user = repository.currentUser else {
logger.error("No current user")
return
}
🔴 **Violates Design System Standard** (line 45)
Current: `.foregroundColor(.blue)`
Fix: `.foregroundColor(AppColors.primary)`
## Prioritized Action Items
1. [Must fix] Remove force unwrap at line 89
2. [Should fix] Use design system colors at line 45What It Reviews
| Category | Checks |
| --------------------- | --------------------------------------------------------------------------------------------------------- |
| Swift Quality | Concurrency safety, actor isolation, Sendable, error handling, optionals, access control, naming |
| SwiftUI Patterns | @Observable, state management, property wrappers, NavigationStack, .task, view composition, accessibility |
| Performance | View updates, Equatable, ForEach identity, GeometryReader, lazy loading, memory leaks |
| Security | Keychain, input validation, HTTPS, certificate pinning, API key protection, sensitive data logging |
| Architecture | MVVM/MVI/TCA compliance, dependency injection, code organization, testability |
| Project Standards | .claude/CLAUDE.md rules, design system, custom error patterns, testing requirements |
Severity Levels
| Icon | Severity | Action | | ---- | -------- | ----------------------- | | 🔴 | Critical | Must fix before merge | | 🟡 | High | Should fix before merge | | 🟠 | Medium | Fix in current sprint | | 🔵 | Low | Consider for future |
Platform Support
- Works with GitHub PRs (
gh), GitLab MRs (glab), and local git changes - Swift 6.0+ | iOS 17+ | macOS 14+ | watchOS 10+ | tvOS 17+ | visionOS 1+
Project-Specific Standards
Add a .claude/CLAUDE.md to your project and the skill will validate against your rules:
# MyApp Standards
## Architecture
- ViewModels MUST use @Observable (iOS 17+)
- All dependencies MUST be injected via constructor
- Views MUST NOT contain business logic
## Design System
- Use AppColors enum ONLY
- Use AppFonts enum ONLY
## Testing
- Minimum coverage: 80%
- All ViewModels MUST have unit testsAlternative Installation
git clone https://github.com/Viniciuscarvalho/swift-code-reviewer-skill.git ~/.claude/skills/swift-code-reviewer-skillmkdir -p ~/.claude/skills/swift-code-reviewer-skill/referencesDownload the files from this repository into the directory, then restart Claude.
npx swift-code-reviewer-skill uninstallIntegration with Other Skills
This skill optionally leverages swift-best-practices, swiftui-expert-skill, and swiftui-performance-audit for deeper analysis. It works independently with its own comprehensive checklists.
Contributing
- Edit
SKILL.mdfor main skill logic - Update reference files in
references/for specific checklists - Test with real Swift/SwiftUI code
- Submit a pull request
License
MIT License - See LICENSE file for details.
Made with ❤️ for the Swift community
If this skill helps your code reviews, please star the repository!
