agentleFS
existential-birdsexistential-birds/beagle/skills/ios-animation-code-review/SKILL.md

ios-animation-code-review

Skill91 starsChanged 5 days agoApache-2.0View on GitHub

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.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All details, code suggestions, and rationale follow after the header line.

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

iOS Animation Code Review

Quick Reference

Issue TypeReference
Spring parameters, withAnimation completion/misuse, context.animate, phase/keyframe bugsreferences/swiftui-animation-patterns.md
Frame drops, offscreen rendering, main thread blockingreferences/performance.md
Reduce Motion, VoiceOver, @AccessibilityFocusState, motion sensitivityreferences/accessibility.md
Transition protocol, matchedGeometryEffect, navigation transitionsreferences/transitions.md

Hard gates (sequence)

Complete in order for the files in scope. If a step fails, omit the finding, re-anchor, or downgrade to a question—do not ship accusations without meeting the pass condition.

StepWhat you doPass condition (objective)
1. InventoryList each file under review and where animation APIs appear (line ranges or symbol names: withAnimation, .animation, matchedGeometryEffect, PhaseAnimator, UIKit/CA animators, etc.).A written list exists; files with no animation APIs are explicitly marked out of scope.
2. AnchorRe-read the cited region in the current file or diff hunk before naming an issue.Each [FILE:LINE] still shows the behavior; stale line numbers are fixed or the finding is dropped.
3. EvidenceFor framework-specific claims (spring curves, Transition conformance, Reduce Motion), cross-check the matching row in Quick Reference against references/*.md and apply review-verification-protocol (../review-verification-protocol/SKILL.md if installed).The finding’s detail names the reference file used, or states inline-only (structural/readability with no framework rule).
4. ReportEmit findings using Output Format.Headers match [FILE:LINE] ISSUE_TITLE; checklist items below are applied only where gates 1–2 covered that code.

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

  • @Environment(\.accessibilityReduceMotion) checked — animations have Reduce Motion fallback (note system-managed exceptions like .symbolEffect, .contentTransition(.numericText()), .navigationTransition(.zoom))
  • Animation is not the sole feedback channel — important state changes pair with haptics (.sensoryFeedback) or audio
  • 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/bounce parameters (not raw mass/stiffness/damping unless UIKit/CA)
  • No deprecated .animation() without value: parameter
  • withAnimation wraps state changes, not view declarations
  • No DispatchQueue.main.asyncAfter animation-completion hacks on iOS 17+ — use withAnimation(_:completionCriteria:_:completion:)
  • UIViewRepresentable / UIViewControllerRepresentable updates use context.animate (iOS 18+) instead of ignoring SwiftUI transaction animations
  • matchedGeometryEffect IDs are stable and unique within the namespace
  • geometryGroup() used when parent geometry animates with child views appearing
  • Looping animations (PhaseAnimator, symbolEffect) have finite phases or appropriate trigger
  • No CATransaction.setAnimationDuration() in UIView-backed layers (use UIView.animate instead)
  • Interactive animations handle interruption (re-trigger mid-flight doesn't break state)
  • Shadow animations provide explicit shadowPath (avoids per-frame recalculation)
  • Gesture-driven animations preserve velocity on release for natural completion
  • Gesture-driven feedback follows spatial expectations (dismiss direction matches reveal direction)
  • No animation of .id() modifier (destroys view identity — use transition or matchedGeometryEffect instead)

When to Load References

  • Incorrect spring setup, withAnimation completion/scope, or UIViewRepresentable bridging → swiftui-animation-patterns.md
  • Hitches, dropped frames, or expensive animations in scroll views → performance.md
  • Missing Reduce Motion handling or motion accessibility → accessibility.md
  • matchedGeometryEffect glitches or custom Transition bugs → transitions.md

Review Questions

  1. 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?
  2. Is this custom animation necessary, or does the system already provide it (standard transitions, SF Symbol effects, Liquid Glass)?
  3. Could this animation cause frame drops — is it animating expensive properties (blur, shadow without path, mask) in a list or scroll view?
  4. Are all animations interruptible? Can the user act without waiting for completion? Does gesture-driven feedback follow spatial expectations?
  5. Is withAnimation scoped to the minimal state change needed, and using completion: instead of asyncAfter timing hacks?
  6. For matchedGeometryEffect — are source and destination using the same ID and namespace, and is only one visible at a time?

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.