Skills ios-animation-code-review
Reviews iOS animation code for correctness, performance, accessibility, and Apple API best practices. Use when reviewing .swift files containing animation code — withAnimation, .animation(), PhaseAnimator, KeyframeAnimator, matchedGeometryEffect, navigationTransition, CABasicAnimation, CASpringAnimation, UIViewPropertyAnimator, UIDynamicAnimator, symbolEffect, scrollTransition, contentTransition, or custom Transition conformances.
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/anderskev/ios-animation-code-review" ~/.claude/skills/openclaw-skills-ios-animation-code-review && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/anderskev/ios-animation-code-review" ~/.openclaw/skills/openclaw-skills-ios-animation-code-review && rm -rf "$T"
manifest:
skills/anderskev/ios-animation-code-review/SKILL.mdsource content
iOS Animation Code Review
Quick Reference
| Issue Type | Reference |
|---|---|
| Spring parameters, withAnimation misuse, phase/keyframe bugs | references/swiftui-animation-patterns.md |
| Frame drops, offscreen rendering, main thread blocking | references/performance.md |
| Reduce Motion, VoiceOver, motion sensitivity | references/accessibility.md |
| Transition protocol, matchedGeometryEffect, navigation transitions | references/transitions.md |
Output Format
Report each finding as:
[FILE:LINE] ISSUE_TITLE
Example:
[AnimatedCard.swift:42] Missing Reduce Motion fallback for spring animation
All details, code suggestions, and rationale follow after the header line.
Review Checklist
-
checked — animations have Reduce Motion fallback@Environment(\.accessibilityReduceMotion) - Animation is not the sole feedback channel — important state changes pair with haptics (
) or audio.sensoryFeedback - Custom animation isn't duplicating system-provided motion (standard nav transitions, sheet presentation, SF Symbol effects)
- Animations on frequent interactions are brief and unobtrusive — or absent (system handles it)
- All animations are interruptible — user is never forced to wait for completion before interacting
- Spring animations use
/duration
parameters (not raw mass/stiffness/damping unless UIKit/CA)bounce - No deprecated
without.animation()
parametervalue: -
wraps state changes, not view declarationswithAnimation -
IDs are stable and unique within the namespacematchedGeometryEffect -
used when parent geometry animates with child views appearinggeometryGroup() - Looping animations (
,PhaseAnimator
) have finite phases or appropriate triggersymbolEffect - No
in UIView-backed layers (use UIView.animate instead)CATransaction.setAnimationDuration() - Interactive animations handle interruption (re-trigger mid-flight doesn't break state)
- Shadow animations provide explicit
(avoids per-frame recalculation)shadowPath - Gesture-driven animations preserve velocity on release for natural completion
- Gesture-driven feedback follows spatial expectations (dismiss direction matches reveal direction)
- No animation of
modifier (destroys view identity — use.id()
ortransition
instead)matchedGeometryEffect
When to Load References
- Incorrect spring setup or
scope issues → swiftui-animation-patterns.mdwithAnimation - Hitches, dropped frames, or expensive animations in scroll views → performance.md
- Missing Reduce Motion handling or motion accessibility → accessibility.md
glitches or custommatchedGeometryEffect
bugs → transitions.mdTransition
Review Questions
- Does every animation have a Reduce Motion fallback that preserves the information conveyed? Is animation the only feedback channel, or are haptics/audio supplementing it?
- Is this custom animation necessary, or does the system already provide it (standard transitions, SF Symbol effects, Liquid Glass)?
- Could this animation cause frame drops — is it animating expensive properties (blur, shadow without path, mask) in a list or scroll view?
- Are all animations interruptible? Can the user act without waiting for completion? Does gesture-driven feedback follow spatial expectations?
- Is
scoped to the minimal state change needed, or is it wrapping unrelated mutations?withAnimation - For
— are source and destination using the same ID and namespace, and is only one visible at a time?matchedGeometryEffect