rn-styling

A set of styling rules for React Native and Expo components, covering layouts, safe areas, dark mode, responsive screens, images, and long lists.

In plain words
What is it for?
Use it when choosing between NativeWind and StyleSheet, setting up design tokens, styling screens, handling dark mode, or optimizing images and lists.
Why use it?
It helps avoid platform-specific layout mistakes and inconsistent styling, such as forgetting that React Native stacks items vertically by default or ignoring screen cutouts.

Skill for Claude CodeCodex

Part of the dev-flow plugin — 45 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/lukedj78/dev-flow/rn-styling
Any agent
npx skills add lukedj78/dev-flow --skill rn-styling
Clone the repo
git clone --depth 1 https://github.com/lukedj78/dev-flow

Made for: Claude Code, Codex.

Or install dev-flow, the plugin that ships this one along with the rest of its 45 skills.

Per session 195 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,125 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00195 $0.01125
Opus 5 $0.00097 $0.00562
Sonnet 5 $0.00039 $0.00225
Haiku 4.5 $0.00019 $0.00112

Measured 2d ago against content hash 08efdbc8f303, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rn-styling scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

rn-styling/SKILL.md · 47 lines

How it starts

The opening of the file, as written. The whole thing — 47 lines — stays where its author put it; the contents beside it link to each section on GitHub.

rn-styling — guardrail for styling in React Native + Expo

The 5 rules (non-negotiable)

  1. NativeWind v4 is the default. StyleSheet only for performance-critical paths (per-frame animations etc.).
  2. No magic numbers. Every spacing/color/radius/font value comes from tailwind.config.js (which mirrors the project's DESIGN.md tokens).
  3. SafeArea mandatory on every root screen. Use SafeAreaView from react-native-safe-area-context (NOT the one from react-native).
  4. Dark mode via useColorScheme + Tailwind dark: variant. Never Appearance.getColorScheme() at module top-level.
  5. Optimized primitives: expo-image instead of Image; @shopify/flash-list for any list > 20 items.

Quick decision tree

  • "Should I style this with NativeWind or StyleSheet?" → references/decision-tree.md
  • "How do I set up NativeWind v4 from scratch?" → references/nativewind-setup.md
  • "Why does Flexbox behave differently than on the web?" → references/concepts.md
  • "What are the common patterns and anti-patterns?" → references/patterns.md
  • "Show me a real example" → references/examples/
  • "I need this screen to feel native, not just look styled" (grouped settings, native toggle/picker/slider, real bottom sheet) → this isn't a styling question, it's references/expo-ui.md (@expo/ui) — real SwiftUI/Jetpack Compose components, not RN primitives.

NativeWind vs @expo/ui — two different tools

  • NativeWind (this skill's default) styles RN's own primitives (View, Text, …) with utility classes. It changes how things look.
  • @expo/ui (see references/expo-ui.md; import paths verified against @expo/[email protected]) renders actual native components — SwiftUI on iOS, Jetpack Compose on Android — not styled primitives. Reach for it when a screen needs to genuinely behave like a native settings/picker/sheet screen, not when it just needs the right colors and spacing.
  • They compose: an @expo/ui tree can sit inside a NativeWind-styled screen. Don't use @expo/ui as a general-purpose styling system, and don't expect NativeWind classes to apply inside its native components.

Read the full file on GitHub · 47 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 47 lines · 195 tokens per session scan A 08efdbc8f303

Subscribe to this mod's changes

rn-styling is a skill published in the GitHub repository lukedj78/dev-flow (5 stars, last pushed 5d ago), licensed MIT. It adds 195 tokens to every session and 1,125 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

uniwind

Uniwind — Tailwind CSS v4 styling for React Native. Use when adding, building, or debugging components in a React Native project that uses Uniwind classNames. Covers setup, Metro config, global.css, theming, className props, accent- color props, platform/data/state/responsive variants, CSS variables, custom utilities…

uni-stack/uniwind · 130 tokens

setup-react-native-storybook

Set up Storybook for React Native in Expo, React Native CLI, or Re.Pack projects. Use when adding Storybook to a project, configuring metro.config.js with withStorybook, creating .rnstorybook configuration files, setting up Storybook routes in Expo Router, configuring getStorybookUI, or adding the StorybookPlugin to a…

storybookjs/react-native · 102 tokens

upgrading-react-native-storybook

Incrementally upgrade React Native Storybook across the supported migration paths. Use when upgrading @storybook/react-native projects from 5.3.x to 6.5.x, 6.5.x to 7.6.x, 7.6.x to 8.3.x, 8.x to 9.x, or 9.x to 10.x. Detect the currently installed Storybook version, choose only the next migration step, update…

storybookjs/react-native · 151 tokens

platform-specialist

Doc-driven platform integration expert. Converts a web app to LINE MINI App (LIFF SDK), PWA (Next.js 16), and Capacitor (iOS/Android). Expo & Tauri are secondary/legacy. ปรัชญาหลัก: ดึง docs จริงล่าสุดก่อนเขียนโค้ดเสมอ — ไม่ freeze snippet ที่จะ rot. Triggers: "LINE MINI App", "LIFF", "LINE OA", "convert to app"…

wasintoh/toh-framework · 161 tokens

wire-sdk

앱인토스 SDK(권한·저장소·공유·Safe Area 등)를 화면에 붙인다.

TOKTOKHAN-DEV/agent-company · 2 tokens

migrate-nativewind-to-uniwind

Migrate a React Native project from NativeWind to Uniwind. Use when the user wants to replace NativeWind with Uniwind, upgrade from NativeWind, switch to Uniwind, or mentions NativeWind-to-Uniwind migration. Handles package removal, config migration, Tailwind 4 upgrade, cssInterop removal, theme conversion, and all…

uni-stack/uniwind · 82 tokens