react-native-patterns

react-native-patterns is a skill for Claude Code, Codex from spencerpauly/awesome-cursor-skills. It costs 26 tokens per session (828 once invoked), scanned A, original, CC0-1.0.

Guidance for building mobile apps with React Native, a tool for writing phone apps in JavaScript, and Expo, a tool that simplifies React Native projects. It covers navigation, differences between iPhone and Android, speed, and native modules.

In plain words
What is it for?
Use it when starting or structuring a React Native app, adding screen navigation, writing iPhone- or Android-specific code, styling components, or connecting native modules.
Why use it?
It helps you choose a project setup and organize code that behaves correctly on both major mobile platforms. It also explains when Expo is enough and when full native control is needed.

Skill for Claude CodeCodex

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/spencerpauly/awesome-cursor-skills/react-native-patterns
Any agent
npx skills add spencerpauly/awesome-cursor-skills --skill react-native-patterns
Clone the repo
git clone --depth 1 https://github.com/spencerpauly/awesome-cursor-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for react-native-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/spencerpauly/awesome-cursor-skills/react-native-patterns.svg)](https://agentmods.dev/skills/spencerpauly/awesome-cursor-skills/react-native-patterns)
Your own site
<a href="https://agentmods.dev/skills/spencerpauly/awesome-cursor-skills/react-native-patterns"><img src="https://agentmods.dev/badge/skills/spencerpauly/awesome-cursor-skills/react-native-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 828 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.1 $0.00026 $0.00828
Opus 5 $0.00013 $0.00414
Sonnet 5 $0.00005 $0.00166
Haiku 4.5 $0.00003 $0.00083

Measured 6d ago against content hash 15d8e9772f5a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

react-native-patterns 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 6d 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.

resources/react-native-patterns/SKILL.md · 125 lines

How it starts

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

React Native Patterns

Build production-quality mobile apps with React Native and Expo.

Project Setup

Expo (recommended for most projects):

npx create-expo-app@latest my-app
cd my-app
npx expo start

Bare React Native (when you need full native control):

npx @react-native-community/cli init MyApp

Use Expo unless you need a custom native module that Expo doesn't support.

Use expo-router (file-based routing) or @react-navigation/native:

app/
├── _layout.tsx        # Root layout (tabs, stack, drawer)
├── index.tsx          # Home screen
├── (tabs)/
│   ├── _layout.tsx    # Tab navigator
│   ├── home.tsx
│   ├── profile.tsx
│   └── settings.tsx
└── [id].tsx           # Dynamic route

Platform-Specific Code

import { Platform } from 'react-native';

const styles = StyleSheet.create({
  shadow: Platform.select({
    ios: { shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.1 },
    android: { elevation: 4 },
  }),
});

For larger differences, use platform-specific files:

  • Component.ios.tsx
  • Component.android.tsx

Styling

Use StyleSheet.create for performance (styles are sent to native once):

const styles = StyleSheet.create({
  container: { flex: 1, padding: 16 },
  title: { fontSize: 24, fontWeight: '700' },
});

For a Tailwind-like experience, use nativewind:

<View className="flex-1 p-4">
  <Text className="text-2xl font-bold">Hello</Text>
</View>

Performance

FlatList over ScrollView for long lists:

<FlatList
  data={items}
  keyExtractor={(item) => item.id}
  renderItem={({ item }) => <ItemRow item={item} />}
  initialNumToRender={10}
  maxToRenderPerBatch={5}
  windowSize={5}
/>

Memoize expensive components:

const ItemRow = React.memo(({ item }: { item: Item }) => (
  <View><Text>{item.name}</Text></View>
));

Avoid:

  • Inline styles (creates new objects every render)
  • Anonymous functions in renderItem
  • Large images without caching (expo-image handles this)

Read the full file on GitHub · 125 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. 6d ago First seen · 125 lines · 26 tokens per session scan A 15d8e9772f5a

Subscribe to this mod's changes

react-native-patterns is a skill published in the GitHub repository spencerpauly/awesome-cursor-skills (754 stars, last pushed 1mo ago), licensed CC0-1.0. It adds 26 tokens to every session and 828 once invoked, about $0.0001 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-30.

Related

Other skills, from other repositories

agent-spec-mobile-react-native

Agent skill for spec-mobile-react-native - invoke with $agent-spec-mobile-react-native.

ruvnet/ruflo · 22 tokens

vercel-react-native-skills

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

zhukunpenglinyutong/desktop-cc-gui · 57 tokens

react-native-testing

Write tests using React Native Testing Library (RNTL) v13 and v14 (@testing-library/react-native). Use when writing, reviewing, or fixing React Native component tests. Covers: render, screen, queries (getBy/getAllBy/queryBy/findBy), Jest matchers, userEvent, fireEvent, waitFor, and async patterns. Supports v13 (React…

callstack/react-native-testing-library · 134 tokens

expo-native-ui

Framework (OSS). Build beautiful, native-feeling Expo screens. Covers Apple HIG styling, semantic colors, native controls, SF Symbols, media, animations, visual effects, gradients, storage, and responsive layout. For routing and navigation, use the expo-router skill.

expo/skills · 58 tokens

expo-web-to-native

Framework (OSS). Migrate an existing web React app to a native iOS/Android app with Expo. Use when the user wants to turn a website into a mobile app, port a Next.js/Vite/CRA React codebase to React Native, reuse web code on native incrementally, or asks how web idioms (the DOM, CSS, React Router, localStorage…

expo/skills · 111 tokens

truesheet-usage

Consumer-side guide for integrating @lodev09/react-native-true-sheet into a React Native app. Use this skill whenever the user wants to add, configure, control, or debug a bottom sheet using TrueSheet — including ref-based sheets, named global sheets, web support with TrueSheetProvider/useTrueSheet, React Navigation…

lodev09/react-native-true-sheet · 169 tokens