swift_review
Swift Review: PR Safety & Risk Analysis
Analyze the semantic impact of your changes and catch potential regressions before they land.
Commands
# Review diff against current HEAD
scripts/swift_review
# Review diff against a specific target branch
scripts/swift_review --target <BRANCH>
Workflow
- Analyze: Run
scripts/swift_reviewto see the semantic impact of your changes - Assess risk: Look for "High Impact" warnings (high Fan-In files) — these are the most dangerous changes to get wrong
- Verify: For each file mentioned in the "Impacted Files" list, run its specific tests to confirm nothing broke
- Proceed: Only commit when high-risk areas are covered by tests
Gotchas
- Always run this BEFORE committing — not after. The tool analyzes uncommitted changes by default.
- "High Impact" means the file has many dependents (high Fan-In). Changes to these files have a larger blast radius and need more careful testing.
- If no tests exist for an impacted file, flag it for manual review — the tool cannot verify correctness without tests.
- When using
--target, make sure the target branch is up to date locally — stale branches produce misleading diffs.
More from swiftzilla/skills
swift_swiftui
SwiftUI framework concepts including property wrappers, state management, and reactive UI patterns.
51swift_concurrency
Swift modern concurrency with async/await, Task, Actor, Swift 6 strict mode, Sendable, and structured concurrency patterns.
40swift_style
Swift style guidelines covering naming conventions, code organization, and best practices for writing idiomatic Swift code.
35swift_combine
Swift Combine framework for reactive programming, handling asynchronous events with publishers, subscribers, and operators.
32swift_testing
Swift Testing framework for unit tests, integration tests, and async testing with modern syntax.
26swift_structure
Swift language structures including collections, optionals, closures, generics, control flow, and core language features.
24