mobile-design by sickn33/antigravity-awesome-skills
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill mobile-design(移动优先 · 触控优先 · 尊重平台)
设计哲学: 触控优先。关注电量。尊重平台。支持离线。核心法则: 移动端不是缩小的桌面端。操作规则: 先考虑限制,再考虑美观。
此技能旨在防止在设计或构建移动应用程序时出现桌面端思维、AI默认假设和不安全的假设。
在设计或实现任何移动功能或界面之前,请评估可行性。
| 维度 | 问题 |
|---|---|
| 平台明确性 | 目标平台是否已明确定义? |
| 交互复杂度 | 手势、流程或导航的复杂程度如何? |
| 性能风险 | 是否涉及列表、动画、复杂状态或媒体? |
| 离线依赖性 | 该功能在没有网络时是否会中断或降级? |
| 无障碍风险 | 是否影响运动、视觉或认知无障碍功能? |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
MFRI = (平台明确性 + 无障碍准备度)
− (交互复杂度 + 性能风险 + 离线依赖性)
范围: -10 → +10
| MFRI | 含义 | 必需行动 |
|---|---|---|
| 6–10 | 安全 | 正常进行 |
| 3–5 | 中等 | 增加性能和用户体验验证 |
| 0–2 | 有风险 | 简化交互或架构 |
| < 0 | 危险 | 在实施前重新设计 |
如果以下任何一项没有明确说明,你必须在继续之前提问:
| 方面 | 问题 | 原因 |
|---|---|---|
| 平台 | iOS、Android 还是两者? | 影响导航、手势、字体 |
| 框架 | React Native、Flutter 还是原生? | 决定性能和模式 |
| 导航 | 标签页、堆栈、抽屉? | 核心用户体验架构 |
| 离线 | 必须离线工作吗? | 数据和同步策略 |
| 设备 | 仅手机还是也包括平板? | 布局和密度规则 |
| 受众 | 消费者、企业、无障碍需求? | 触控和可读性 |
🚫 切勿默认使用你喜欢的堆栈或模式。
| 文件 | 目的 | 状态 |
|---|---|---|
| mobile-design-thinking.md | 反记忆化,强制上下文思考 | 🔴 必须首先阅读 |
| touch-psychology.md | 费茨定律、拇指区域、手势 | 🔴 必须阅读 |
| mobile-performance.md | 60fps、内存、电量 | 🔴 必须阅读 |
| mobile-backend.md | 离线同步、推送、API | 🔴 必须阅读 |
| mobile-testing.md | 设备和端到端测试 | 🔴 必须阅读 |
| mobile-debugging.md | 原生与 JS 调试 | 🔴 必须阅读 |
| 平台 | 文件 |
|---|---|
| iOS | platform-ios.md |
| Android | platform-android.md |
| 跨平台 | 以上两者 |
❌ 如果你没有阅读平台文件,则不允许设计用户界面。
| ❌ 禁止 | 原因 | ✅ 推荐 |
|---|---|---|
| 对长列表使用 ScrollView | 内存爆炸 | FlatList / FlashList / ListView.builder |
| 内联 renderItem | 重新渲染所有行 | useCallback + memo |
| 使用索引作为键 | 重新排序错误 | 稳定的 ID |
| JS 线程动画 | 卡顿 | 原生驱动 / GPU |
| 生产环境使用 console.log | 阻塞 JS 线程 | 移除日志 |
| 无记忆化 | 电量和性能消耗 | React.memo / const widgets |
| ❌ 禁止 | 原因 | ✅ 推荐 |
|---|---|---|
| 触控目标 <44–48px | 错过点击 | 最小触控目标 |
| 仅手势操作 | 排除用户 | 按钮备用方案 |
| 无加载状态 | 感觉已损坏 | 明确的反馈 |
| 无错误恢复 | 死胡同 | 重试 + 消息 |
| 忽略平台规范 | 破坏肌肉记忆 | iOS ≠ Android |
| ❌ 禁止 | 原因 | ✅ 推荐 |
|---|---|---|
| 令牌存储在 AsyncStorage | 容易被盗 | SecureStore / Keychain |
| 硬编码密钥 | 可被逆向工程 | 环境变量 + 安全存储 |
| 无 SSL 证书锁定 | 中间人攻击风险 | 证书锁定 |
| 记录敏感数据 | 个人身份信息泄露 | 绝不记录密钥 |
统一 差异
────────────────────────── ─────────────────────────
业务逻辑 导航行为
数据模型 手势
API 契约 图标
验证 字体
错误语义 选择器 / 对话框
| 元素 | iOS | Android |
|---|---|---|
| 字体 | SF Pro | Roboto |
| 最小触控目标 | 44pt | 48dp |
| 返回 | 边缘滑动 | 系统返回按钮 |
| 底部面板 | 底部面板 | 对话框 / 面板 |
| 图标 | SF Symbols | Material Icons |
规则:
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,
})}
/>
class Item extends StatelessWidget {
const Item({super.key});
@override
Widget build(BuildContext context) {
return const Text('Static');
}
}
const在编写任何代码之前,你必须完成此检查点:
🧠 移动检查点
平台: ___________
框架: ___________
已读文件: ___________
我将应用的 3 个原则:
1.
2.
3.
我将避免的反模式:
1.
2.
❌ 无法完成 → 返回并阅读资料。
需要 OTA + 网页团队 → React Native + Expo
高性能用户界面 → Flutter
仅 iOS → SwiftUI
仅 Android → Compose
没有理由不得争论。
最终法则: 移动用户是分心的、被打断的、不耐烦的——通常是在电量低、网络差的情况下单手操作。为这种现实而设计,否则你的应用将悄无声息地失败。
此技能适用于执行概述中描述的工作流程或操作。
每周安装量
1.5K
代码仓库
GitHub 星标数
27.1K
首次出现
Jan 20, 2026
安全审计
安装于
opencode1.3K
gemini-cli1.3K
codex1.2K
github-copilot1.1K
cursor1.0K
amp960
(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.
Before designing or implementing any mobile feature or screen , assess feasibility.
| Dimension | Question |
|---|---|
| Platform Clarity | Is the target platform (iOS / Android / both) explicitly defined? |
| Interaction Complexity | How complex are gestures, flows, or navigation? |
| Performance Risk | Does this involve lists, animations, heavy state, or media? |
| Offline Dependence | Does the feature break or degrade without network? |
| Accessibility Risk | Does this impact motor, visual, or cognitive accessibility? |
MFRI = (Platform Clarity + Accessibility Readiness)
− (Interaction Complexity + Performance Risk + Offline Dependence)
Range: -10 → +10
| MFRI | Meaning | Required Action |
|---|---|---|
| 6–10 | Safe | Proceed normally |
| 3–5 | Moderate | Add performance + UX validation |
| 0–2 | Risky | Simplify interactions or architecture |
| < 0 | Dangerous | Redesign before implementation |
If any of the following are not explicitly stated , you MUST ask before proceeding:
| Aspect | Question | Why |
|---|---|---|
| Platform | iOS, Android, or both? | Affects navigation, gestures, typography |
| Framework | React Native, Flutter, or native? | Determines performance and patterns |
| Navigation | Tabs, stack, drawer? | Core UX architecture |
| Offline | Must it work offline? | Data & sync strategy |
| Devices | Phone only or tablet too? | Layout & density rules |
| Audience | Consumer, enterprise, accessibility needs? | Touch & readability |
🚫 Never default to your favorite stack or pattern.
| File | Purpose | Status |
|---|---|---|
| mobile-design-thinking.md | Anti-memorization, context-forcing | 🔴 REQUIRED FIRST |
| touch-psychology.md | Fitts’ Law, thumb zones, gestures | 🔴 REQUIRED |
| mobile-performance.md | 60fps, memory, battery | 🔴 REQUIRED |
| mobile-backend.md | Offline sync, push, APIs | 🔴 REQUIRED |
| mobile-testing.md | Device & E2E testing | 🔴 REQUIRED |
| mobile-debugging.md | Native vs JS debugging | 🔴 REQUIRED |
| Platform | File |
|---|---|
| iOS | platform-ios.md |
| Android | platform-android.md |
| Cross-platform | BOTH above |
❌ If you haven’t read the platform file, you are not allowed to design UI.
| ❌ Never | Why | ✅ Always |
|---|---|---|
| ScrollView for long lists | Memory explosion | FlatList / FlashList / ListView.builder |
| Inline renderItem | Re-renders all rows | useCallback + memo |
| Index as key | Reorder bugs | Stable ID |
| JS-thread animations | Jank | Native driver / GPU |
| console.log in prod | JS thread block | Strip logs |
| No memoization | Battery + perf drain | React.memo / const widgets |
| ❌ Never | Why | ✅ Always |
|---|---|---|
| Touch <44–48px | Miss taps | Min touch target |
| Gesture-only action | Excludes users | Button fallback |
| No loading state | Feels broken | Explicit feedback |
| No error recovery | Dead end | Retry + message |
| Ignore platform norms | Muscle memory broken | iOS ≠ Android |
| ❌ Never | Why | ✅ Always |
|---|---|---|
| Tokens in AsyncStorage | Easily stolen | SecureStore / Keychain |
| Hardcoded secrets | Reverse engineered | Env + secure storage |
| No SSL pinning | MITM risk | Cert pinning |
| Log sensitive data | PII leakage | Never log secrets |
UNIFY DIVERGE
────────────────────────── ─────────────────────────
Business logic Navigation behavior
Data models Gestures
API contracts Icons
Validation Typography
Error semantics Pickers / dialogs
| Element | iOS | Android |
|---|---|---|
| Font | SF Pro | Roboto |
| Min touch | 44pt | 48dp |
| Back | Edge swipe | System back |
| Sheets | Bottom sheet | Dialog / sheet |
| Icons | SF Symbols | Material Icons |
Rules:
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,
})}
/>
class Item extends StatelessWidget {
const Item({super.key});
@override
Widget build(BuildContext context) {
return const Text('Static');
}
}
const everywhere possibleBefore 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.
Need OTA + web team → React Native + Expo
High-perf UI → Flutter
iOS only → SwiftUI
Android only → Compose
No debate without justification.
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.
This skill is applicable to execute the workflow or actions described in the overview.
Weekly Installs
1.5K
Repository
GitHub Stars
27.1K
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode1.3K
gemini-cli1.3K
codex1.2K
github-copilot1.1K
cursor1.0K
amp960
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装