itallstartedwithaidea/agent-skills/react-native-guidelines

Claude Code and agent skill by itallstartedwithaidea/agent-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

React Native Guidelines codifies 16 rules across 7 sections—Performance, Layout, Animation, Images, State, Architecture, and Platform—that prevent the most common pitfalls in cross-platform mobile development.

Install

npx vskill@latest install itallstartedwithaidea/agent-skills/react-native-guidelines

SKILL.md

The same SKILL.md was published earlier as itallstartedwithaidea/claude-googleadsagent/react-native-guidelines.

React Native Guidelines

Part of Agent Skills™ by googleadsagent.ai™

Description

React Native Guidelines codifies 16 rules across 7 sections—Performance, Layout, Animation, Images, State, Architecture, and Platform—that prevent the most common pitfalls in cross-platform mobile development. Each rule addresses a specific failure mode unique to React Native's bridge architecture and native rendering pipeline.

React Native's performance characteristics differ fundamentally from web React. The JavaScript thread, the UI thread, and the native modules thread communicate asynchronously, and bottlenecks in any thread degrade the user experience. These guidelines focus on keeping the JS thread unblocked, using the native driver for animations, optimizing FlatList rendering, and minimizing bridge crossings.

The rules are calibrated for production applications running on both iOS and Android. Platform-specific behaviors, gesture handling differences, and navigation patterns are addressed explicitly rather than treated as edge cases.

Use When

  • Building new React Native screens or components
  • Debugging performance issues on iOS or Android
  • Reviewing React Native code for cross-platform correctness
  • Implementing animations or gesture interactions
  • Optimizing list rendering for large datasets
  • Handling platform-specific behavior differences

How It Works

mermaid
graph TD
A[React Native Code] --> B{Section Analysis}
B --> C[Performance: JS Thread Budget]
B --> D[Layout: Flexbox + Safe Areas]
B --> E[Animation: Native Driver]
B --> F[Images: Caching + Sizing]
B --> G[State: Minimal Re-renders]
B --> H[Architecture: Navigation + Deep Links]
B --> I[Platform: iOS/Android Specifics]
C --> J[Optimized Output]
D --> J
E --> J
F --> J
G --> J
H --> J
I --> J

Each section contains 2-3 focused rules targeting the highest-impact issues in that category. Rules are applied during code generation and flagged during review.

Implementation

Performance: Optimize FlatList
tsx
// BAD: Re-creates renderItem on every render
<FlatList
data={items}
renderItem={({ item }) => <Card item={item} />}
/>
// GOOD: Stable renderItem + keyExtractor + windowing config
const renderItem = useCallback(
({ item }: { item: Item }) => <Card item={item} />,
[]
);
<FlatList
data={items}
renderItem={renderItem}
keyExtractor={item => item.id}
getItemLayout={(_, index) => ({
length: CARD_HEIGHT,
offset: CARD_HEIGHT * index,
index,
})}
maxToRenderPerBatch={10}
windowSize={5}
removeClippedSubviews
/>
Animation: Use Native Driver
tsx
// BAD: JS-driven animation blocks the thread
Animated.timing(opacity, {
toValue: 1,
duration: 300,
useNativeDriver: false,
}).start();
// GOOD: Native driver runs on UI thread
Animated.timing(opacity, {
toValue: 1,
duration: 300,
useNativeDriver: true,
}).start();
// BEST: Reanimated for gesture-driven animations
const animatedStyle = useAnimatedStyle(() => ({
transform: [{ translateX: withSpring(offset.value) }],
}));
Platform: Safe Area Handling
tsx
import { useSafeAreaInsets } from "react-native-safe-area-context";
function Screen({ children }: PropsWithChildren) {
const insets = useSafeAreaInsets();
return (
<View style={{ paddingTop: insets.top, paddingBottom: insets.bottom }}>
{children}
</View>
);
}

Best Practices

  • Profile with Flipper or React DevTools before optimizing—measure, do not guess
  • Keep the JS thread under 16ms per frame for 60fps rendering
  • Use useNativeDriver: true for all opacity and transform animations
  • Avoid inline styles in list items—use StyleSheet.create for static styles
  • Handle both iOS and Android safe areas, notches, and gesture navigation
  • Test on real devices, not just simulators—performance differs significantly

Platform Compatibility

PlatformSupportNotes
CursorFullReact Native project support
VS CodeFullReact Native Tools extension
WindsurfFullMobile development support
Claude CodeFullCode generation + review
ClineFullReact Native aware
aiderPartialLimited mobile context

Related Skills

Keywords

react-native mobile performance flatlist native-driver animation safe-area cross-platform ios android


© 2026 googleadsagent.ai™ | Agent Skills™ | MIT License

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/itallstartedwithaidea/agent-skills/react-native-guidelines/badge)](https://verified-skill.com/skills/itallstartedwithaidea/agent-skills/react-native-guidelines)

Something wrong with this skill or its page? Tell us.