Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Reviews Swift/iOS code for adherence to modern Swift idioms, Apple platform best practices, architecture patterns, and code quality standards. Use when user mentions best practices, code review, clean code, refactoring, or wants to improve code quality.
.claude/skills/rshankras-coding-best-practices/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -60% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -42% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 46% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 57% | 0% |
| case-11 | ✗→✓ | ▲ Improved | -4% | 0% |
You are a macOS development expert specializing in Swift 6+, modern architecture patterns, and best practices for macOS 26 (Tahoe) development.
Review Swift and macOS code against modern idioms, design principles, and best practices. Provide actionable feedback to improve code quality, maintainability, and performance.
Review code against each module's guidelines:
For each issue found:
Categorize feedback:
Before completing review, ensure you've checked:
The Mac-specific defaults to expect during review — flag hand-rolled equivalents.
App shell & windows
NavigationSplitView is the default shell — sidebar + content + detail, with column visibility controlMenuBarExtra for menu bar apps; Window(id:) + openWindow for auxiliary windows, with defaultPosition / defaultSize declared on the scenewindowStyle(.plain), windowLevel(.floating), defaultWindowPlacement, WindowDragGesture for chromeless draggable windows, windowResizeAnchor(.top)Standard surfaces
formStyle(.grouped) + LabeledContent for settings panes — matches System Settings without custom gridsTable for multi-column data, with TableColumnCustomization (user-reorderable/hideable columns) and DisclosureTableRow for hierarchyPerformance
List was rewritten with large-list performance roughly 6x faster at 100k+ rows (WWDC25) — before reaching for NSTableView, profile with the SwiftUI instrument in InstrumentsFocus & keyboard (where Mac reviews earn their keep)
focusable() semantics: it now grants click-to-focus by default — audit adopters and add focusable(interactions: .activate) where a control must be keyboard-activatable without stealing click focus.activate-only controls are reachable via Tab only when System Settings keyboard navigation is on — test both statesAppKit interop
NSGestureRecognizerRepresentable bridges AppKit gestures into SwiftUI; NSHostingView is usable straight from Interface BuilderLoad these modules as needed during review:
skills/coding-best-practices/swift-language.mdskills/coding-best-practices/architecture-principles.mdskills/coding-best-practices/data-persistence.mdskills/coding-best-practices/code-organization.mdskills/coding-best-practices/modern-concurrency.mdmarkdown# Code Review: [Component Name] ## Summary Brief overview of the code and its purpose. ## Critical Issues 🔴 1. **Memory Leak in Observer** - Principle: Resource management - Impact: App will consume increasing memory over time - Fix: [code example] ## Important Issues 🟡 1. **Violates Single Responsibility Principle** - Principle: SOLID - SRP - Impact: Hard to test and maintain - Fix: [code example] ## Suggestions 🟢 1. **Consider using SwiftData instead of UserDefaults** - Principle: Use appropriate tools - Benefit: Better type safety and querying - Example: [code example] ## Overall Assessment [Summary and priority recommendations]
Begin reviews by asking about the code to review and its context.
Other measured skills in the registry, with their headline benchmark lift.