muratcakmak/expo-skills/expo-device-matrix
Claude Code and agent skill by muratcakmak/expo-skills
- community
Checking that the SKILL.md file is still in the repository.
Use when building or reviewing Expo / React Native screens that must run across iPhone, iPad, Android phones, and Android tablets — adaptive layouts, tablet support, iPad Split View / Stage Manager, master-detail panes, sidebar vs tab bar, iOS 18 vs iOS 26 differences, orientation handling, foldables, or when a layout works on phone but breaks or just stretches on iPad/tablet.
Install
npx vskill@latest install muratcakmak/expo-skills/expo-device-matrixSKILL.md
The same SKILL.md was published earlier as muratcakmak/expo-skills/expo-device-matrix.
Taming the Device Matrix in Expo Apps
iPhone × iPad × Android phone × Android tablet × iOS 18 × iOS 26 looks like a dozen configurations. It isn't. It's four orthogonal capability axes, each resolved in exactly one place. Code that branches per-device multiplies; code that consumes capabilities doesn't.
The Four Axes
| Axis | Decides | Resolved by | Never by | |
|---|---|---|---|---|
| Window size class | Layout: pane count, sidebar width, grid columns | Styling-engine breakpoints (layout) / useWindowDimensions (behavior) | Device type. Platform.isPad / Device.deviceType is wrong by construction: an iPad in ⅓ Split View is phone-width | |
| Design language | Glass vs blur chrome, Material on Android | isLiquidGlassAvailable() (respects build + opt-out, unlike version sniffing) | parseInt(Platform.Version) | |
| Navigation idiom | Tab bar (compact) vs sidebar / two-pane (regular); predictive back on Android | Size class, from the profile module | Hardcoding per platform | |
| Input capabilities | Hover states, pointer targets, keyboard shortcuts, right-click menus | iPad = assume pointer + hardware keyboard possible: add onHoverIn/Out, keyboard shortcuts; Android tablets similar | Assuming touch-only anywhere wider than a phone |
The One-Module Rule
All JS-side capability reads live in one useDeviceProfile() module. Components consume the profile; they never call Platform.OS, Platform.isPad, Dimensions, or useWindowDimensions directly (platform-split .ios.tsx/.android.tsx files excepted). Full implementation: references/patterns.md.
Layout vs behavior — the split that keeps it fast:
- Layout (spacing, direction, columns, visibility of decorative elements) → the styling engine. Uniwind project: breakpoint variants (
flex-col lg:flex-row), resolved natively via Nitro, zero JS re-renders on rotate/resize → references/uniwind.md. Bare StyleSheet project:useWindowDimensions-derived styles are the fallback. - Behavior (which component tree mounts: sidebar vs tabs, one pane vs two, push vs inline selection) →
useDeviceProfile()in JS. This is unavoidable JS and belongs there.
Breakpoint Parity (critical)
The JS regular-width threshold and the CSS breakpoint must be the same number. If Uniwind flips lg: at 1024 while your JS flips panes at 700, there's a 324px window where styling says tablet and behavior says phone — visible as half-adapted UI while dragging Split View. One source of truth:
CSS side pins the same value (--breakpoint-md: 768px, or a custom tablet: breakpoint). Reference the constant in useDeviceProfile(); document the pairing in both files.
App Config Requirements (before any code)
| Config | Why | |
|---|---|---|
ios.supportsTablet: true | Without it, iPad runs the app letterboxed in iPhone compatibility mode — none of this matters | |
Orientation unlocked on tablets ("orientation": "default", or justify the lock) | App Store review rejects iPad apps that break in required orientations; Android tablets are landscape-first | |
Android: don't set resizeableActivity: false; test multi-window | Large-screen guidelines; split-screen is the Android Split View |
Canonical Test Matrix (pairwise — 5 configs cover every axis pair)
- Small iPhone, iOS 18 — smallest compact width, no glass, classic chrome
- iPhone Pro, iOS 26 — glass chrome, Dynamic Island insets
- iPad, iPadOS 26 — full screen, then drag through Split View ½ → ⅓: must collapse regular→compact live with state preserved. This one config tests both size classes, the transition, and glass
- Android phone — Material chrome, predictive back
- Android tablet or foldable — regular width + multi-window; unfold = live compact→regular transition
Test every config in dark mode and max font scale — fixed-width panes truncate there first.
Pitfalls
| Symptom | Cause → Fix | |
|---|---|---|
| Layout correct on launch, wrong after rotate / Split View drag | Module-scope const { width } = Dimensions.get('window') — evaluated once → useWindowDimensions (behavior) or breakpoint variants (layout) | |
| iPad shows tablet styling but phone behavior (or vice versa) mid-drag | Breakpoint parity violation → one shared constant (above) | |
| Tablet layout on iPad breaks at ⅓ Split View | Decided by isPad instead of window width → size class from window dimensions | |
| Selected item lost when Split View collapses to compact | Two-pane inline selection not promoted to a pushed route on regular→compact → see master-detail recipe in patterns.md | |
| App letterboxed on iPad | Missing ios.supportsTablet | |
| iOS 26 chrome branch taken on iOS 18 (or opt-out builds) | Version sniffing → isLiquidGlassAvailable(); glass work → defer to the expo-liquid-glass skill | |
| Uniwind app re-renders every screen on rotate | Width logic in JS that should be breakpoint variants → references/uniwind.md | |
| Hover/right-click dead on iPad | Input axis ignored → onHoverIn/Out on pressables, keyboard shortcuts for primary actions |
Companions
- expo-device-audit — code-level review against these rules: mechanical checks via
audit.sh(wired to aStophook that runs on changed files automatically) plus a judgment pass. - expo-device-verify — pixel-level proof: drives the app on the canonical configs with Argent, screenshots each state, and reports per config. Rules say it should adapt; verify shows it does.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/expo-device-matrix/skills/expo-device-matrix/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/muratcakmak/expo-skills/expo-device-matrix)