AgentSkillsCN

hig-patterns

Apple 人机界面指南中的交互与 UX 模式。当用户询问“引导流程”“用户引导”“应用启动”“加载状态”“拖放操作”“搜索模式”“设置设计”“通知”“模态性”“多任务处理”“反馈模式”“触觉反馈”“撤销重做”“文件管理”、数据录入、分享、协作、全屏、音频、视频、触觉反馈、评分、打印、帮助,或 Apple 应用中的账户管理时,可选用此技能。此外,当用户说“引导流程应该如何设计?”“我的应用加载时间太长了?”“我是否应该在这里使用模态窗口?”“我该如何处理错误?”“我什么时候应该请求权限?”“如何展示进度?”“确认删除的正确方式是什么?”时,亦可灵活运用。交叉参考:HIG 基础——用于底层原理、HIG 平台——用于平台特异性、HIG 组件布局——用于导航结构、HIG 组件内容——用于数据展示。

SKILL.md
--- frontmatter
name: hig-patterns
version: 1.0.0
description: >
  Apple Human Interface Guidelines interaction and UX patterns. Use this skill when the user asks about
  "onboarding flow", "user onboarding", "app launch", "loading state", "drag and drop", "search pattern",
  "settings design", "notifications", "modality", "multitasking", "feedback pattern", "haptics",
  "undo redo", "file management", data entry, sharing, collaboration, full screen, audio, video,
  haptic feedback, ratings, printing, help, or account management in Apple apps.
  Also use when the user says "how should onboarding work", "my app takes too long to load",
  "should I use a modal here", "how do I handle errors", "when should I ask for permissions",
  "how to show progress", or "what's the right way to confirm a delete".
  Cross-references: hig-foundations for underlying principles, hig-platforms for platform specifics,
  hig-components-layout for navigation, hig-components-content for data display.

Apple HIG: Interaction Patterns

Check for .claude/apple-design-context.md before asking questions. Use existing context and only ask for information not already covered.

Key Principles

  1. Minimize modality. Use modality only when it is critical to get attention, a task must be completed or abandoned, or saving changes is essential. Prefer non-modal alternatives.

  2. Provide clear feedback. Every action should produce visible, audible, or haptic response. Activity indicators for indeterminate waits, progress bars for determinate, haptics for physical confirmation.

  3. Support undo over confirmation dialogs. Destructive actions should be reversible when possible. Undo is almost always better than "Are you sure?"

  4. Launch quickly. Display a launch screen that transitions seamlessly into the first screen. No splash screens with logos. Restore previous state.

  5. Defer sign-in. Let users explore before requiring account creation. Support Sign in with Apple and passkeys.

  6. Keep onboarding brief. Three screens max. Let users skip. Teach through progressive disclosure and contextual hints.

  7. Use progressive disclosure. Show essentials first, let users drill into details. Don't overwhelm with every option on one screen.

  8. Respect user attention. Consolidate notifications, minimize interruptions, give users control over alerts. Never use notifications for marketing.

Reference Index

ReferenceTopicKey content
charting-data.mdCharting DataData visualization patterns, accessible charts, interactive elements
collaboration-and-sharing.mdCollaboration & SharingShare sheets, activity views, collaborative editing, SharePlay
drag-and-drop.mdDrag and DropDrag sources, drop targets, spring loading, multi-item drag, visual feedback
entering-data.mdEntering DataText fields, pickers, steppers, input validation, keyboard types, autofill
feedback.mdFeedbackAlerts, action sheets, haptic patterns, sound feedback, visual indicators
file-management.mdFile ManagementDocument browser, file providers, iCloud integration, document lifecycle
going-full-screen.mdGoing Full ScreenFull-screen transitions, immersive content, exiting full screen
launching.mdLaunchingLaunch screens, state restoration, cold vs warm launch
live-viewing-apps.mdLive Viewing AppsLive content display, real-time updates, Live Activities, Dynamic Island
loading.mdLoadingActivity indicators, progress views, skeleton screens, lazy loading, placeholders
managing-accounts.mdManaging AccountsSign in with Apple, passkeys, account creation, credential autofill, account deletion
managing-notifications.mdManaging NotificationsPermission requests, grouping, actionable notifications, provisional delivery
modality.mdModalitySheets, alerts, popovers, full-screen modals, when to use each
multitasking.mdMultitaskingiPad Split View, Slide Over, Stage Manager, responsive layout, size class transitions
offering-help.mdOffering HelpContextual tips, onboarding hints, help menus, support links
onboarding.mdOnboardingWelcome screens, feature highlights, progressive onboarding, skip options
playing-audio.mdPlaying AudioAudio sessions, background audio, Now Playing, audio routing, interruptions
playing-haptics.mdPlaying HapticsCore Haptics, UIFeedbackGenerator, haptic patterns, custom haptics
playing-video.mdPlaying VideoVideo player controls, picture-in-picture, AirPlay, full-screen video
printing.mdPrintingPrint dialogs, page setup, AirPrint integration
ratings-and-reviews.mdRatings & ReviewsSKStoreReviewController, timing, frequency limits, in-app feedback
searching.mdSearchingSearch bars, suggestions, scoped search, results display, recents
settings.mdSettingsIn-app vs Settings app, preference organization, toggles, defaults
undo-and-redo.mdUndo and RedoShake to undo, undo/redo stack, multi-level undo
workouts.mdWorkoutsWorkout sessions, live metrics, Always On display, summaries, HealthKit

Pattern Selection Guide

User GoalRecommended PatternAvoid
First app experienceBrief onboarding (max 3 screens) + progressive disclosureLong tutorials, mandatory sign-up
Waiting for contentSkeleton screens or progress indicatorsBlocking spinners with no context
Confirming destructive actionUndo supportExcessive "Are you sure?" dialogs
Collecting user inputInline validation, smart defaults, autofillModal forms for simple inputs
Requesting permissionsContextual, just-in-time with explanationRequesting all permissions at launch
Providing feedbackHaptics + visual indicatorSilent actions with no confirmation
Organizing preferencesIn-app settings for frequent itemsBurying all settings in system Settings app

Output Format

  1. Recommended pattern with rationale, citing the relevant reference file.
  2. Step-by-step implementation covering each screen or state.
  3. Platform variations for targeted platforms.
  4. Common pitfalls that violate HIG for this pattern.

Questions to Ask

  1. Where in the app does this pattern appear? What comes before and after?
  2. Which platforms?
  3. Designing from scratch or improving an existing flow?
  4. Does this involve sensitive actions? (Destructive operations, payments, permissions)

Related Skills

  • hig-foundations -- Accessibility, color, typography, and privacy principles underlying every pattern
  • hig-platforms -- Platform-specific pattern implementations
  • hig-components-layout -- Structural components (tab bars, sidebars, split views) for navigation patterns
  • hig-components-content -- Content display within patterns (charts, collections, search results)

Built by Raintree Technology · More developer tools