react-native-skills
React Native and Expo best practices for building performant mobile apps, from Vercel Engineering. Use when writing or reviewing React Native or Expo components, tuning list and scroll performance, building animations with Reanimated, handling images, safe areas, navigation, fonts or native modules, or structuring a monorepo with native dependencies. Applies to React Native code only, even if the user does not say "mobile". For web React performance use react-best-practices.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- react-native-skills
- license
- MIT
- metadata
- { "author": "vercel", "upstream": "https://github.com/vercel-labs/agent-skills/tree/main/skills/react-native-skills" }
- description
- React Native and Expo best practices for building performant mobile apps, from Vercel Engineering. Use when writing or reviewing React Native or Expo components, tuning list and scroll performance, building animations with Reanimated, handling images, safe areas, navigation, fonts or native modules, or structuring a monorepo with native dependencies. Applies to React Native code only, even if the user does not say "mobile". For web React performance use react-best-practices.
02 资源文件 38
- 许可证LICENSE.txt2.2 KB
- 参考文档rules/_sections.md2.2 KB
- 参考文档rules/animation-derived-value.md1.3 KB
- 参考文档rules/animation-gesture-detector-press.md2.5 KB
- 参考文档rules/animation-gpu-properties.md2.0 KB
- 参考文档rules/design-system-compound-components.md1.6 KB
- 参考文档rules/fonts-config-plugin.md1.4 KB
- 参考文档rules/imports-design-system-folder.md1.4 KB
- 参考文档rules/js-hoist-intl.md1.6 KB
- 参考文档rules/list-performance-callbacks.md1.0 KB
- 参考文档rules/list-performance-function-references.md4.0 KB
- 参考文档rules/list-performance-images.md1.4 KB
- 参考文档rules/list-performance-inline-objects.md2.3 KB
- 参考文档rules/list-performance-item-expensive.md2.4 KB
- 参考文档rules/list-performance-item-memo.md2.2 KB
- 参考文档rules/list-performance-item-types.md2.7 KB
- 参考文档rules/list-performance-virtualize.md1.7 KB
- 参考文档rules/monorepo-native-deps-in-app.md1.1 KB
- 参考文档rules/monorepo-single-dependency-versions.md1.3 KB
- 参考文档rules/navigation-native-navigators.md4.8 KB
- 参考文档rules/react-compiler-destructure-functions.md1.2 KB
- 参考文档rules/react-compiler-reanimated-shared-values.md1.2 KB
- 参考文档rules/react-state-dispatcher.md2.2 KB
- 参考文档rules/react-state-fallback.md1.7 KB
- 参考文档rules/react-state-minimize.md1.7 KB
- 参考文档rules/rendering-no-falsy-and.md1.8 KB
- 参考文档rules/rendering-text-in-text-component.md697 B
- 参考文档rules/scroll-position-no-state.md1.9 KB
- 参考文档rules/state-ground-truth.md2.1 KB
- 参考文档rules/ui-expo-image.md1.6 KB
- 参考文档rules/ui-image-gallery.md2.5 KB
- 参考文档rules/ui-measure-views.md2.2 KB
- 参考文档rules/ui-menus.md4.5 KB
- 参考文档rules/ui-native-modals.md1.8 KB
- 参考文档rules/ui-pressable.md1.5 KB
- 参考文档rules/ui-safe-area-scroll.md1.5 KB
- 参考文档rules/ui-scrollview-content-inset.md1.3 KB
- 参考文档rules/ui-styling.md2.2 KB
03 SKILL.md 正文
React Native Skills
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 | list-performance- |
| 2 | Animation | HIGH | animation- |
| 3 | Navigation | HIGH | navigation- |
| 4 | UI Patterns | HIGH | ui- |
| 5 | State Management | MEDIUM | react-state- |
| 6 | Rendering | MEDIUM | rendering- |
| 7 | Monorepo | MEDIUM | monorepo- |
| 8 | Configuration | LOW | fonts-, imports- |
Quick Reference
1. List Performance (CRITICAL)
list-performance-virtualize- Use FlashList for large listslist-performance-item-memo- Memoize list item componentslist-performance-callbacks- Stabilize callback referenceslist-performance-inline-objects- Avoid inline style objectslist-performance-function-references- Extract functions outside renderlist-performance-images- Optimize images in listslist-performance-item-expensive- Move expensive work outside itemslist-performance-item-types- Use item types for heterogeneous lists
2. Animation (HIGH)
animation-gpu-properties- Animate only transform and opacityanimation-derived-value- Use useDerivedValue for computed animationsanimation-gesture-detector-press- Use Gesture.Tap instead of Pressable
3. Navigation (HIGH)
navigation-native-navigators- Use native stack and native tabs over JS navigators
4. UI Patterns (HIGH)
ui-expo-image- Use expo-image for all imagesui-image-gallery- Use Galeria for image lightboxesui-pressable- Use Pressable over TouchableOpacityui-safe-area-scroll- Handle safe areas in ScrollViewsui-scrollview-content-inset- Use contentInset for headersui-menus- Use native context menusui-native-modals- Use native modals when possibleui-measure-views- Use onLayout, not measure()ui-styling- Use StyleSheet.create or Nativewind
5. State Management (MEDIUM)
react-state-minimize- Minimize state subscriptionsreact-state-dispatcher- Use dispatcher pattern for callbacksreact-state-fallback- Show fallback on first renderreact-compiler-destructure-functions- Destructure for React Compilerreact-compiler-reanimated-shared-values- Handle shared values with compiler
6. Rendering (MEDIUM)
rendering-text-in-text-component- Wrap text in Text componentsrendering-no-falsy-and- Avoid falsy && for conditional rendering
7. Monorepo (MEDIUM)
monorepo-native-deps-in-app- Keep native dependencies in app packagemonorepo-single-dependency-versions- Use single versions across packages
8. Configuration (LOW)
fonts-config-plugin- Use config plugins for custom fontsimports-design-system-folder- Organize design system importsjs-hoist-intl- Hoist Intl object creation
How to Use
Read the rule files that match the task. Open only the rules that match the task:
${CLAUDE_SKILL_DIR}/rules/list-performance-virtualize.md
${CLAUDE_SKILL_DIR}/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
04 同仓库更多 Skills
web-design-guidelines
Reviews UI source code against Vercel's Web Interface Guidelines, fetched fresh at review time - accessibility attributes, focus states, forms, animation, typography, images, performance, navigation and URL state, touch, dark mode, i18n, hydration safety and common anti-patterns. Use when asked to review, audit or lint the code of a component, page or stylesheet for UI quality, "check my UI against best practices", "review this form", or "audit this markup", even if the user does not name the guidelines. Reads files and reports findings as file:line. Not for judging a screenshot or a running page (use ux-review), not for a WCAG conformance audit of a live site (use the accessibility plugin), and not for choosing a visual direction (use frontend-design).
ux-review
Judges an existing design for usability, accessibility and visual craft, and says what to change. Use when asked to review or critique a UI, screenshot, mockup, prototype, flow or component, to "roast" or grade a design, to explain why a page looks generic or AI-made, to check contrast, keyboard or reading-order risks from a design, or to answer whether a screen works for its user. Gives a readiness verdict and a ranked list of fixes with concrete values (label text, px size, hex). Judges what is shown; it does not build new UI (use frontend-design), review framework source line by line (use web-design-guidelines), or run live-page accessibility tests (use the accessibility plugin). To render the page in a real browser and make the fixes, use the ui-ux agent.
react-best-practices
React and Next.js performance rules from Vercel Engineering, ranked by impact. Use when writing, reviewing or refactoring React or Next.js code for speed - data-fetching waterfalls, bundle size, server components, re-renders, hydration, rendering cost - or when a page feels slow, a bundle is large or a component re-renders too often. Applies to React and Next.js code only, even if the user does not say "performance". For visual or usability review use ux-review; for component API design use composition-patterns.
composition-patterns
React component composition patterns for flexible, maintainable component APIs, from Vercel Engineering. Use when refactoring a component that has grown many boolean props, building or reviewing a shared component library or design-system wrapper, choosing between compound components, context providers, render props or explicit variants, or moving to React 19 APIs. Applies to React code only, even if the user does not say "composition". For render-and-look design review use ux-review; for performance rules use react-best-practices.
eng
Slash entry for the engineering agent. Use when the user types /core:eng, or asks to "use eng", "run the engineering pass" or "have engineering do" a fix, feature, refactor or code review in the current repo, even if they do not name the agent. Hands the task to the core:eng agent in a fresh context and returns its report.