mobile-ux

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Mobile UX Skill

移动UX Skill

Atomic Skill: Design native-feeling mobile experiences for iOS and Android platforms
Atomic Skill:为iOS和Android平台打造具有原生体验的移动用户体验

Purpose

用途

This skill provides platform-specific guidance for creating optimal mobile user experiences.
本Skill为打造优质移动用户体验提供平台专属指导方案。

Skill Invocation

Skill调用方式

Skill("custom-plugin-ux-design:mobile-ux")
Skill("custom-plugin-ux-design:mobile-ux")

Parameter Schema

参数 Schema

Input Parameters

输入参数

typescript
interface MobileUXParams {
  // Required
  task: "ios" | "android" | "cross-platform" | "responsive" | "gesture";
  scope: string;

  // Optional
  platform_priority?: "ios" | "android" | "equal";
  app_type?: "native" | "hybrid" | "pwa";
  device_targets?: ("phone" | "tablet" | "foldable")[];
  os_versions?: {
    ios?: string;
    android?: string;
  };
}
typescript
interface MobileUXParams {
  // 必填项
  task: "ios" | "android" | "cross-platform" | "responsive" | "gesture";
  scope: string;

  // 可选项
  platform_priority?: "ios" | "android" | "equal";
  app_type?: "native" | "hybrid" | "pwa";
  device_targets?: ("phone" | "tablet" | "foldable")[];
  os_versions?: {
    ios?: string;
    android?: string;
  };
}

Validation Rules

验证规则

yaml
task:
  type: enum
  required: true
  values: [ios, android, cross-platform, responsive, gesture]

scope:
  type: string
  required: true
  min_length: 5

platform_priority:
  type: enum
  default: "equal"
yaml
task:
  type: enum
  required: true
  values: [ios, android, cross-platform, responsive, gesture]

scope:
  type: string
  required: true
  min_length: 5

platform_priority:
  type: enum
  default: "equal"

Execution Flow

执行流程

MOBILE UX EXECUTION
────────────────────────────────────────────

Step 1: ANALYZE REQUIREMENTS
├── Identify target platforms
├── Define device matrix
└── Set priority platform

Step 2: RESEARCH GUIDELINES
├── Review platform HIG
├── Study native patterns
└── Identify constraints

Step 3: DESIGN PATTERNS
├── Navigation structure
├── Touch interactions
├── Platform-specific components
└── Gesture mapping

Step 4: ADAPT FOR PLATFORMS
├── iOS adaptations
├── Android adaptations
├── Cross-platform unification
└── Responsive breakpoints

Step 5: VALIDATE
├── Test on device matrix
├── Verify platform compliance
└── Document exceptions

────────────────────────────────────────────
移动UX执行流程
────────────────────────────────────────────

步骤1:需求分析
├── 确定目标平台
├── 定义设备矩阵
└── 设置优先平台

步骤2:指南调研
├── 研读平台HIG
├── 学习原生设计模式
└── 识别约束条件

步骤3:设计模式制定
├── 导航结构设计
├── 触控交互设计
├── 平台专属组件选型
└── 手势映射配置

步骤4:平台适配
├── iOS平台适配
├── Android平台适配
├── 跨平台统一设计
└── 响应式断点设置

步骤5:验证环节
├── 设备矩阵测试
├── 平台合规性校验
└── 例外情况文档记录

────────────────────────────────────────────

Retry Logic

重试逻辑

yaml
retry_config:
  max_attempts: 3
  backoff_type: exponential
  initial_delay_ms: 1000
  max_delay_ms: 10000
  retryable_errors:
    - DEVICE_SYNC_FAILED
    - PREVIEW_TIMEOUT
yaml
retry_config:
  max_attempts: 3
  backoff_type: exponential
  initial_delay_ms: 1000
  max_delay_ms: 10000
  retryable_errors:
    - DEVICE_SYNC_FAILED
    - PREVIEW_TIMEOUT

Logging Hooks

日志钩子

typescript
interface MobileUXLog {
  timestamp: string;
  event: "pattern_selected" | "adaptation_created" | "device_tested";
  platform: string;
  device: string;
  compliance_score: number;
}
typescript
interface MobileUXLog {
  timestamp: string;
  event: "pattern_selected" | "adaptation_created" | "device_tested";
  platform: string;
  device: string;
  compliance_score: number;
}

Learning Modules

学习模块

Module 1: iOS Human Interface Guidelines

模块1:iOS人机界面指南(iOS HIG)

iOS DESIGN PRINCIPLES
├── Clarity (legible, clear icons)
├── Deference (content first)
├── Depth (layers, motion)

iOS NAVIGATION
├── Tab bar (5 max)
├── Navigation bar
├── Tool bar
├── Side bar (iPad)
└── Search

iOS COMPONENTS
├── SF Symbols
├── System controls
├── Sheets
├── Popovers
└── Action sheets
iOS设计原则
├── 清晰性(易读文本、明确图标)
├── 顺从性(内容优先)
├── 层次感(分层布局、动效呈现)

iOS导航设计
├── 标签栏(最多5个选项)
├── 导航栏
├── 工具栏
├── 侧边栏(iPad专属)
└── 搜索栏

iOS组件
├── SF Symbols
├── 系统控件
├── Sheets
├── Popovers
└── Action sheets

Module 2: Material Design 3

模块2:Material Design 3

MATERIAL PRINCIPLES
├── Material as metaphor
├── Bold, graphic, intentional
├── Motion provides meaning

MATERIAL NAVIGATION
├── Bottom navigation
├── Navigation drawer
├── Navigation rail
├── Tabs
└── Search

MATERIAL COMPONENTS
├── FAB (Floating Action Button)
├── Cards
├── Chips
├── Dialogs
└── Bottom sheets
Material设计原则
├── 拟物化隐喻
├── 大胆、直观的视觉风格
├── 动效传递意义

Material导航设计
├── 底部导航栏
├── 导航抽屉
├── 导航侧边栏
├── 标签页
└── 搜索栏

Material组件
├── FAB(悬浮操作按钮)
├── 卡片组件
├── 芯片组件
├── 对话框
└── 底部弹窗

Module 3: Touch & Gestures

模块3:触控与手势

TOUCH TARGETS
├── iOS: 44x44 pt minimum
├── Android: 48x48 dp minimum
├── Spacing: 8dp between targets

STANDARD GESTURES
├── Tap (select, activate)
├── Long press (context menu)
├── Swipe (navigate, actions)
├── Pinch (zoom)
├── Rotate (rotate content)
├── Pan (scroll, move)
└── Edge swipe (back navigation)

GESTURE CONFLICTS
├── System gesture areas
├── Platform-specific gestures
└── Custom gesture rules
触控目标规范
├── iOS:最小44x44 pt
├── Android:最小48x48 dp
├── 间距:目标间至少8dp

标准手势
├── 点击(选择、激活)
├── 长按(唤起上下文菜单)
├── 滑动(导航、执行操作)
├── 捏合(缩放)
├── 旋转(旋转内容)
├── 拖拽(滚动、移动)
└── 边缘滑动(返回导航)

手势冲突处理
├── 系统手势区域
├── 平台专属手势
└── 自定义手势规则

Module 4: Responsive Mobile Design

模块4:响应式移动设计

BREAKPOINTS
├── Small phone: 320-375pt
├── Regular phone: 375-414pt
├── Large phone: 414-428pt
├── Small tablet: 768-834pt
├── Large tablet: 834-1024pt
└── Foldable: Variable

ADAPTIVE LAYOUTS
├── Compact (phone portrait)
├── Regular (phone landscape, tablet)
├── Expanded (tablet landscape)

SAFE AREAS
├── Status bar
├── Home indicator
├── Notch/Dynamic Island
├── Gesture areas
└── Camera cutouts
断点规范
├── 小屏手机:320-375pt
├── 常规手机:375-414pt
├── 大屏手机:414-428pt
├── 小屏平板:768-834pt
├── 大屏平板:834-1024pt
└── 折叠屏:可变尺寸

自适应布局
├── 紧凑布局(手机竖屏)
├── 常规布局(手机横屏、平板)
├── 扩展布局(平板横屏)

安全区域
├── 状态栏
├── 主页指示器
├── 刘海屏/灵动岛
├── 手势操作区域
└── 摄像头开孔

Module 5: Platform Optimization

模块5:平台优化

PERFORMANCE
├── 60fps animations
├── Lazy loading
├── Image optimization
├── Memory management
└── Network efficiency

NATIVE FEEL
├── Platform animations
├── Haptic feedback
├── System sounds
├── Platform typography
└── Native controls
性能优化
├── 60fps流畅动画
├── 懒加载
├── 图片优化
├── 内存管理
└── 网络效率优化

原生体验优化
├── 平台专属动效
├── 触觉反馈
├── 系统音效
├── 平台专属字体
└── 原生控件使用

Platform Comparison

平台对比

AspectiOS (HIG)Android (Material)
Touch target44x44 pt48x48 dp
NavigationTab bar (bottom)Bottom nav / Drawer
Back navigationSwipe edge, buttonSystem back
TypographySF ProRoboto
IconsSF SymbolsMaterial Icons
ElevationSubtleCard elevation
HapticsTaptic EngineVibration patterns
维度iOS(HIG)Android(Material Design)
触控目标尺寸44x44 pt48x48 dp
导航方式底部标签栏底部导航/导航抽屉
返回导航边缘滑动、返回按钮系统返回键
字体SF ProRoboto
图标SF SymbolsMaterial Icons
层次感低调柔和卡片明显分层
触觉反馈Taptic Engine震动模式

Error Handling

错误处理

Error CodeDescriptionRecovery
MUX-001
Touch target too smallIncrease size
MUX-002
Platform violationUse native pattern
MUX-003
Gesture conflictRedesign gesture
MUX-004
Safe area ignoredAdd insets
MUX-005
Layout overflowUse flexible layout
错误码描述修复方案
MUX-001
触控目标尺寸过小增大目标尺寸
MUX-002
违反平台规范使用原生设计模式
MUX-003
手势冲突重新设计手势
MUX-004
忽略安全区域添加内边距
MUX-005
布局溢出使用弹性布局

Troubleshooting

故障排查

Problem: App doesn't feel native

问题:应用无原生体验感

Diagnosis:
├── Check: Navigation patterns
├── Check: Component usage
├── Check: Animation timing
└── Solution: Align with platform

Steps:
1. Audit against HIG/Material
2. Replace custom with native
3. Match platform animations
4. Test with platform users
诊断步骤:
├── 检查:导航模式
├── 检查:组件使用
├── 检查:动画时长
└── 解决方案:对齐平台规范

执行步骤:
1. 对照HIG/Material规范审计
2. 替换自定义组件为原生组件
3. 匹配平台动效节奏
4. 邀请平台用户测试

Problem: Touch interactions unreliable

问题:触控交互不可靠

Diagnosis:
├── Check: Touch target sizes
├── Check: Gesture areas
├── Check: Feedback timing
└── Solution: Optimize touch

Steps:
1. Measure all targets
2. Increase to minimum
3. Add haptic feedback
4. Test with real devices
诊断步骤:
├── 检查:触控目标尺寸
├── 检查:手势操作区域
├── 检查:反馈时机
└── 解决方案:优化触控设计

执行步骤:
1. 测量所有触控目标
2. 调整至最小尺寸要求
3. 添加触觉反馈
4. 使用真实设备测试

Unit Test Templates

单元测试模板

typescript
describe("MobileUXSkill", () => {
  describe("platform compliance", () => {
    it("should meet iOS touch target requirements", async () => {
      const result = await invoke({
        task: "ios",
        scope: "button component"
      });
      expect(result.touch_target.width).toBeGreaterThanOrEqual(44);
      expect(result.touch_target.height).toBeGreaterThanOrEqual(44);
    });

    it("should meet Android touch target requirements", async () => {
      const result = await invoke({
        task: "android",
        scope: "button component"
      });
      expect(result.touch_target.width).toBeGreaterThanOrEqual(48);
      expect(result.touch_target.height).toBeGreaterThanOrEqual(48);
    });
  });

  describe("responsive adaptation", () => {
    it("should provide breakpoint specifications", async () => {
      const result = await invoke({
        task: "responsive",
        scope: "navigation layout"
      });
      expect(result.breakpoints.compact).toBeDefined();
      expect(result.breakpoints.regular).toBeDefined();
    });
  });
});
typescript
describe("MobileUXSkill", () => {
  describe("platform compliance", () => {
    it("should meet iOS touch target requirements", async () => {
      const result = await invoke({
        task: "ios",
        scope: "button component"
      });
      expect(result.touch_target.width).toBeGreaterThanOrEqual(44);
      expect(result.touch_target.height).toBeGreaterThanOrEqual(44);
    });

    it("should meet Android touch target requirements", async () => {
      const result = await invoke({
        task: "android",
        scope: "button component"
      });
      expect(result.touch_target.width).toBeGreaterThanOrEqual(48);
      expect(result.touch_target.height).toBeGreaterThanOrEqual(48);
    });
  });

  describe("responsive adaptation", () => {
    it("should provide breakpoint specifications", async () => {
      const result = await invoke({
        task: "responsive",
        scope: "navigation layout"
      });
      expect(result.breakpoints.compact).toBeDefined();
      expect(result.breakpoints.regular).toBeDefined();
    });
  });
});

Quality Metrics

质量指标

MetricTargetMeasurement
Platform compliance> 95%HIG/Material audit
Touch target compliance100%Size verification
Device coverage> 90%Matrix testing
Performance score> 90Lighthouse/tools
指标目标值测量方式
平台合规性> 95%HIG/Material规范审计
触控目标合规性100%尺寸校验
设备覆盖率> 90%矩阵测试
性能得分> 90Lighthouse等工具检测

Version History

版本历史

VersionDateChanges
1.0.02025-12-30Production-grade upgrade
版本日期更新内容
1.0.02025-12-30生产级版本升级