Communitygithub.com

ComeOnOliver/skillshub

針對 SwiftUI iOS 26 / Swift 6.2 應用程式,提供一套嚴格且具主觀性的動畫製作指南。包含 8 大類別的 50 條規則,按影響力排序。源自 Airbnb 工程動畫模式、Apple WWDC 研討會以及 Apple 人機介面指南。強制要求每個動畫檢視都使用 @Equatable、所有彈簧/時間值都使用 Motion Token,以及佈局都使用設計系統 Token。

skillshub 是什麼?

這是一個針對 SwiftUI iOS 26 與 Swift 6.2 應用程式的高階動畫製作技能,旨在強制實施一套嚴格、經過實戰驗證的動畫實踐。該技能從 Airbnb 的工程動畫模式、Apple WWDC 研討會以及 Apple 人機介面指南中提煉出 50 條規則,並將其組織成 8 個優先級別。核心要求包括:所有動畫檢視必須標記為 `@Equatable`(據稱可減少 15% 的滾動卡頓)、使用統一的運動 Token (Motion Token) 來取代分散的彈簧常數、以及強制使用設計系統 Token (Design System Token) 進行佈局,徹底消除程式碼中的魔術數字。它專為與 `swift-ui-architect` 和 `ios-design-system` 這類技能搭配使用而設計,以遵循模組化 MVVM-C 架構。通過詳細的規則清單(例如 `spring-`、`feel-`、`gesture-`)以及各自的參考文件,該技能為開發者提供了一個可執行、可審查的指南,幫助他們構建流暢、高效能且符合平台規範的動畫效果。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/pproenca/dot-skills/ios-animations

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

dot-skills — Airbnb iOS SwiftUI 動畫最佳實踐

針對 SwiftUI iOS 26 / Swift 6.2 應用程式,提供一套嚴格且具主觀性的動畫製作指南。包含 8 大類別的 50 條規則,按影響力排序。源自 Airbnb 工程動畫模式、Apple WWDC 研討會以及 Apple 人機介面指南。強制要求每個動畫檢視都使用 @Equatable、所有彈簧/時間值都使用 Motion Token,以及佈局都使用設計系統 Token。

強制架構一致

此技能設計為與 swift-ui-architect 和 ios-design-system 一道協同工作。所有程式碼範例都遵循相同的不容妥協的約束:

  • 每個檢視上都使用 @Equatable 巨集(Airbnb 測量到滾動卡頓減少了 15%)
  • 針對涉及業務邏輯觸發器的複雜動畫狀態使用 @Observable
  • 針對檢視所擁有的動畫狀態(切換布林值、拖曳偏移量)使用 @State
  • 設計系統 Token:Spacing.xs/sm/md/lg、Radius.sm/md/lg — 禁止任何硬編碼的佈局數字
  • 運動 Token:Motion.standard/responsive/playful — 禁止任何散落的彈簧字面值
  • 語意顏色:.backgroundSurface、.accentPrimary — 檢視中不得有原始的 Color 字面值
  • 功能動畫僅限於呈現層面;資料/網路相關問題保留在 Data 套件中

範圍與同級技能的關係

此技能是動畫層 — 它教授如何建構流暢、高效能的動畫。當與同級技能一起載入時:

同級技能其焦點本技能焦點
swift-ui-architect架構(模組化 MVVM-C、路由殼層、協定邊界)動畫架構(運動 Token、彈簧選擇、編排)
ios-design-system設計系統基礎設施(Token、樣式、治理)運動 Token 和動畫化元件模式
ios-higHIG 合規模式特定於動畫的 HIG(減少動畫、空間連續性)

不包含: 設計師創作的向量動畫(請參閱 Lottie 以用於 After Effects 導出)。複雜的 UIKit 轉場控制器(請參閱 Airbnb 的宣告式轉場框架)。此技能僅涵蓋程式化 SwiftUI 動畫。

診所架構契約 (iOS 26 / Swift 6.2)

此技能中的所有指導都假設採用診所模組化 MVVM-C 架構:

  • 功能模組僅匯入 Domain + DesignSystem(絕不匯入 Data,也絕不匯入同級功能模組)
  • App Target 是收斂點,並擁有 DependencyContainer、具體的協調器和路由殼層的接線
  • Domain 保持純 Swift,並定義模型以及倉儲庫、*Coordinating、ErrorRouting 和 AppError 合約
  • Data 擁有 SwiftData/網路/同步/重試/背景 I/O,並實作 Domain 協定
  • 讀取/寫入流程預設為「先提供過時資料再驗證」的讀取和「樂觀排隊」的寫入
  • ViewModel 直接呼叫倉儲庫協定(沒有預設的 use-case/interactor 層)

何時應用

在以下情況下參考這些指南:

  • 將動畫添加到 SwiftUI 檢視或轉場時
  • 構建手勢驅動的互動(拖曳、滑動、平移)時
  • 使用空間轉場連接檢視時(展開/折疊、導航變形)
  • 設計微互動時(按鈕按下、切換、載入狀態)
  • 讓內容變化感覺更自然時(數字滾動、符號替換)
  • 編排多元素動畫序列時(KeyframeAnimator、PhaseAnimator)
  • 為設計系統定義運動 Token 時
  • 審查動畫程式碼的效能、無障礙性和架構合規性時

按優先級劃分的規則類別

優先級類別影響前綴規則數
1彈簧物理關鍵spring-8
2時間與感覺關鍵feel-6
3手勢連續性高gesture-7
4空間轉場高spatial-6
5微互動高micro-6
6編排高orch-5
7工藝與打磨高craft-5
8內容動畫中高content-5

快速參考

1. 彈簧物理 (關鍵)

2. 時間與感覺 (關鍵)

3. 手勢連續性 (高)

4. 空間轉場 (高)

5. 微互動 (高)

6. 編排 (高)

7. 工藝與打磨 (高)

8. 內容動畫 (中高)

如何使用

閱讀單個參考文件以獲取詳細說明,包含錯誤/正確的程式碼範例:

參考文件

檔案描述
references/_sections.md類別定義和順序
assets/templates/_template.md新規則的範本
metadata.json版本和參考資訊

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

相關技能