Skip to main content
skill CX Codex

react-native-best-practices · software-mansion-labs — Claude Code skill for React Native apps

Software Mansion's guidance for React Native and Expo code on the New Architecture, split into topic files for animations, gestures, audio and JSI.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add software-mansion-labs/skills --skill react-native-best-practices -a claude-code
Open on GitHub

What react-native-best-practices does

The skill is a table of contents. Each topic lives in its own SKILL.md under references/, and the agent reads the file that matches the job before writing, reviewing or debugging code. That keeps the advice out of context until a topic actually comes up.

It turns on by itself when the working directory holds a package.json depending on react-native, expo or expo-router. Topics cover animations on Reanimated 4 (CSS, shared values, layout, GPU shaders via WebGPU and TypeGPU), touch handling with Gesture Handler, vector work in react-native-svg, audio through react-native-audio-api, rich text editing, and on-device models with ExecuTorch. Two more files deal with JSI and C++ modules, and with moving computation off the JS thread using react-native-worklets.

Bundle Mode has its own file, and it matters: enabling it means patching metro and metro-runtime for your package manager, and the file walks through the SHA-1 failure and the lost Fast Refresh that follow. The guidance assumes the New Architecture, so an app still on the old bridge will not match some of it. Supported clients are Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode.

What it helps with

  • work out what runs on a worklet and what has to come back to JS
  • build a drag gesture with Gesture Handler that does not fight the animation
  • move heavy computation off the JS thread with react-native-worklets
  • enable Bundle Mode and get past SHA-1 errors
  • write a C++ module on JSI without breaking threading rules

Example prompts for the agent

  • Before you touch the cart screen, read references/gestures/SKILL.md and rewrite the swipe gesture to match
  • The animation stutters — check references/animations/SKILL.md and tell me why
  • I need to parse JSON inside a worklet; look at references/multithreading/SKILL.md and suggest an approach

How to install react-native-best-practices

1Skills CLI (Vercel)

npx skills add software-mansion-labs/skills --skill react-native-best-practices -a claude-code

2Manually: put the files in place

~/.claude/skills/react-native-best-practices/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/react-native-best-practices/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about react-native-best-practices

How do I install react-native-best-practices in Claude Code?

Run npx skills add software-mansion-labs/skills --skill react-native-best-practices -a claude-code. The skill lands at ~/.claude/skills/react-native-best-practices/SKILL.md.

What does react-native-best-practices do?

It gives the agent Software Mansion's reference notes for React Native and Expo on the New Architecture. The skill activates on its own when a project depends on react-native, expo or expo-router.

What triggers the skill?

A package.json in the working directory that lists react-native, expo or expo-router as a dependency. Without one it stays off.

Source text

SKILL.md · MIT
---
name: react-native-best-practices
description: "Software Mansion's best practices for production React Native and Expo apps on the New Architecture. MUST USE before writing, reviewing, or debugging ANY code in a React Native or Expo project. If the working directory contains a package.json with react-native, expo, or expo-router as a dependency, this skill applies. Trigger on: any code task in a React Native/Expo project, 'React Native', 'Expo', 'New Architecture', 'Reanimated', 'Gesture Handler', 'react-native-svg', 'ExecuTorch', 'react-native-audio-api', 'react-native-enriched-html', 'Worklet', 'Fabric', 'TurboModule', 'WebGPU', 'react-native-wgpu', 'TypeGPU', 'GPU shader', 'WGSL', 'svg', 'animation', 'gesture', 'audio', 'rich text', 'AI model', 'multithreading', 'chart', 'vector', 'image filter', 'shared value', 'useSharedValue', 'runOnJS', 'scheduleOnRN', 'thread', 'worklet', 'Bundle Mode', or any question involving UI, graphics, native modules, or React Native threading and animation behavior. Also use when a more specific sub-skill matches."
license: MIT
---

# React Native Best Practices

Software Mansion's production patterns for React Native apps on the New Architecture.

Read the relevant sub-skill for the topic at hand. All sub-skills are in `references/`.

## Sub-skills

| Sub-skill | When to use |
|-----------|------------|
| `references/animations/SKILL.md` | CSS transitions, CSS animations, CSS pseudo-selectors and callbacks, shared value animations, GPU shader animations (WebGPU, TypeGPU), layout animations (entering/exiting, transitions, keyframes), scroll-driven animations, animation functions (withSpring, withTiming, withDecay), core hooks (useSharedValue, useAnimatedStyle), interpolation, particle systems, procedural noise, SDF rendering, animation performance, 120fps, accessibility, Reanimated 4 |
| `references/gestures/SKILL.md` | Tap, pan, pinch, rotation, swipe, long press, fling, hover, drag, Pressable, RectButton, Swipeable, DrawerLayout, VirtualGestureDetector, gesture composition, gesture testing -- any touch interaction with Gesture Handler |
| `references/svg/SKILL.md` | Vector graphics, icons, charts, illustrations using React Native SVG |
| `references/on-device-ai/SKILL.md` | On-device AI: LLMs (chat, tool calling, structured output, vision-language models), computer vision (classification, object detection, OCR, semantic/instance segmentation, style transfer, embeddings, text-to-image), speech processing (STT with timestamps, TTS with phonemes, VAD), VisionCamera real-time frame processing, model loading, resource management, custom models with ExecuTorch |
| `references/rich-text/SKILL.md` | Rich text editor, formatted text input, WYSIWYG, mentions, HTML/Markdown rendering, react-native-enriched-html (formerly react-native-enriched), react-native-enriched-markdown |
| `references/multithreading/SKILL.md` | Multithreading, react-native-worklets, background processing, Worker Runtimes, UI thread, scheduleOnUI, scheduleOnRN, Serializable, Synchronizable, offloading computation from the JS thread |
| `references/enable-worklets-bundle-mode/SKILL.md` | Enabling react-native-worklets Bundle Mode (imports inside worklets, third-party npm libraries on worklet runtimes) in an Expo, RN CLI, or brownfield app: babel bundleMode plugin option, bundleModeMetroConfig / getBundleModeMetroConfig, mandatory metro and metro-runtime patches per package manager, "Failed to get the SHA-1" errors, missing Fast Refresh for worklet code, uniwind/NativeWind resolver conflicts |
| `references/audio/SKILL.md` | Audio playback (buffer sources, oscillators, streaming, queued playback), recording (file, data callback, graph processing), audio effects (gain, filters, delay, convolver, panner, waveshaper), real-time analysis and visualization, audio worklets (custom processing, synthesis), system integration (sessions, interruptions, notifications, permissions), testing with mocks -- any audio feature with react-native-audio-api |
| `references/jsi/SKILL.md` | JSI, C++ native modules, jsi::Runtime, jsi::Value, jsi::Object, jsi::Function, jsi::HostObject, jsi::HostFunction, jsi::NativeState, jsi::PropNameID, jsi::ArrayBuffer, jsi::WeakObject, jsi::Scope, jsi::BigInt, JSIException, JSError, JSINativeException, calling JS from C++, calling C++ from JS, HostObject destructor constraints, shared_ptr<jsi::Value>, CallInvoker, invokeAsync, JSI threading safety, zero-copy ArrayBuffer, rt.global(), ISerialization, WithRuntimeDecorator, jsi.h |

© software-mansion-labs · MIT · software-mansion-labs/skills

Similar skills

Everything for Mobile →

react-native-best-practices by other authors comes first.

From the same set6

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor