muratcakmak/expo-skills/expo-device-matrix

Claude Code and agent skill by muratcakmak/expo-skills

Trust tier 3
  • community
Source check pending

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-matrix

SKILL.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

AxisDecidesResolved byNever by
Window size classLayout: pane count, sidebar width, grid columnsStyling-engine breakpoints (layout) / useWindowDimensions (behavior)Device type. Platform.isPad / Device.deviceType is wrong by construction: an iPad in ⅓ Split View is phone-width
Design languageGlass vs blur chrome, Material on AndroidisLiquidGlassAvailable() (respects build + opt-out, unlike version sniffing)parseInt(Platform.Version)
Navigation idiomTab bar (compact) vs sidebar / two-pane (regular); predictive back on AndroidSize class, from the profile moduleHardcoding per platform
Input capabilitiesHover states, pointer targets, keyboard shortcuts, right-click menusiPad = assume pointer + hardware keyboard possible: add onHoverIn/Out, keyboard shortcuts; Android tablets similarAssuming 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:

ts
// theme/breakpoints.ts — the only place this number exists
export const REGULAR_WIDTH = 768; // must equal the CSS breakpoint used for structure (md)

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)

ConfigWhy
ios.supportsTablet: trueWithout 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-windowLarge-screen guidelines; split-screen is the Android Split View

Canonical Test Matrix (pairwise — 5 configs cover every axis pair)

  1. Small iPhone, iOS 18 — smallest compact width, no glass, classic chrome
  2. iPhone Pro, iOS 26 — glass chrome, Dynamic Island insets
  3. 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
  4. Android phone — Material chrome, predictive back
  5. 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

SymptomCause → Fix
Layout correct on launch, wrong after rotate / Split View dragModule-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-dragBreakpoint parity violation → one shared constant (above)
Tablet layout on iPad breaks at ⅓ Split ViewDecided by isPad instead of window width → size class from window dimensions
Selected item lost when Split View collapses to compactTwo-pane inline selection not promoted to a pushed route on regular→compact → see master-detail recipe in patterns.md
App letterboxed on iPadMissing 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 rotateWidth logic in JS that should be breakpoint variants → references/uniwind.md
Hover/right-click dead on iPadInput 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 a Stop hook 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/muratcakmak/expo-skills/expo-device-matrix/badge)](https://verified-skill.com/skills/muratcakmak/expo-skills/expo-device-matrix)

Something wrong with this skill or its page? Tell us.