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.
npx agentmods add rules/nedcodes-ok/cursorrules-collection/react-nativegit clone --depth 1 https://github.com/nedcodes-ok/cursorrules-collectionWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00665 | $0.00665 |
| Opus 5 | $0.00332 | $0.00332 |
| Sonnet 5 | $0.00133 | $0.00133 |
| Haiku 4.5 | $0.00067 | $0.00067 |
Grade A, and why
react-native 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 yesterday.
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.
Copies of this mod
1 near-identical copy found in the catalogue:
- react-native — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.
React Native Cursor Rules
You are an expert React Native developer. Follow these rules:
Components
- Functional components only with TypeScript
- Use
View,Text,Pressablefrom react-native, not HTML elements - Never use
TouchableOpacityorTouchableHighlight, usePressableinstead - Wrap all visible text in
<Text>components, bare strings crash on Android - Platform-specific files:
Component.ios.tsx/Component.android.tsxwhen needed - Keep components under 150 lines, extract custom hooks for logic
Styling
- Use
StyleSheet.create()for all styles, not inline objects - Never use percentage-based dimensions for critical layouts, use
DimensionsoruseWindowDimensions - Use
flexfor layouts, not absolute positioning unless truly necessary - Platform-specific styles via
Platform.select()orPlatform.OSchecks - Avoid magic numbers, define spacing/sizing constants
- Use
gapproperty for spacing between flex children (RN 0.71+)
Navigation
- React Navigation is the standard. Use typed navigation with
NativeStackNavigationProp - Define a root param list type and use it everywhere
- Use
useNavigationanduseRoutehooks, not prop drilling - Deep linking: define linking config at the navigator level
- Keep screen components thin, extract business logic into hooks
Performance
- Use
FlatListfor lists, neverScrollViewwith.map()for dynamic data - Always provide
keyExtractorreturning a stable string ID - Memoize list items with
React.memoand extractrenderItemoutside the component - Use
useCallbackfor event handlers passed to list items - Avoid anonymous functions in
renderItem - Images: use
FastImage(orexpo-image) for caching, specify dimensions - Minimize bridge crossings: batch state updates, avoid rapid
setStatein loops
State and Data
- Use React Query / TanStack Query for server state
- Zustand or Jotai for global client state, avoid Redux unless already in the project
- AsyncStorage for small key-value persistence, MMKV for performance-critical storage
- Never store sensitive data in AsyncStorage, use
expo-secure-storeor Keychain
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.
- yesterday First seen · 61 lines · 665 tokens per session scan A 2125708da5f6
react-native is a cursor rule published in the GitHub repository nedcodes-ok/cursorrules-collection (37 stars, last pushed 6mo ago), licensed MIT. It adds 665 tokens to every session, about $0.0033 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.
Other cursor rules, from other repositories
10-feature-development
Feature implementation workflow and engineering mindset.
11-template-conventions
Reusable building blocks shipped with this template - use them instead of writing new ones.
12-new-project
Workflow for starting a new app from this template - rebranding, identity, cleanup and first feature.
13-updating-project
Workflow for updating an existing project - dependency and SDK upgrades, migrations, refactors, bug fixes.
01-tech-stack
Android tech stack and project standards.
02-architecture
Architecture rules - MVVM baseline, MVI for complex features.