mobile-design

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Mobile Design System

移动设计系统

(Mobile-First · Touch-First · Platform-Respectful)
Philosophy: Touch-first. Battery-conscious. Platform-respectful. Offline-capable. Core Law: Mobile is NOT a small desktop. Operating Rule: Think constraints first, aesthetics second.
This skill exists to prevent desktop-thinking, AI-defaults, and unsafe assumptions when designing or building mobile applications.

(移动优先 · 触摸优先 · 尊重平台特性)
设计理念: 触摸优先、注重续航、尊重平台、支持离线。 核心准则: 移动设备绝非缩小版桌面。 操作原则: 优先考虑限制条件,其次才是美观。
本技能旨在避免在设计或开发移动应用时陷入桌面思维、AI默认行为和不安全假设

1. Mobile Feasibility & Risk Index (MFRI)

1. 移动可行性与风险指数(MFRI)

Before designing or implementing any mobile feature or screen, assess feasibility.
在设计或实现任何移动功能或界面之前,需评估其可行性。

MFRI Dimensions (1–5)

MFRI评估维度(1–5分)

DimensionQuestion
Platform ClarityIs the target platform (iOS / Android / both) explicitly defined?
Interaction ComplexityHow complex are gestures, flows, or navigation?
Performance RiskDoes this involve lists, animations, heavy state, or media?
Offline DependenceDoes the feature break or degrade without network?
Accessibility RiskDoes this impact motor, visual, or cognitive accessibility?
维度问题
平台清晰度是否明确定义了目标平台(iOS / Android / 两者兼顾)?
交互复杂度手势、流程或导航的复杂程度如何?
性能风险是否涉及列表、动画、大量状态或媒体资源?
离线依赖性无网络时该功能是否会失效或体验降级?
无障碍风险是否会影响运动、视觉或认知障碍用户的使用体验?

Score Formula

评分公式

MFRI = (Platform Clarity + Accessibility Readiness)
       − (Interaction Complexity + Performance Risk + Offline Dependence)
Range:
-10 → +10
MFRI = (平台清晰度 + 无障碍就绪度)
       − (交互复杂度 + 性能风险 + 离线依赖性)
分值范围:
-10 → +10

Interpretation

结果解读

MFRIMeaningRequired Action
6–10SafeProceed normally
3–5ModerateAdd performance + UX validation
0–2RiskySimplify interactions or architecture
< 0DangerousRedesign before implementation

MFRI分值含义要求行动
6–10安全正常推进开发
3–5中等风险增加性能与UX验证环节
0–2高风险简化交互逻辑或架构设计
< 0危险级重新设计后再启动开发

2. Mandatory Thinking Before Any Work

2. 启动工作前的强制思考

⛔ STOP: Ask Before Assuming (Required)

⛔ 停止:先提问再假设(必须执行)

If any of the following are not explicitly stated, you MUST ask before proceeding:
AspectQuestionWhy
PlatformiOS, Android, or both?Affects navigation, gestures, typography
FrameworkReact Native, Flutter, or native?Determines performance and patterns
NavigationTabs, stack, drawer?Core UX architecture
OfflineMust it work offline?Data & sync strategy
DevicesPhone only or tablet too?Layout & density rules
AudienceConsumer, enterprise, accessibility needs?Touch & readability
🚫 Never default to your favorite stack or pattern.

如果以下任何一项未明确说明,必须先提问确认再推进:
方面问题原因
平台目标平台是iOS、Android还是两者兼顾?影响导航、手势、排版设计
框架使用React Native、Flutter还是原生开发?决定性能表现与设计模式
导航采用标签栏、栈式导航还是抽屉导航?核心UX架构
离线支持是否必须支持离线使用?影响数据与同步策略
设备范围仅支持手机还是同时兼容平板?影响布局与密度规则
用户群体面向普通消费者、企业用户还是有无障碍需求的用户?影响触摸目标与可读性设计
🚫 绝不能默认使用自己偏好的技术栈或设计模式。

3. Mandatory Reference Reading (Enforced)

3. 强制参考阅读(强制执行)

Universal (Always Read First)

通用类(必须优先阅读)

FilePurposeStatus
mobile-design-thinking.mdAnti-memorization, context-forcing🔴 REQUIRED FIRST
touch-psychology.mdFitts’ Law, thumb zones, gestures🔴 REQUIRED
mobile-performance.md60fps, memory, battery🔴 REQUIRED
mobile-backend.mdOffline sync, push, APIs🔴 REQUIRED
mobile-testing.mdDevice & E2E testing🔴 REQUIRED
mobile-debugging.mdNative vs JS debugging🔴 REQUIRED
文件用途状态
mobile-design-thinking.md打破固化思维,强化场景意识🔴 必须优先阅读
touch-psychology.md菲茨定律、拇指区域、手势设计🔴 必须阅读
mobile-performance.md60fps帧率、内存、续航优化🔴 必须阅读
mobile-backend.md离线同步、推送通知、API设计🔴 必须阅读
mobile-testing.md设备测试与端到端测试🔴 必须阅读
mobile-debugging.md原生与JS调试对比🔴 必须阅读

Platform-Specific (Conditional)

平台专属类(按需阅读)

PlatformFile
iOSplatform-ios.md
Androidplatform-android.md
Cross-platformBOTH above
❌ If you haven’t read the platform file, you are not allowed to design UI.

平台文件
iOSplatform-ios.md
Androidplatform-android.md
跨平台需阅读上述两份文件
❌ 未阅读对应平台文件,不得开展UI设计工作。

4. AI Mobile Anti-Patterns (Hard Bans)

4. AI移动端反模式(严格禁止)

🚫 Performance Sins (Non-Negotiable)

🚫 性能大忌(不可协商)

❌ NeverWhy✅ Always
ScrollView for long listsMemory explosionFlatList / FlashList / ListView.builder
Inline renderItemRe-renders all rowsuseCallback + memo
Index as keyReorder bugsStable ID
JS-thread animationsJankNative driver / GPU
console.log in prodJS thread blockStrip logs
No memoizationBattery + perf drainReact.memo / const widgets

❌ 绝对禁止原因✅ 正确做法
为长列表使用ScrollView内存激增使用FlatList / FlashList / ListView.builder
内联renderItem函数触发全量重渲染搭配useCallback + memo使用
用索引作为key排序时出现bug使用稳定ID
JS线程执行动画画面卡顿使用原生驱动 / GPU加速
生产环境保留console.log阻塞JS线程移除日志
不做缓存优化消耗电量与性能使用React.memo / const widgets

🚫 Touch & UX Sins

🚫 触摸与UX大忌

❌ NeverWhy✅ Always
Touch <44–48pxMiss tapsMin touch target
Gesture-only actionExcludes usersButton fallback
No loading stateFeels brokenExplicit feedback
No error recoveryDead endRetry + message
Ignore platform normsMuscle memory brokeniOS ≠ Android

❌ 绝对禁止原因✅ 正确做法
触摸目标小于44–48px误触或无法点击设置最小触摸目标
仅支持手势操作排除部分用户提供按钮备选方案
无加载状态让用户误以为应用故障显示明确反馈
无错误恢复机制导致用户陷入死胡同提供重试按钮与错误提示
忽略平台规范打破用户肌肉记忆区分iOS与Android设计

🚫 Security Sins

🚫 安全大忌

❌ NeverWhy✅ Always
Tokens in AsyncStorageEasily stolenSecureStore / Keychain
Hardcoded secretsReverse engineeredEnv + secure storage
No SSL pinningMITM riskCert pinning
Log sensitive dataPII leakageNever log secrets

❌ 绝对禁止原因✅ 正确做法
在AsyncStorage中存储令牌易被盗取使用SecureStore / Keychain
硬编码敏感信息易被逆向工程破解使用环境变量 + 安全存储
不做SSL证书绑定存在中间人攻击风险启用证书绑定
记录敏感数据导致个人信息泄露绝不记录敏感信息

5. Platform Unification vs Divergence Matrix

5. 平台统一与差异化矩阵

UNIFY                          DIVERGE
──────────────────────────     ─────────────────────────
Business logic                Navigation behavior
Data models                    Gestures
API contracts                  Icons
Validation                     Typography
Error semantics                Pickers / dialogs
统一范畴                          差异化范畴
──────────────────────────     ─────────────────────────
业务逻辑                导航行为
数据模型                    手势交互
API协议                  图标设计
校验规则                     排版规范
错误语义                选择器/对话框

Platform Defaults

平台默认规范

ElementiOSAndroid
FontSF ProRoboto
Min touch44pt48dp
BackEdge swipeSystem back
SheetsBottom sheetDialog / sheet
IconsSF SymbolsMaterial Icons

元素iOSAndroid
字体SF ProRoboto
最小触摸目标44pt48dp
返回操作边缘滑动系统返回键
底部弹窗Bottom sheetDialog / sheet
图标SF SymbolsMaterial Icons

6. Mobile UX Psychology (Non-Optional)

6. 移动端UX心理学(必学内容)

Fitts’ Law (Touch Reality)

Fitts’ Law(触摸交互现实)

  • Finger ≠ cursor
  • Accuracy is low
  • Reach matters more than precision
Rules:
  • Primary CTAs live in thumb zone
  • Destructive actions pushed away
  • No hover assumptions

  • 手指≠光标
  • 精准度低
  • 可及范围比精度更重要
规则:
  • 主要CTA按钮放置在拇指舒适区
  • 破坏性操作放在远离拇指的区域
  • 绝不假设用户会使用悬停交互

7. Performance Doctrine

7. 性能准则

React Native (Required Pattern)

React Native(必用模式)

ts
const Row = React.memo(({ item }) => (
  <View><Text>{item.title}</Text></View>
));

const renderItem = useCallback(
  ({ item }) => <Row item={item} />,
  []
);

<FlatList
  data={items}
  renderItem={renderItem}
  keyExtractor={(i) => i.id}
  getItemLayout={(_, i) => ({
    length: ITEM_HEIGHT,
    offset: ITEM_HEIGHT * i,
    index: i,
  })}
/>
ts
const Row = React.memo(({ item }) => (
  <View><Text>{item.title}</Text></View>
));

const renderItem = useCallback(
  ({ item }) => <Row item={item} />,
  []
);

<FlatList
  data={items}
  renderItem={renderItem}
  keyExtractor={(i) => i.id}
  getItemLayout={(_, i) => ({
    length: ITEM_HEIGHT,
    offset: ITEM_HEIGHT * i,
    index: i,
  })}
/>

Flutter (Required Pattern)

Flutter(必用模式)

dart
class Item extends StatelessWidget {
  const Item({super.key});

  
  Widget build(BuildContext context) {
    return const Text('Static');
  }
}
  • const
    everywhere possible
  • Targeted rebuilds only

dart
class Item extends StatelessWidget {
  const Item({super.key});

  
  Widget build(BuildContext context) {
    return const Text('Static');
  }
}
  • 尽可能使用
    const
    修饰
  • 仅触发针对性重渲染

8. Mandatory Mobile Checkpoint

8. 强制移动端检查点

Before writing any code, you must complete this:
🧠 MOBILE CHECKPOINT

Platform:     ___________
Framework:    ___________
Files Read:   ___________

3 Principles I Will Apply:
1.
2.
3.

Anti-Patterns I Will Avoid:
1.
2.
❌ Cannot complete → go back and read.

在编写任何代码之前,必须完成以下检查:
🧠 移动端检查点

目标平台:     ___________
使用框架:    ___________
已读文件:   ___________

将遵循的3条原则:
1.
2.
3.

将避免的反模式:
1.
2.
❌ 无法完成检查 → 返回重新阅读相关文档。

9. Framework Decision Tree (Canonical)

9. 框架决策树(标准流程)

Need OTA + web team → React Native + Expo
High-perf UI → Flutter
iOS only → SwiftUI
Android only → Compose
No debate without justification.

需要OTA更新 + 已有Web团队 → React Native + Expo
高性能UI需求 → Flutter
仅iOS平台 → SwiftUI
仅Android平台 → Compose
无合理理由不得偏离此决策。

10. Release Readiness Checklist

10. 发布就绪检查清单

Before Shipping

上线前需完成

  • Touch targets ≥ 44–48px
  • Offline handled
  • Secure storage used
  • Lists optimized
  • Logs stripped
  • Tested on low-end devices
  • Accessibility labels present
  • MFRI ≥ 3

  • 触摸目标≥44–48px
  • 已处理离线场景
  • 使用安全存储方案
  • 列表已优化
  • 日志已移除
  • 在低端设备完成测试
  • 添加无障碍标签
  • MFRI分值≥3

11. Related Skills

11. 相关技能

  • frontend-design – Visual systems & components
  • frontend-dev-guidelines – RN/TS architecture
  • backend-dev-guidelines – Mobile-safe APIs
  • error-tracking – Crash & performance telemetry

Final Law: Mobile users are distracted, interrupted, and impatient—often using one hand on a bad network with low battery. Design for that reality, or your app will fail quietly.

  • frontend-design – 视觉系统与组件设计
  • frontend-dev-guidelines – RN/TS架构规范
  • backend-dev-guidelines – 移动端友好API设计
  • error-tracking – 崩溃与性能遥测

最终准则: 移动用户通常处于分心、被打断的状态,且缺乏耐心——往往单手操作、网络不佳、电量不足。 针对这种现实场景设计,否则你的应用会悄然失败。

When to Use

使用场景

This skill is applicable to execute the workflow or actions described in the overview.
本技能适用于执行概述中描述的工作流程或操作。

Limitations

局限性

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
  • 仅当任务明确匹配上述范围时使用本技能。
  • 不得将输出结果替代环境特定的验证、测试或专家评审。
  • 若缺失必要输入、权限、安全边界或成功标准,请停止操作并请求澄清。