AgentSkillsCN

Mobile Design System

移动优先的设计体系技能,旨在避免桌面端思维,确保界面与交互符合触控设备的使用习惯,同时尊重各平台的特性。包含移动可行性风险指数(MFRI)、Flutter/React Native 的性能准则,以及对触控目标与安全区域的强制性检查。

SKILL.md
--- frontmatter
name: Mobile Design System
description: Mobile-first design system skill for preventing desktop-thinking and ensuring touch-friendly, platform-respectful UI/UX. Includes Mobile Feasibility Risk Index (MFRI), performance doctrines for Flutter/React Native, and mandatory checks for touch targets and safe areas.
source: sickn33/antigravity-awesome-skills/mobile-design

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.

1. Mobile Feasibility & Risk Index (MFRI)

Before designing or implementing any mobile feature or screen, assess feasibility.

MFRI Dimensions (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?

Interpretation

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

2. Mandatory Thinking Before Any Work

⛔ 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

4. AI Mobile Anti-Patterns (Hard Bans)

🚫 Performance Sins (Non-Negotiable)

❌ Never✅ Always
ScrollView for long listsFlatList / FlashList / ListView.builder
Inline renderItemuseCallback + memo / const widgets
Index as keyStable ID
JS-thread animationsNative driver / GPU
console.log in prodStrip logs

🚫 Touch & UX Sins

❌ Never✅ Always
Touch <44–48pxMin touch target
Gesture-only actionButton fallback
No loading stateExplicit feedback
No error recoveryRetry + message
Ignore platform normsiOS ≠ Android

🚫 Security Sins

❌ Never✅ Always
Tokens in AsyncStorageSecureStore / Keychain
Hardcoded secretsEnv + secure storage
No SSL pinningCert pinning
Log sensitive dataNever log secrets