Skip to content
Skill

Adaptive layout

Lays React Native screens out by window size, with panes, grids and readable widths

Adaptive layout is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
JavaScript, TypeScript
Platforms
Claude Code, Codex, Cursor
GitHub stars
16
Last commit
License
MIT
Listing updated

Similar skills

About Adaptive layout

This skill guides an agent to build React Native screens that adapt to the size of the app window rather than the device type. It centres on a single window classifier, breakpoints kept in one module, a readable-width cap on wide windows, and a list-detail layout that shows two panes only when both fit in the space the panes actually receive.

The workflow covers copying a pane kit with its tests, configuring the app for tablets and orientation, routing list selection through the URL, measuring grid containers before choosing column counts, and reviewing orientation locks. A bundled zero-dependency checker script scans the project for the layout rules and reports failing lines with file, rule and suggested fix.

It expects a React Native app with Expo Router, Jest for tests and TypeScript or JavaScript sources. Test cases are written against a table of window sizes at two font scales, and the skill points to other skills for the shared hooks, theme and device-run commands.

When your agent uses it

Lays screens out by window, not device: breakpoints, master-detail panes, readable widths, grids. Use when making screens responsive or for tablets, iPad, foldables, rotation, split screen, orientation lock. Not for tab bars (navigation-and-routing).

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 45 files (344 KB) on GitHub on 5 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the react-native plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add zakariaf/ReactNative-Skills
/plugin install react-native@react-native-skills

Or copy only this skill to ~/.claude/skills/adaptive-layout:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/adaptive-layout &&
cp -R "$tmp/skills/adaptive-layout" ~/.claude/skills/adaptive-layout &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/adaptive-layout inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/adaptive-layout to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/adaptive-layout &&
cp -R "$tmp/skills/adaptive-layout" ~/.agents/skills/adaptive-layout &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/adaptive-layout inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/adaptive-layout to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/adaptive-layout &&
cp -R "$tmp/skills/adaptive-layout" ~/.cursor/skills/adaptive-layout &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/adaptive-layout inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/zakariaf/ReactNative-Skills.git --path skills/adaptive-layout

Or copy the folder to ~/.gemini/skills/adaptive-layout yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/adaptive-layout:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/adaptive-layout &&
cp -R "$tmp/skills/adaptive-layout" ~/.copilot/skills/adaptive-layout &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/adaptive-layout inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git

Then copy ReactNative-Skills/skills/adaptive-layout into your agent's skills folder as adaptive-layout. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Window-based layout decisions
Chooses layouts from the window's width and shape instead of device type or orientation APIs.
Two-pane list and detail
Shows a list beside its detail on regular windows, with selection stored in the route.
Readable width caps
Limits content width on wide screens and lists the few full-bleed screens that opt out.
Measured grid columns
Derives grid column counts from the container's own measured width and remounts on change.
Orientation and resize settings
Reviews app config to keep orientation unlocked and tablet support enabled.
Adaptive layout checker
Runs a dependency-free script that flags breakpoint, width and orientation rule violations.

Good for

  • Make a settings screen work on iPad split view and phones
  • Add a master-detail layout for a task list on tablets
  • Build a responsive photo grid that adjusts columns to its container
  • Check a React Native project for hardcoded tablet breakpoints
  • Review whether the app config blocks rotation or resizing

Adaptive layout FAQ

What does the skill need to be present in the app?

It expects a React Native app with Expo Router and Jest. It copies a pane kit and a contract file into the project and relies on a window classifier hook from another skill.

Does Adaptive layout change how the app decides between phone and tablet layouts?

Layouts are chosen from the window's width and shape via useWindowClass and measured containers. Device-type checks such as Platform.isPad are treated as violations.

How is the layout verified?

Layout functions get window-table tests at font scales 1 and 2, and a checker script prints PASS or FAIL lines for each rule.

Does Adaptive layout cover app orientation settings?

Yes. It reviews the app config for portrait or default orientation, tablet support, and removal of full-screen or resizing opt-outs, and it requires per-screen locks to be recorded with reasons.

How do I install Adaptive layout in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/adaptive-layout to use it in all your projects, or to .claude/skills/adaptive-layout in one project. Or install the react-native plugin, which includes it: /plugin marketplace add zakariaf/ReactNative-Skills, then /plugin install react-native@react-native-skills.

Does Adaptive layout run scripts?

Yes. It runs JavaScript and TypeScript scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Adaptive layout?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Adaptive layout?

The closest alternatives to Adaptive layout are Architecture and boundaries, Accessibility as code, Expo UI, Flutter build responsive layout and Expo native UI.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from zakariaf/ReactNative-Skills

  1. Turns canvas taps, swipes and drags into typed intents hit-tested on the drawn layout

    • Open source
    • 16 GitHub stars
    • Developer tools
  2. Adds a gated debug menu, debug deep link and simulated clock and offline mode to React

    • Open source
    • 16 GitHub stars
    • Developer tools
  3. Checks React Native code for accessibility labels, touch targets, text scaling

    • Open source
    • 16 GitHub stars
    • Developer tools
  4. Sells a one-time Premium unlock through the App Store and Google Play

    • Open source
    • 16 GitHub stars
    • Finance and payments
  5. Walks an Expo app through an SDK, Xcode or Android toolchain upgrade in one commit

    • Open source
    • 16 GitHub stars
    • Developer tools
  6. Builds React Native forms with one valibot schema, catalog-key errors and keyboard-aware

    • Open source
    • 16 GitHub stars
    • Developer tools