重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
ios-animations by pproenca/dot-skills
npx skills add https://github.com/pproenca/dot-skills --skill ios-animations针对 SwiftUI iOS 26 / Swift 6.2 应用的主观、严格的动画工艺指南。包含 8 个类别共 50 条规则,按影响优先级排序。源自 Airbnb 工程运动模式、Apple WWDC 会议和 Apple 人机界面指南。强制要求在每个动画视图上使用 @Equatable,为所有弹簧/时序值使用运动令牌,并为布局使用设计系统令牌。
此技能设计为与 swift-ui-architect 和 ios-design-system 协同工作。所有代码示例遵循相同的不可协商的约束:
@Equatable 宏(Airbnb 实测可减少 15% 的滚动卡顿)@Observable@StateSpacing.xs/sm/md/lg、Radius.sm/md/lg — 零硬编码布局数值Motion.standard/responsive/playful — 零散落的弹簧字面量广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
.backgroundSurface、.accentPrimary — 视图中不使用原始 Color 字面量此技能是运动层 — 它教授如何构建流畅、高性能的动画。当与同级技能一起加载时:
| 同级技能 | 其关注点 | 此技能的关注点 |
|---|---|---|
swift-ui-architect | 架构(模块化 MVVM-C、路由外壳、协议边界) | 动画架构(运动令牌、弹簧选择、编排) |
ios-design-system | 设计系统基础设施(令牌、样式、治理) | 运动令牌和动画组件模式 |
ios-hig | HIG 合规性 模式 | 特定于运动的 HIG(减少运动、空间连续性) |
范围之外: 设计师创作的矢量动画(对 After Effects 导出使用 Lottie)。复杂的 UIKit 过渡控制器(参见 Airbnb 的 声明式过渡框架)。此技能仅涵盖编程式 SwiftUI 动画。
此技能中的所有指导均假设采用诊所模块化 MVVM-C 架构:
Domain + DesignSystem(绝不导入 Data,绝不导入同级功能)DependencyContainer、具体协调器和 Route Shell 连接Domain 保持纯 Swift 并定义模型以及仓库、*Coordinating、ErrorRouting 和 AppError 契约Data 拥有 SwiftData/网络/同步/重试/后台 I/O 并实现 Domain 协议在以下情况下参考这些指南:
| 优先级 | 类别 | 影响 | 前缀 | 规则数 |
|---|---|---|---|---|
| 1 | 弹簧物理 | 关键 | spring- | 8 |
| 2 | 时序与感觉 | 关键 | feel- | 6 |
| 3 | 手势连续性 | 高 | gesture- | 7 |
| 4 | 空间过渡 | 高 | spatial- | 6 |
| 5 | 微交互 | 高 | micro- | 6 |
| 6 | 编排 | 高 | orch- | 5 |
| 7 | 工艺与润色 | 高 | craft- | 5 |
| 8 | 内容运动 | 中高 | content- | 5 |
spring-motion-tokens — 将运动令牌定义为无大小写枚举,用于所有弹簧预设spring-smooth-default — 对所有 UI 过渡默认使用 .smooth 弹簧spring-snappy-responsive — 对响应式交互使用 .snappy 弹簧spring-bouncy-celebration — 对趣味性和庆祝性时刻使用 .bouncy 弹簧spring-custom-parameters — 使用 response 和 dampingFraction 调整自定义弹簧spring-velocity-preservation — 弹簧在中断时保留速度spring-never-linear — 切勿对交互式 UI 使用线性或 easeInOutspring-completion-chaining — 使用 withAnimation 完成回调进行链式序列feel-250ms-max — 保持 UI 动画在 250 毫秒以内feel-faster-better — 更快的动画几乎总是感觉更好feel-asymmetric-enter-exit — 对进入和退出使用非对称时序feel-distance-proportional — 使持续时间与移动距离相匹配feel-haptic-sync — 将触觉反馈与视觉动画关键帧同步feel-stagger-timing — 以 30-50 毫秒的间隔错开显示gesture-rubber-band — 在拖拽边界处使用橡皮筋效果gesture-momentum-dismiss — 根据速度或距离阈值进行关闭gesture-snap-points — 使用速度感知的吸附点gesture-interruptible — 使所有手势动画可中断gesture-scroll-drag-conflict — 解决滚动和拖拽手势冲突gesture-state-transient — 对瞬态拖拽状态使用 GestureStategesture-projected-landing — 根据手势速度预测自然落点位置spatial-matched-geometry — 对展开/折叠变形使用 matchedGeometryEffectspatial-zoom-navigation — 对集合详情使用缩放导航过渡(iOS 18)spatial-transition-origin — 将过渡锚定到其触发位置spatial-hero-shared-element — 共享多个元素 ID 以实现丰富的英雄动画spatial-sheet-morph — 对表单呈现使用 matchedGeometryEffectspatial-tab-continuity — 在标签页过渡中保持空间方向micro-button-press-scale — 按压时将按钮缩放至 0.97 以提供触觉反馈micro-haptic-pairing — 将每个视觉状态变化与触觉反馈配对micro-symbol-effect — 对 SF Symbol 动画使用 symbolEffectmicro-toggle-bounce — 为切换状态变化添加弹跳效果micro-long-press-fill — 对长按操作进行渐进式填充动画micro-loading-phase — 对有机加载状态使用重复弹簧orch-phase-animator — 对多步骤序列使用 PhaseAnimatororch-keyframe-animator — 对时间线精确的运动使用 KeyframeAnimatororch-stagger-children — 错开子元素以实现编排的显示orch-coordinated-entrance — 使用共享触发器协调多元素进入orch-timeline-view — 对连续重复动画使用 TimelineViewcraft-reduce-motion — 尊重 accessibilityReduceMotion 并提供淡入淡出回退craft-blur-bridge — 使用模糊来桥接不完美的过渡状态craft-drawing-group — 对 Metal 支持的复杂动画使用 drawingGroup()craft-geometry-group — 使用 geometryGroup() 来隔离布局动画传播craft-transaction-debug — 使用 Transaction 来调试和覆盖动画行为content-numeric-text — 对数字变化使用 contentTransition(.numericText)content-scroll-transition — 对滚动位置效果使用 scrollTransitioncontent-visual-effect — 对位置感知动画使用 visualEffectcontent-symbol-replace — 使用 contentTransition 对符号替换进行动画处理content-text-renderer — 对字符级动画使用 Text Renderer(iOS 18)阅读各个参考文件以获取包含错误/正确代码示例的详细解释:
| 文件 | 描述 |
|---|---|
| references/_sections.md | 类别定义和排序 |
| assets/templates/_template.md | 新规则模板 |
| metadata.json | 版本和参考信息 |
每周安装次数
60
代码仓库
GitHub 星标数
85
首次出现
2026年2月11日
安全审计
安装于
codex54
gemini-cli54
github-copilot53
opencode53
kimi-cli52
amp51
Opinionated, strict animation craft guide for SwiftUI iOS 26 / Swift 6.2 apps. Contains 50 rules across 8 categories, prioritized by impact. Derived from Airbnb Engineering motion patterns, Apple WWDC sessions, and Apple Human Interface Guidelines. Mandates @Equatable on every animated view, motion tokens for all spring/timing values, and design system tokens for layout.
This skill is designed to work alongside swift-ui-architect and ios-design-system. All code examples follow the same non-negotiable constraints:
@Equatable macro on every view (Airbnb measured 15% scroll hitch reduction)@Observable for complex animation state that involves business logic triggers@State for view-owned animation state (toggle booleans, drag offsets)Spacing.xs/sm/md/lg, Radius.sm/md/lg — zero hardcoded layout numbersMotion.standard/responsive/playful — zero scattered spring literals.backgroundSurface, .accentPrimary — no raw Color literals in viewsThis skill is the motion layer — it teaches how to BUILD fluid, performant animations. When loaded alongside sibling skills:
| Sibling Skill | Its Focus | This Skill's Focus |
|---|---|---|
swift-ui-architect | Architecture (modular MVVM-C, route shells, protocol boundaries) | Animation architecture (motion tokens, spring selection, orchestration) |
ios-design-system | Design system infrastructure (tokens, styles, governance) | Motion tokens and animated component patterns |
ios-hig | HIG compliance patterns | Motion-specific HIG (reduce motion, spatial continuity) |
Out of scope: Designer-authored vector animations (use Lottie for After Effects exports). Complex UIKit transition controllers (see Airbnb's declarative transition framework). This skill covers programmatic SwiftUI animations only.
All guidance in this skill assumes the clinic modular MVVM-C architecture:
Domain + DesignSystem only (never Data, never sibling features)DependencyContainer, concrete coordinators, and Route Shell wiringDomain stays pure Swift and defines models plus repository, *Coordinating, ErrorRouting, and AppError contractsData owns SwiftData/network/sync/retry/background I/O and implements Domain protocolsReference these guidelines when:
| Priority | Category | Impact | Prefix | Rules |
|---|---|---|---|---|
| 1 | Spring Physics | CRITICAL | spring- | 8 |
| 2 | Timing & Feel | CRITICAL | feel- | 6 |
| 3 | Gesture Continuity | HIGH | gesture- | 7 |
| 4 | Spatial Transitions | HIGH | spatial- |
spring-motion-tokens — Define motion tokens as a caseless enum for all spring presetsspring-smooth-default — Default to .smooth spring for all UI transitionsspring-snappy-responsive — Use .snappy spring for responsive interactionsspring-bouncy-celebration — Use .bouncy spring for playful and celebratory momentsspring-custom-parameters — Tune custom springs with response and dampingFractionfeel-250ms-max — Keep UI animations under 250msfeel-faster-better — Faster animations almost always feel betterfeel-asymmetric-enter-exit — Use asymmetric timing for enter and exitfeel-distance-proportional — Match duration to distance traveledfeel-haptic-sync — Sync haptic feedback to visual animation keyframesgesture-rubber-band — Rubber band at drag boundariesgesture-momentum-dismiss — Dismiss on velocity OR distance thresholdgesture-snap-points — Use velocity-aware snap pointsgesture-interruptible — Make all gesture animations interruptiblegesture-scroll-drag-conflict — Resolve scroll and drag gesture conflictsspatial-matched-geometry — Use matchedGeometryEffect for expand/collapse morphsspatial-zoom-navigation — Use zoom navigation transition for collection detail (iOS 18)spatial-transition-origin — Anchor transitions to their trigger locationspatial-hero-shared-element — Share multiple element IDs for rich hero animationsspatial-sheet-morph — Use matchedGeometryEffect for sheet presentationsmicro-button-press-scale — Scale buttons to 0.97 on press for tactile feedbackmicro-haptic-pairing — Pair every visual state change with haptic feedbackmicro-symbol-effect — Use symbolEffect for SF Symbol animationsmicro-toggle-bounce — Add bounce to toggle state changesmicro-long-press-fill — Animate progressive fill for long press actionsorch-phase-animator — Use PhaseAnimator for multi-step sequencesorch-keyframe-animator — Use KeyframeAnimator for timeline-precise motionorch-stagger-children — Stagger child elements for orchestrated revealsorch-coordinated-entrance — Coordinate multi-element entrances with shared triggerorch-timeline-view — Use TimelineView for continuous repeating animationscraft-reduce-motion — Respect accessibilityReduceMotion with crossfade fallbackcraft-blur-bridge — Use blur to bridge imperfect transition statescraft-drawing-group — Use drawingGroup() for Metal-backed complex animationscraft-geometry-group — Use geometryGroup() to isolate layout animation propagationcraft-transaction-debug — Use Transaction to debug and override animation behaviorcontent-numeric-text — Use contentTransition(.numericText) for number changescontent-scroll-transition — Use scrollTransition for scroll-position effectscontent-visual-effect — Use visualEffect for position-aware animationscontent-symbol-replace — Animate symbol replacement with contentTransitioncontent-text-renderer — Use Text Renderer for character-level animation (iOS 18)Read individual reference files for detailed explanations with incorrect/correct code examples:
| File | Description |
|---|---|
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |
Weekly Installs
60
Repository
GitHub Stars
85
First Seen
Feb 11, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex54
gemini-cli54
github-copilot53
opencode53
kimi-cli52
amp51
code-style-validator:基于AST的代码风格验证与自动修复工具,提升代码质量
72 周安装
SQLMap数据库渗透测试指南:自动化SQL注入检测与利用方法
72 周安装
Superhuman UI 设计规范:AI 驱动的界面构建指南与设计系统
72 周安装
iOS MapKit API 参考指南:SwiftUI Map (iOS 17+) 与 MKMapView 完整对比与使用教程
78 周安装
iOS设计系统最佳实践:SwiftUI 6.2 Airbnb风格指南,含50条架构与治理规则
74 周安装
Tauri桌面应用开发与安全指南:IPC安全、能力系统、CSP配置最佳实践
45 周安装
| 6 |
| 5 | Micro-interactions | HIGH | micro- | 6 |
| 6 | Orchestration | HIGH | orch- | 5 |
| 7 | Craft & Polish | HIGH | craft- | 5 |
| 8 | Content Motion | MEDIUM-HIGH | content- | 5 |
spring-velocity-preservationspring-never-linear — Never use linear or easeInOut for interactive UIspring-completion-chaining — Use withAnimation completion for chained sequencesfeel-stagger-timinggesture-state-transientgesture-projected-landing — Project gesture velocity for natural landing positionspatial-tab-continuitymicro-loading-phase