trove-react-native
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list/scroll performance, implementing Reanimated animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, FlashList, or native platform APIs. User-invocable; no auto-attach (no RN project in the current Trove workspace).
- License 许可
- MIT
- 所属仓库
- bravew/trove
- 最近更新
- 2026-11-12
- Stars
- ★ 10
- Forks
- 1
01 前言 Front Matter
- name
- trove-react-native
- metadata
- { "source": "vercel-labs/agent-skills", "trove-category": "code", "upstream-version": "1.0.0", "trove-category-label": "Code" }
- description
- React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list/scroll performance, implementing Reanimated animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, FlashList, or native platform APIs. User-invocable; no auto-attach (no RN project in the current Trove workspace).
02 资源文件 38
- 参考文档references/_sections.md2.2 KB
- 参考文档references/_template.md631 B
- 参考文档references/animation-derived-value.md1.3 KB
- 参考文档references/animation-gesture-detector-press.md2.7 KB
- 参考文档references/animation-gpu-properties.md2.0 KB
- 参考文档references/design-system-compound-components.md1.6 KB
- 参考文档references/fonts-config-plugin.md1.4 KB
- 参考文档references/imports-design-system-folder.md1.4 KB
- 参考文档references/js-hoist-intl.md1.6 KB
- 参考文档references/list-performance-callbacks.md1.7 KB
- 参考文档references/list-performance-function-references.md4.0 KB
- 参考文档references/list-performance-images.md1.4 KB
- 参考文档references/list-performance-inline-objects.md2.3 KB
- 参考文档references/list-performance-item-expensive.md2.4 KB
- 参考文档references/list-performance-item-memo.md2.2 KB
- 参考文档references/list-performance-item-types.md2.7 KB
- 参考文档references/list-performance-virtualize.md2.0 KB
- 参考文档references/monorepo-native-deps-in-app.md1.5 KB
- 参考文档references/monorepo-single-dependency-versions.md1.3 KB
- 参考文档references/navigation-native-navigators.md5.1 KB
- 参考文档references/react-compiler-destructure-functions.md1.2 KB
- 参考文档references/react-compiler-reanimated-shared-values.md1.5 KB
- 参考文档references/react-state-dispatcher.md2.2 KB
- 参考文档references/react-state-fallback.md1.7 KB
- 参考文档references/react-state-minimize.md1.7 KB
- 参考文档references/rendering-no-falsy-and.md1.8 KB
- 参考文档references/rendering-text-in-text-component.md697 B
- 参考文档references/scroll-position-no-state.md1.9 KB
- 参考文档references/state-ground-truth.md2.1 KB
- 参考文档references/ui-expo-image.md1.6 KB
- 参考文档references/ui-image-gallery.md2.5 KB
- 参考文档references/ui-measure-views.md2.2 KB
- 参考文档references/ui-menus.md4.5 KB
- 参考文档references/ui-native-modals.md1.8 KB
- 参考文档references/ui-pressable.md1.8 KB
- 参考文档references/ui-safe-area-scroll.md1.5 KB
- 参考文档references/ui-scrollview-content-inset.md1.3 KB
- 参考文档references/ui-styling.md2.2 KB
03 SKILL.md 正文
<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly --> <!-- Regenerate: bun run build:skills -->
Session Init
This skill ships Trove conventions. Prefer existing project patterns over generic best practices when they conflict.
React Native Skills
Best practices for React Native and Expo applications, organized by impact. Each rule has a detailed reference file under references/ with incorrect/correct code examples.
When to Apply
- Building React Native or Expo apps
- Optimizing list and scroll performance (FlashList, virtualization)
- Implementing animations with Reanimated and Gesture Handler
- Working with images and media (expo-image, Galeria)
- Configuring native modules, custom fonts, or platform integrations
- Structuring monorepo projects with native dependencies
Note: This skill is user-invocable rather than glob-auto-attached, since React Native projects are less common than web React ones — invoke it explicitly for ad-hoc RN work or new projects.
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— UseuseDerivedValuefor computed animationsanimation-gesture-detector-press— UseGesture.Tapinstead ofPressable
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— UseStyleSheet.createor 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 inTextcomponentsrendering-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— HoistIntlobject creation
How to Use
Read individual rule files for detailed explanations and code examples:
references/list-performance-virtualize.md
references/animation-gpu-properties.md
references/ui-expo-image.md
Each rule contains: brief explanation, incorrect example, correct example, references.
Source
Upstream: vercel-labs/agent-skills · react-native-skills (MIT). Adapted for the Trove marketplace.
04 同仓库更多 Skills
using-trove
Skill discipline anchor for the Trove marketplace. Loaded once per session; routes the agent to the right trove-* skill before code, planning, review, or git actions.
trove-write-skill
Skill authoring workflow. Use when creating or updating a Codex or Trove skill, including rubrics, tasks, metadata, and validation.
trove-worktree
Git worktree workflow for spikes, risky experiments, and broad refactors that should not disturb the user's current branch.
trove-why
Reconstruct design rationale and decision history from evidence — source control, issue tracker (Linear), docs (Notion), chat (Slack), error tracking (Sentry) — with calibrated confidence. Use for "why does X work this way", "why did we pick Y", regressions, and postmortems. Use trove-explain for how it works now.
trove-verify
Completion verification workflow. Use before claiming done, fixed, complete, ready, or shipped.
trove-unslop
Cut AI tells from writing — PR descriptions, release notes, specs, commit bodies, and replies. Use before finalizing prose, or when the user asks to clean up, de-slop, or make text sound human.