Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
rshankras avatar

Animation Patterns

  • 4 installs
  • 591 repo stars
  • Updated July 24, 2026
  • rshankras/claude-code-apple-skills

Provides correct SwiftUI animation API shapes for springs, transitions, PhaseAnimator, KeyframeAnimator, and SF Symbol effects, preventing common mistakes.

About

Supplies validated SwiftUI animation patterns and a decision tree for choosing springs, transitions, and animator APIs. A developer uses it when implementing, reviewing, or fixing iOS/macOS animation code.

  • Prevents mixed spring parameter generations and wrong animator closure signatures
  • Covers matchedTransitionSource vs matchedGeometryEffect and reduce-motion

Animation Patterns by the numbers

  • 4 all-time installs (skills.sh)
  • +1 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #874 of 1,039 Mobile Development skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/rshankras/claude-code-apple-skills --skill animation-patterns

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs4
repo stars591
Last updatedJuly 24, 2026
Repositoryrshankras/claude-code-apple-skills

What it does

Provides correct SwiftUI animation API shapes for springs, transitions, PhaseAnimator, KeyframeAnimator, and SF Symbol effects, preventing common mistakes.

Files

SKILL.mdMarkdownGitHub ↗

Animation Patterns

Correct API shapes and patterns for SwiftUI animations. Prevents the most common mistakes: mixed spring parameter generations, wrong PhaseAnimator/KeyframeAnimator closure signatures, and using matchedGeometryEffect where matchedTransitionSource is needed.

When This Skill Activates

Use this skill when the user:

  • Asks to add, fix, or review animation code
  • Mentions spring, bounce, or snappy animations
  • Wants view transitions (insertion/removal, hero, zoom)
  • Asks about PhaseAnimator or KeyframeAnimator
  • Wants SF Symbol effects (bounce, pulse, wiggle, breathe)
  • Mentions matchedGeometryEffect or matchedTransitionSource
  • Asks about reduce motion / animation accessibility
  • Wants to sequence or chain animations
  • Mentions withAnimation, animation completions, or Transaction

Decision Tree

Choose the right reference file based on what the user needs:

What are you animating?
│
├─ A state change (opacity, position, color)
│  └─ → core-animations.md
│     ├─ withAnimation { } — explicit animation
│     ├─ .animation(_:value:) — implicit animation
│     └─ Spring configuration — .spring, .bouncy, .snappy, .smooth
│
├─ A multi-step / sequenced animation
│  └─ → phase-keyframe-animators.md (PhaseAnimator)
│     └─ Cycles through discrete phases automatically or on trigger
│
├─ A complex multi-property animation (scale + rotation + offset)
│  └─ → phase-keyframe-animators.md (KeyframeAnimator)
│     └─ Timeline-based keyframes with per-property tracks
│
├─ A view appearing / disappearing
│  └─ → transitions.md
│     ├─ .transition() — insertion/removal
│     ├─ .contentTransition() — text/symbol changes
│     └─ .asymmetric() — different in/out
│
├─ A hero / zoom navigation transition
│  └─ → transitions.md (matchedTransitionSource section)
│     ├─ iOS 18+: matchedTransitionSource + .navigationTransition(.zoom)
│     └─ iOS 14+: matchedGeometryEffect (NOT for NavigationStack)
│
├─ An SF Symbol animation
│  └─ → symbol-effects.md
│     └─ .symbolEffect(.bounce), .pulse, .wiggle, .breathe, .rotate
│
└─ Spring physics / timing configuration
   └─ → core-animations.md (Spring Configurations section)

API Availability

APIMinimum VersionReference
withAnimationiOS 13core-animations.md
.animation(_:value:)iOS 13core-animations.md
.spring(response:dampingFraction:)iOS 13core-animations.md
.matchedGeometryEffectiOS 14transitions.md
.transition(.push(from:))iOS 16transitions.md
.contentTransition(.numericText())iOS 16transitions.md
PhaseAnimatoriOS 17phase-keyframe-animators.md
KeyframeAnimatoriOS 17phase-keyframe-animators.md
.spring(duration:bounce:)iOS 17core-animations.md
Spring presets (.bouncy, .snappy, .smooth)iOS 17core-animations.md
withAnimation(_:completionCriteria:_:completion:)iOS 17core-animations.md
.symbolEffect()iOS 17symbol-effects.md
.transition(.blurReplace)iOS 17transitions.md
.contentTransition(.symbolEffect(.replace))iOS 17transitions.md
.matchedTransitionSourceiOS 18transitions.md
.navigationTransition(.zoom)iOS 18transitions.md

Top 5 Mistakes — Quick Reference

#MistakeFixDetails
1spring(response:bounce:) — mixing parameter generationsUse either spring(response:dampingFraction:) (iOS 13) or spring(duration:bounce:) (iOS 17)core-animations.md
2.animation(.spring()) without value: parameterAlways pass value: — the no-value variant is deprecated (iOS 15)core-animations.md
3Wrong PhaseAnimator closure signaturePhaseAnimator(phases) { content, phase in } — not { phase in }phase-keyframe-animators.md
4Using matchedGeometryEffect for NavigationStack transitionsUse matchedTransitionSource + .navigationTransition(.zoom) on iOS 18+transitions.md
5Using withAnimation for SF Symbol effectsUse .symbolEffect() modifier insteadsymbol-effects.md

Review Checklist

When reviewing animation code, verify:

  • [ ] Reduce motion — animations respect AccessibilityMotionEffect or UIAccessibility.isReduceMotionEnabled; provide non-motion alternatives
  • [ ] Duration limits — no animation exceeds ~0.5s for UI feedback; longer only for decorative/ambient effects
  • [ ] Spring vs linear — springs for interactive/physical motion; linear/easeInOut only for opacity fades or progress indicators
  • [ ] No deprecated APIs.animation(.spring()) without value: is deprecated; .animation(nil) is replaced by withTransaction
  • [ ] Correct spring generation — parameter names match the same API generation (never mix response with bounce)
  • [ ] Completion handlers — using withAnimation(_:completionCriteria:_:completion:) (iOS 17+), not inventing .onAnimationCompleted
  • [ ] Transition scope.transition() only affects views inside if/switch controlled by state; not for views that are always present

Reference Files

FileContent
core-animations.mdwithAnimation, springs, completions, transactions, timing curves
phase-keyframe-animators.mdPhaseAnimator, KeyframeAnimator, custom animations
transitions.mdView transitions, matched geometry, navigation transitions
symbol-effects.mdSF Symbol effects, accessibility

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.