getsentry avatar

Sentry Nextjs Sdk

This walks you through the full Sentry setup for Next.js 13+ across all three runtimes: browser, Node.js server, and Edge. It detects your router type (App vs Pages), checks for existing config, then guides you through either the interactive wizard or manual installation of instrumentation files, error boundaries, and the Next.js config wrapper. The skill is opinionated about what to recommend: error monitoring and tracing are non-negotiable, session replay for user-facing apps, and optional add-ons like logging, profiling, AI monitoring, or cron detection based on what it finds in your project. Useful if you want structured guidance instead of piecing together Sentry docs yourself.

skills.sh installs
665
GitHub stars
25
last updated
Aug 21, 2026

Install

$ npx -y skills add getsentry/sentry-agent-skills --skill sentry-nextjs-sdk --agent claude-code

Installs into .claude/skills of the current project.

Files

Sentry Next.js SDK

Opinionated wizard that scans your Next.js project and guides you through complete Sentry setup across all three runtimes: browser, Node.js server, and Edge.

Invoke This Skill When

  • User asks to "add Sentry to Next.js" or "set up Sentry" in a Next.js app
  • User wants to install or configure @sentry/nextjs
  • User wants error monitoring, tracing, session replay, logging, or profiling for Next.js
  • User asks about instrumentation.ts, withSentryConfig(), or global-error.tsx
  • User wants to capture server actions, server component errors, or edge runtime errors

Note: SDK versions and APIs below reflect current Sentry docs at time of writing (@sentry/nextjs ≥8.28.0). Always verify against docs.sentry.io/platforms/javascript/guides/nextjs/ before implementing.


Phase 1: Detect

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

# Detect Next.js version and existing Sentry
cat package.json | grep -E '"next"|"@sentry/'

# Detect router type (App Router vs Pages Router)
ls src/app app src/pages pages 2>/dev/null

Sponsors

Details

Repository
github.com/getsentry/sentry-agent-skills
Categories
Frontend Development, DevOps & CI/CD, AI & Agent Building, Debugging
First seen
Jun 3, 2026

More from getsentry/sentry-agent-skills

All 20
1pluginagentmarketplace avatarreact-native-animationspluginagentmarketplace/custom-plugin-react-nativeMaster animations - Reanimated 3, Gesture Handler, layout animations, and performance optimization663skills.sh installs
2davila7 avatarnextjs-best-practicesdavila7/claude-code-templatesNext.js App Router principles. Server Components, data fetching, routing patterns.632skills.sh installs
3langgenius avatarvercel-react-best-practiceslanggenius/difyReact and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js c612skills.sh installs
4aj-geddes avatarfrontend-accessibilityaj-geddes/useful-ai-promptsImplement WCAG compliance using semantic HTML, ARIA, keyboard navigation, and screen reader support. Use when building inclusive applications for all users.604skills.sh installs
5spences10 avatarsvelte-componentsspences10/svelte-skills-kitSvelte component patterns. Use for web components, component libraries (Bits UI, Ark UI, Melt UI), form patterns, or third-party integration.566skills.sh installs
6davila7 avatartailwind-patternsdavila7/claude-code-templatesTailwind CSS v4 principles. CSS-first configuration, container queries, modern patterns, design token architecture.564skills.sh installs