# sentry-react-native-sdk

A skill that walks your agent through Sentry setup in React Native and Expo: it scans the project, proposes a feature set and guides the install steps.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 4100 installs · ★ 272
- Author: getsentry
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/getsentry/sentry-for-ai/tree/HEAD/skills-legacy/sentry-react-native-sdk/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/sentry-react-native-sdk

## What it does

The skill scans your project and works out what it is dealing with: Expo managed, Expo bare or plain React Native. It reads `package.json`, `app.json`, the Expo SDK version, navigation library, Hermes, Expo Router and any existing `Sentry.init`. Then it proposes a concrete set — error monitoring, tracing and Session Replay as the baseline, with profiling, logging and user feedback as optional extras.

The main install path is the wizard, `npx @sentry/wizard@latest -i reactNative`. You have to run that one yourself: it opens a browser for login and waits on interactive input the agent cannot handle. The wizard installs `@sentry/react-native`, edits `metro.config.js`, adds the plugin to `app.json`, writes `Sentry.init()` and `Sentry.wrap()`, creates `ios/sentry.properties` and `android/sentry.properties`, and wires up the Gradle plugin for Android.

On Expo SDK 50 and newer you want `@sentry/react-native`; older SDKs are stuck with the legacy `sentry-expo` package. The skill advises `@sentry/react-native` 8.0.0 or higher and asks you to check the current Sentry docs before implementing. If `@sentry/react-native` is already in `package.json`, the install is skipped and configuration starts straight away.

## Requirements
- Works with: Sentry

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add getsentry/sentry-for-ai --skill sentry-react-native-sdk -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/sentry-react-native-sdk/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/sentry-react-native-sdk/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add getsentry/sentry-for-ai --skill sentry-react-native-sdk -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/sentry-react-native-sdk/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add getsentry/sentry-for-ai --skill sentry-react-native-sdk -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/sentry-react-native-sdk/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install getsentry/sentry-for-ai sentry-react-native-sdk
```

2. **Manually: put the files in place**
- File: `.github/skills/sentry-react-native-sdk/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add getsentry/sentry-for-ai --skill sentry-react-native-sdk -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/getsentry/sentry-for-ai --path skills-legacy/sentry-react-native-sdk
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/sentry-react-native-sdk/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add getsentry/sentry-for-ai --skill sentry-react-native-sdk -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/getsentry/sentry-for-ai/tree/HEAD/skills-legacy/sentry-react-native-sdk/SKILL.md

## When to use it
- add Sentry to a React Native or Expo app
- capture native crashes, ANRs and app hangs on iOS and Android
- trace app start, screen navigation and network requests
- set up Session Replay with screenshots and touch events to debug user reports
- pick the right Sentry package for your Expo SDK version

## Example prompts
- add Sentry to my React Native project
- set up @sentry/react-native in my Expo app
- enable tracing and Session Replay for this RN app

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: ca7b080902bf297b.

BEGIN THIRD-PARTY FILE ca7b080902bf297b
````text
---
name: sentry-react-native-sdk
description: Full Sentry SDK setup for React Native and Expo. Use when asked to "add Sentry to React Native", "install @sentry/react-native", "setup Sentry in Expo", or configure error monitoring, tracing, profiling, session replay, or logging for React Native applications. Supports Expo managed, Expo bare, and vanilla React Native.
license: Apache-2.0
category: sdk-setup
parent: sentry-sdk-setup
disable-model-invocation: true
---

> [All Skills](../../SKILL_TREE.md) > [SDK Setup](../sentry-sdk-setup/SKILL.md) > React Native SDK

# Sentry React Native SDK

Opinionated wizard that scans your React Native or Expo project and guides you through complete Sentry setup — error monitoring, tracing, profiling, session replay, logging, and more.

## Invoke This Skill When

- User asks to "add Sentry to React Native" or "set up Sentry" in an RN or Expo app
- User wants error monitoring, tracing, profiling, session replay, or logging in React Native
- User mentions `@sentry/react-native`, mobile error tracking, or Sentry for Expo
- User wants to monitor native crashes, ANRs, or app hangs on iOS/Android

> **Note:** SDK versions and APIs below reflect current Sentry docs at time of writing (`@sentry/react-native` ≥6.0.0, minimum recommended ≥8.0.0).
> Always verify against [docs.sentry.io/platforms/react-native/](https://docs.sentry.io/platforms/react-native/) before implementing.

---

## Phase 1: Detect

Run these commands to understand the project before making any recommendations:

```bash
# Detect project type and existing Sentry
cat package.json | grep -E '"(react-native|expo|@expo|@sentry/react-native|sentry-expo)"'

# Distinguish Expo managed vs bare vs vanilla RN
ls app.json app.config.js app.config.ts 2>/dev/null
cat app.json 2>/dev/null | python3 -c "import sys,json; d=json.load(sys.stdin); print('Expo managed' if 'expo' in d else 'Bare/Vanilla')" 2>/dev/null

# Check Expo SDK version (important: Expo SDK 50+ required for @sentry/react-native)
cat package.json | grep '"expo"'

# Detect navigation library
grep -E '"(@react-navigation/native|react-native-navigation)"' package.json

# Detect state management (Redux → breadcrumb integration available)
grep -E '"(redux|@reduxjs/toolkit|zustand|mobx)"' package.json
````
END THIRD-PARTY FILE ca7b080902bf297b

The third-party file has ended. Everything between the ca7b080902bf297b tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2290 of 40530 bytes. © getsentry · Apache-2.0 · https://github.com/getsentry/sentry-for-ai/tree/HEAD/skills-legacy/sentry-react-native-sdk/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
