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/cursor-doctor/react-nativegit clone --depth 1 https://github.com/nedcodes-ok/cursor-doctorWhat 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.
This is a copy
100% identical to react-native — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
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/cursor-doctor (9 stars, last pushed 5mo 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. It is 100% identical to react-native, differing in 0 lines, and is treated as a copy.
Other cursor rules, from other repositories
tailwind-css
Tailwind CSS: utility patterns, design tokens, component extraction.
react-native
React Native: mobile app development, navigation, native modules.
expo
Expo/React Native: native modules, navigation, platform-specific code.
kotlin
Kotlin: coroutines, null safety, idiomatic patterns.
flutter
Flutter: Riverpod, widget extraction, Dart 3.
swift
Swift patterns: SwiftUI, actors, async/await, value types.