mobile-ux
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMobile 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_TIMEOUTyaml
retry_config:
max_attempts: 3
backoff_type: exponential
initial_delay_ms: 1000
max_delay_ms: 10000
retryable_errors:
- DEVICE_SYNC_FAILED
- PREVIEW_TIMEOUTLogging 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 sheetsiOS设计原则
├── 清晰性(易读文本、明确图标)
├── 顺从性(内容优先)
├── 层次感(分层布局、动效呈现)
iOS导航设计
├── 标签栏(最多5个选项)
├── 导航栏
├── 工具栏
├── 侧边栏(iPad专属)
└── 搜索栏
iOS组件
├── SF Symbols
├── 系统控件
├── Sheets
├── Popovers
└── Action sheetsModule 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 sheetsMaterial设计原则
├── 拟物化隐喻
├── 大胆、直观的视觉风格
├── 动效传递意义
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
平台对比
| Aspect | iOS (HIG) | Android (Material) |
|---|---|---|
| Touch target | 44x44 pt | 48x48 dp |
| Navigation | Tab bar (bottom) | Bottom nav / Drawer |
| Back navigation | Swipe edge, button | System back |
| Typography | SF Pro | Roboto |
| Icons | SF Symbols | Material Icons |
| Elevation | Subtle | Card elevation |
| Haptics | Taptic Engine | Vibration patterns |
| 维度 | iOS(HIG) | Android(Material Design) |
|---|---|---|
| 触控目标尺寸 | 44x44 pt | 48x48 dp |
| 导航方式 | 底部标签栏 | 底部导航/导航抽屉 |
| 返回导航 | 边缘滑动、返回按钮 | 系统返回键 |
| 字体 | SF Pro | Roboto |
| 图标 | SF Symbols | Material Icons |
| 层次感 | 低调柔和 | 卡片明显分层 |
| 触觉反馈 | Taptic Engine | 震动模式 |
Error Handling
错误处理
| Error Code | Description | Recovery |
|---|---|---|
| Touch target too small | Increase size |
| Platform violation | Use native pattern |
| Gesture conflict | Redesign gesture |
| Safe area ignored | Add insets |
| Layout overflow | Use flexible layout |
| 错误码 | 描述 | 修复方案 |
|---|---|---|
| 触控目标尺寸过小 | 增大目标尺寸 |
| 违反平台规范 | 使用原生设计模式 |
| 手势冲突 | 重新设计手势 |
| 忽略安全区域 | 添加内边距 |
| 布局溢出 | 使用弹性布局 |
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
质量指标
| Metric | Target | Measurement |
|---|---|---|
| Platform compliance | > 95% | HIG/Material audit |
| Touch target compliance | 100% | Size verification |
| Device coverage | > 90% | Matrix testing |
| Performance score | > 90 | Lighthouse/tools |
| 指标 | 目标值 | 测量方式 |
|---|---|---|
| 平台合规性 | > 95% | HIG/Material规范审计 |
| 触控目标合规性 | 100% | 尺寸校验 |
| 设备覆盖率 | > 90% | 矩阵测试 |
| 性能得分 | > 90 | Lighthouse等工具检测 |
Version History
版本历史
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | 2025-12-30 | Production-grade upgrade |
| 版本 | 日期 | 更新内容 |
|---|---|---|
| 1.0.0 | 2025-12-30 | 生产级版本升级 |