Sentry error monitoring, session replay, and tracing for React applications.
Works with
Install @sentry/react and initialize via instrument.js (imported first in your entry point) with DSN configuration
Supports error capture via React 19+ error hooks or ErrorBoundary component for earlier versions
Includes browser tracing, session replay, and Redux integration; router integrations available for React Router (v4–v7) and TanStack Router
Source map upload via @sentry/wizard enables readable st
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionsentry-react-setupExecute the skills CLI command in your project's root directory to begin installation:
Fetches sentry-react-setup from getsentry/sentry-agent-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate sentry-react-setup. Access via /sentry-react-setup in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
19
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
19
stars
Install and configure Sentry in React projects.
Important: The configuration options and code samples below are examples. Always verify against docs.sentry.io before implementing, as APIs and defaults may have changed.
npm install @sentry/react --save
Create instrument.js in your project root (must be imported first in your app):
import * as Sentry from "@sentry/react";
Sentry.init({
dsn: "YOUR_SENTRY_DSN",
sendDefaultPii: true,
// Tracing + Session Replay
integrations: [
Sentry.browserTracingIntegration(),
Sentry.replayIntegration(),
],
tracesSampleRate: 1.0,
tracePropagationTargets: [/^\//, /^https:\/\/yourserver\.io\/api/],
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
// Logs
enableLogs: true,
});
// src/index.js or src/main.jsx
import "./instrument"; // Must be first!
import App from "./App";
import { createRoot } from "react-dom/client";
const root = createRoot(document.getElementById("app"));
root.render(<App />);
Use error hooks with createRoot:
import { createRoot } from "react-dom/client";
import * as Sentry from "@sentry/react";
const root = createRoot(document.getElementById("app"), {
onUncaughtError: Sentry.reactErrorHandler(),
onCaughtError: Sentry.reactErrorHandler(),
onRecoverableError: Sentry.reactErrorHandler(),
});
Use ErrorBoundary component:
import * as Sentry from "@sentry/react";
<Sentry.ErrorBoundary fallback={<p>An error occurred</p>}>
<MyComponent />
</Sentry.ErrorBoundary>
| Router | Integration |
|---|---|
| React Router v7 | Sentry.reactRouterV7BrowserTracingIntegration |
| React Router v6 | Sentry.reactRouterV6BrowserTracingIntegration |
| React Router v4/v5 | Sentry.reactRouterV5BrowserTracingIntegration (shared for both) |
| TanStack Router | See TanStack Router docs |
import * as Sentry from "@sentry/react";
import { configureStore } from "@reduxjs/toolkit";
const store = configureStore({
reducer,
enhancers: (getDefaultEnhancers) =>
getDefaultEnhancers().concat(Sentry.createReduxEnhancer()),
});
Upload source maps for readable stack traces:
npx @sentry/wizard@latest -i sourcemaps
SENTRY_DSN=https://[email protected]/456
SENTRY_AUTH_TOKEN=sntrys_xxx # Used by sentry-cli / source maps, not the SDK
SENTRY_ORG=my-org # Used by sentry-cli, not the SDK
SENTRY_PROJECT=my-project # Used by sentry-cli, not the SDK
Note: The SDK reads SENTRY_DSN automatically. If using Create React App, prefix with REACT_APP_; for Vite, use VITE_. SENTRY_AUTH_TOKEN/ORG/PROJECT are used by sentry-cli for source map uploads, not by the browser SDK.
Add test button to trigger error:
<button onClick={() => { throw new Error("Sentry Test Error"); }}>
Test Sentry
</button>
| Issue | Solution |
|---|---|
| Errors not captured | Ensure instrument.js is imported first |
| Source maps not working | Run sourcemaps wizard, verify auth token |
| React Router spans missing | Add correct router integration for your version |
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
asyrafhussin/agent-skills
anthropics/claude-code
mblode/agent-skills
github/awesome-copilot
leonxlnx/taste-skill
sickn33/antigravity-awesome-skills
sentry-react-setup is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Useful defaults in sentry-react-setup — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
sentry-react-setup has been reliable in day-to-day use. Documentation quality is above average for community skills.
Keeps context tight: sentry-react-setup is the kind of skill you can hand to a new teammate without a long onboarding doc.
Registry listing for sentry-react-setup matched our evaluation — installs cleanly and behaves as described in the markdown.
I recommend sentry-react-setup for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
sentry-react-setup reduced setup friction for our internal harness; good balance of opinion and flexibility.
sentry-react-setup has been reliable in day-to-day use. Documentation quality is above average for community skills.
Solid pick for teams standardizing on skills: sentry-react-setup is focused, and the summary matches what you get after install.
sentry-react-setup reduced setup friction for our internal harness; good balance of opinion and flexibility.
showing 1-10 of 54