Cursor rule
.cursor/rules/mobile-cross-platform.mdcCross-platform mobile: Flutter, React Native, Expo. Load when editing mobile manifests, platform folders, or shared mobile architecture — not for everyday app logic.
Cursor rules
Quality
68/100
Scores the file, not the repository.Length
917 words
11 headings · 0 code blocksRepository
124
— · pushed 49 days agoLast changed
3 days ago
First indexed 3 days ago.1234567# Cross-Platform Mobile Development89Guidance for Flutter, React Native, and Expo projects. For general coding workflow, the always-on core **Code Discipline** and **App And Scaffold Discipline** sections are canonical — especially CLI-first scaffolding and verification.1011Load this rule when globs match mobile project files. Identify the stack from manifests (`pubspec.yaml`, `package.json` + native folders, `app.json`) before choosing patterns. Do not hand-create `pubspec.yaml`, Xcode/Android project trees, or `.xcodeproj` / `.pbxproj` — use the framework CLI.1213---1415## Before Changing Mobile Code16171. Identify stack: **Flutter**, **React Native**, **Expo**, or other.182. Read manifest, entry point (`main.dart`, `App.tsx`), navigation setup, and existing state-management pattern.193. Match platform folder conventions already in the repo — do not restructure unprompted.204. For new dependencies or SDK versions, verify against current official docs before recommending.2122---2324## Scaffold & Verify (CLI-first)2526| Stack | Create | Add deps | Typical verify |27|-------|--------|----------|----------------|28| Flutter | `flutter create` | `flutter pub add` | `flutter analyze`, `flutter test` |29| React Native | `npx react-native init` | `npm install` | `npx react-native doctor`, build one platform |30| Expo | `npx create-expo-app` | `npx expo install` | `npx expo doctor`, `npx expo start` |3132After structural changes, run the stack's analyze/test/build check before claiming done.3334---3536## Architecture Quick Reference3738**Good cross-platform fit:** content apps, business/productivity, MVPs, teams with web background, similar UI across platforms.3940**Consider more native work when:** heavy AR/camera, games, deep OS integration, strict platform HIG, or performance-critical media pipelines.4142| Framework | Best for | Watch out for |43|-----------|----------|---------------|44| Flutter | Custom UI, performance | App size, Dart ecosystem |45| React Native | JS/TS teams, code share | Native modules, bridge overhead |46| Expo | Fast iteration, managed workflow | Native module limits (unless dev client) |4748**Share across platforms:** domain logic, models, API client, validation, most state logic.49**Keep platform-specific:** native permissions, push/deep links, store billing, platform UI chrome where HIG matters.5051Layering (presentation → domain → data) applies; see `language-agnostic-patterns` when refactoring module boundaries.5253---5455## State & Navigation5657- Reuse the pattern already in the repo (Provider, Riverpod, Bloc, Redux, Zustand, etc.) — do not introduce a second state library.58- Navigation: one primary approach (go_router, React Navigation, Expo Router) per app; match existing route definitions.59- Persist only what the product requires; handle offline/error states explicitly on mobile networks.6061---6263## Mobile Design Quality6465Web design instincts do not transfer 1:1 to mobile. The judgment calls:6667- **Platform type defaults are correct here.** SF Pro on iOS and Roboto on Android are the *native* choice, not slop — the web font bans in `anti-slop-design` apply to display/brand moments, not to app body text. Custom fonts earn their place on headings and brand surfaces only.68- **Design for the thumb, not the cursor.** Primary actions in the bottom half of the screen; destructive actions away from habitual tap zones; nothing important hidden behind hover (there is none).69- **Navigation follows platform grammar.** Bottom tabs for 3–5 top-level destinations; respect the Android back gesture and iOS swipe-back; use native share sheets, switches, and pickers instead of web-style rebuilds.70- **Glanceability over density.** One primary piece of information per screen region; web dashboard density fails at arm's length on a 6-inch display.71- **Loading is layout-shaped.** Skeletons that match the final layout; render cached/partial data immediately rather than blocking the screen on the full payload.72- **Lists must be virtualized.** `FlatList` / `ListView.builder` with stable keys — never map an unbounded array into scroll children (also listed in traps; it is the #1 mobile perf bug).73- **Motion at 60fps.** RN: `useNativeDriver` / Reanimated on the UI thread. Flutter: animate with `AnimatedBuilder`/implicit animations, not `setState` rebuilds of whole subtrees.7475For visual direction (palette, tone, category), still load `anti-slop-design` — adapted through the platform conventions above.7677---7879## Platform Integration8081- Request permissions at point of use with clear rationale; handle denied/permanent-deny flows.82- Test on **both** iOS and Android when behavior is platform-specific — simulators/emulators are minimum proof; label device-only issues `unverified`.83- Deep links, push, and IAP: follow each store's current guidelines; verify against official docs.8485---8687## Performance & Release8889- Images/assets: appropriate resolution; lazy-load lists (avoid building unbounded scroll children).90- Profile before optimizing (Flutter DevTools, RN Performance monitor).91- Release: match existing signing, flavors/schemes, and store listing workflow in the repo — do not invent a new pipeline without asking.9293---9495## Common Traps9697- Hand-written native project files instead of CLI output98- Hover-only or desktop-sized touch targets (min ~44px)99- Ignoring safe areas / notches / keyboard overlap100- Blocking the UI thread with sync I/O or heavy work on the main isolate/thread101- Adding native modules to Expo managed workflow without checking compatibility102- Platform-specific code without `#ifdef` / `Platform.is` / conditional imports where the repo uses them103104---105106## Verification After Changes107108| Change | Minimum proof |109|--------|----------------|110| Dart/TS logic | `flutter analyze` / lint + targeted test |111| UI/layout | Run on one platform simulator; check safe area and scroll |112| Native config | Build succeeds for affected platform (`flutter build`, `npx react-native run-ios`, etc.) |113| Release/signing | `unverified` until user confirms store/TestFlight path |114115For distinctive mobile UI polish, load `anti-slop-design` (category-aware layout, typography, motion).116117---118119## When NOT to Load This File120121- Backend or web-only tasks — core **Code Discipline** is enough.122- Greenfield framework choice with no repo context — inspect first, ask on real forks.123
Also in madebyaris/advance-minimax-m3-cursor-rules
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| madebyaris/advance-minimax-m3-cursor-rules.cursor/rules/3d-graphics.mdc · 124 | Cursor rules | lint-formatstyle | 62/100 | 3 days ago | |
| madebyaris/advance-minimax-m3-cursor-rules.cursor/rules/agent-teams.mdc · 124 | Cursor rules | setupstylegitapi+3 | 73/100 | 3 days ago | |
| madebyaris/advance-minimax-m3-cursor-rules.cursor/rules/cursor-agent-orchestration.mdc · 124 | Cursor rules | styledo-notagent-behaviour | 73/100 | 3 days ago | |
| madebyaris/advance-minimax-m3-cursor-rules.cursor/rules/cursor-mcp-optimization.mdc · 124 | Cursor rules | styledo-notagent-behaviour | 65/100 | 3 days ago | |
| madebyaris/advance-minimax-m3-cursor-rules.cursor/rules/cursor-tools-mastery.mdc · 124 | Cursor rules | stylemonorepoagent-behaviour | 58/100 | 3 days ago | |
| madebyaris/advance-minimax-m3-cursor-rules.cursor/rules/design-systems.mdc · 124 | Cursor rules | lint-formatstyleuido-not | 77/100 | 3 days ago | |
| madebyaris/advance-minimax-m3-cursor-rules.cursor/rules/fable5-reasoning.mdc · 124 | Cursor rules | style | 58/100 | 3 days ago | |
| madebyaris/advance-minimax-m3-cursor-rules.cursor/rules/devops-infrastructure.mdc · 124 | Cursor rules | stylesecuritydeploymentdo-not | 79/100 | 3 days ago | |
| madebyaris/advance-minimax-m3-cursor-rules.cursor/rules/language-agnostic-patterns.mdc · 124 | Cursor rules | teststylearchtesting-strategy+5 | 58/100 | 3 days ago | |
| madebyaris/advance-minimax-m3-cursor-rules.cursor/rules/minimax-m3-core.mdc · 124 | Cursor rules | buildtestlint-formatstyle+4 | 75/100 | 3 days ago | |
| madebyaris/advance-minimax-m3-cursor-rules.cursor/rules/minimax-m3-self-evolution.mdc · 124 | Cursor rules | styledo-notagent-behaviour | 65/100 | 3 days ago | |
| madebyaris/advance-minimax-m3-cursor-rules.cursor/rules/minimax-m3-status-verification.mdc · 124 | Cursor rules | styletypestesting-strategyapi+1 | 65/100 | 3 days ago | |
| madebyaris/advance-minimax-m3-cursor-rules.cursor/rules/minimax-m3-verification.mdc · 124 | Cursor rules | buildtestlint-formatstyle+3 | 89/100 | 3 days ago | |
| madebyaris/advance-minimax-m3-cursor-rules.cursor/rules/minimax-mcp-tools.mdc · 124 | Cursor rules | styleagent-behaviour | 54/100 | 3 days ago | |
| madebyaris/advance-minimax-m3-cursor-rules.cursor/rules/skill-authoring.mdc · 124 | Cursor rules | stylesecurityapi | 58/100 | 3 days ago | |
| madebyaris/advance-minimax-m3-cursor-rules.cursor/rules/clarify-first-prompting.mdc · 124 | Cursor rules | styledo-not | 61/100 | 3 days ago | |
| madebyaris/advance-minimax-m3-cursor-rules.cursor/rules/fable5-coding-craft.mdc · 124 | Cursor rules | teststylearchtesting-strategy+1 | 58/100 | 3 days ago | |
| madebyaris/advance-minimax-m3-cursor-rules.cursor/rules/model-compatibility.mdc · 124 | Cursor rules | styledeploymentagent-behaviour | 66/100 | 3 days ago | |
| madebyaris/advance-minimax-m3-cursor-rules.cursor/rules/tool-discovery.mdc · 124 | Cursor rules | styletypesdatabaseagent-behaviour | 58/100 | 3 days ago |
Diff against .cursor/rules/3d-graphics.mdc Diff against .cursor/rules/agent-teams.mdc Diff against .cursor/rules/cursor-agent-orchestration.mdc Diff against .cursor/rules/cursor-mcp-optimization.mdc Diff against .cursor/rules/cursor-tools-mastery.mdc Diff against .cursor/rules/design-systems.mdc Diff against .cursor/rules/fable5-reasoning.mdc Diff against .cursor/rules/devops-infrastructure.mdc Diff against .cursor/rules/language-agnostic-patterns.mdc Diff against .cursor/rules/minimax-m3-core.mdc Diff against .cursor/rules/minimax-m3-self-evolution.mdc Diff against .cursor/rules/minimax-m3-status-verification.mdc Diff against .cursor/rules/minimax-m3-verification.mdc Diff against .cursor/rules/minimax-mcp-tools.mdc Diff against .cursor/rules/skill-authoring.mdc Diff against .cursor/rules/clarify-first-prompting.mdc Diff against .cursor/rules/fable5-coding-craft.mdc Diff against .cursor/rules/model-compatibility.mdc Diff against .cursor/rules/tool-discovery.mdc
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago | |
| nerds-odd-e/doughnut.cursor/rules/cli.mdc · 49 | Cursor rules | setupbuildteststyle+4 | 96/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/general.mdc · 13 | Cursor rules | teststyledo-notagent-behaviour+1 | 92/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/guard-git.mdc · 119 | Cursor rules | stylearchgitsecurity+2 | 89/100 | 3 days ago | |
| nerds-odd-e/doughnut.cursor/rules/frontend-testing.mdc · 49 | Cursor rules | buildteststyletesting-strategy+2 | 89/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/organize-workspace.mdc · 119 | Cursor rules | buildstylegitdeployment+2 | 89/100 | 3 days ago |
