Squire vercel-react-native-skills
git clone https://github.com/eddiebelaval/squire
T=$(mktemp -d) && git clone --depth=1 https://github.com/eddiebelaval/squire "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/vercel-react-native-skills" ~/.claude/skills/eddiebelaval-squire-vercel-react-native-skills && rm -rf "$T"
skills/vercel-react-native-skills/SKILL.mdname: vercel-react-native-skills description: 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. license: MIT metadata: author: vercel version: '1.0.0' slug: vercel-react-native-skills category: operations complexity: complex version: "1.0.0" author: "id8Labs" triggers:
- "vercel-react-native-skills"
- "vercel react native skills" tags:
- development
- tool-factory-retrofitted---
React Native Skills
Core Workflows
Workflow 1: Primary Action
- Analyze the input and context
- Validate prerequisites are met
- Execute the core operation
- Verify the output meets expectations
- Report results
Comprehensive best practices for React Native and Expo applications. Contains rules across multiple categories covering performance, animations, UI patterns, and platform-specific optimizations.
When to Apply
Reference these guidelines when:
- Building React Native or Expo apps
- Optimizing list and scroll performance
- Implementing animations with Reanimated
- Working with images and media
- Configuring native modules or fonts
- Structuring monorepo projects with native dependencies
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | List Performance | CRITICAL | |
| 2 | Animation | HIGH | |
| 3 | Navigation | HIGH | |
| 4 | UI Patterns | HIGH | |
| 5 | State Management | MEDIUM | |
| 6 | Rendering | MEDIUM | |
| 7 | Monorepo | MEDIUM | |
| 8 | Configuration | LOW | , |
Quick Reference
1. List Performance (CRITICAL)
- Use FlashList for large listslist-performance-virtualize
- Memoize list item componentslist-performance-item-memo
- Stabilize callback referenceslist-performance-callbacks
- Avoid inline style objectslist-performance-inline-objects
- Extract functions outside renderlist-performance-function-references
- Optimize images in listslist-performance-images
- Move expensive work outside itemslist-performance-item-expensive
- Use item types for heterogeneous listslist-performance-item-types
2. Animation (HIGH)
- Animate only transform and opacityanimation-gpu-properties
- Use useDerivedValue for computed animationsanimation-derived-value
- Use Gesture.Tap instead of Pressableanimation-gesture-detector-press
3. Navigation (HIGH)
- Use native stack and native tabs over JS navigatorsnavigation-native-navigators
4. UI Patterns (HIGH)
- Use expo-image for all imagesui-expo-image
- Use Galeria for image lightboxesui-image-gallery
- Use Pressable over TouchableOpacityui-pressable
- Handle safe areas in ScrollViewsui-safe-area-scroll
- Use contentInset for headersui-scrollview-content-inset
- Use native context menusui-menus
- Use native modals when possibleui-native-modals
- Use onLayout, not measure()ui-measure-views
- Use StyleSheet.create or Nativewindui-styling
5. State Management (MEDIUM)
- Minimize state subscriptionsreact-state-minimize
- Use dispatcher pattern for callbacksreact-state-dispatcher
- Show fallback on first renderreact-state-fallback
- Destructure for React Compilerreact-compiler-destructure-functions
- Handle shared values with compilerreact-compiler-reanimated-shared-values
6. Rendering (MEDIUM)
- Wrap text in Text componentsrendering-text-in-text-component
- Avoid falsy && for conditional renderingrendering-no-falsy-and
7. Monorepo (MEDIUM)
- Keep native dependencies in app packagemonorepo-native-deps-in-app
- Use single versions across packagesmonorepo-single-dependency-versions
8. Configuration (LOW)
- Use config plugins for custom fontsfonts-config-plugin
- Organize design system importsimports-design-system-folder
- Hoist Intl object creationjs-hoist-intl
How to Use
Read individual rule files for detailed explanations and code examples:
rules/list-performance-virtualize.md rules/animation-gpu-properties.md
Each rule file contains:
- Brief explanation of why it matters
- Incorrect code example with explanation
- Correct code example with explanation
- Additional context and references
Full Compiled Document
For the complete guide with all rules expanded:
AGENTS.md