Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Upgrade the Sentry JavaScript SDK across major versions. Use when asked to upgrade Sentry, migrate to a newer version, fix deprecated Sentry APIs, or resolve breaking changes after a Sentry version bump.
.claude/skills/kunanonj-cursor-plugin-sentry-sentry-sdk-upgrade/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-09 | ✗→✓ | ▲ Improved | 103% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 108% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 54% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 128% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 49% | 0% |
> All Skills > Workflow > SDK Upgrade
Upgrade the Sentry JavaScript SDK across major versions with AI-guided migration.
@sentry/* package versionsIdentify the current Sentry SDK version, target version, and framework.
bashcat package.json | grep -E '"@sentry/' | head -20
Extract:
@sentry/* packages and their current versions7.x, 8.x, 9.x)Check package.json dependencies for framework indicators:
| Dependency | Framework | Sentry Package | |---|---|---| | next | Next.js | @sentry/nextjs | | nuxt or @nuxt/kit | Nuxt | @sentry/nuxt | | @sveltejs/kit | SvelteKit | @sentry/sveltekit | | @remix-run/node | Remix | @sentry/remix | | react (no Next/Remix) | React SPA | @sentry/react | | @angular/core | Angular | @sentry/angular | | vue (no Nuxt) | Vue | @sentry/vue | | express | Express | @sentry/node | | @nestjs/core | NestJS | @sentry/nestjs | | @solidjs/start | SolidStart | @sentry/solidstart | | astro | Astro | @sentry/astro | | bun types or runtime | Bun | @sentry/bun | | @cloudflare/workers-types | Cloudflare | @sentry/cloudflare | | None of above (Node.js) | Node.js | @sentry/node |
bashgrep -rn "from '@sentry/\|require('@sentry/" --include="*.ts" --include="*.js" --include="*.tsx" --include="*.jsx" --include="*.mjs" --include="*.cjs" -l
bashfind . -name "sentry.*" -o -name "*.sentry.*" -o -name "instrumentation.*" | grep -v node_modules | grep -v .next | grep -v .nuxt
Scan for patterns that indicate which migration steps are needed:
bash# v7 patterns (need v7→v8 migration) grep -rn "from '@sentry/hub'\|from '@sentry/tracing'\|from '@sentry/integrations'\|from '@sentry/serverless'\|from '@sentry/replay'" --include="*.ts" --include="*.js" --include="*.tsx" --include="*.jsx" -l grep -rn "new BrowserTracing\|new Replay\|startTransaction\|configureScope\|Handlers\.requestHandler\|Handlers\.errorHandler" --include="*.ts" --include="*.js" --include="*.tsx" --include="*.jsx" -l # v8 patterns (need v8→v9 migration) grep -rn "from '@sentry/utils'\|from '@sentry/types'" --include="*.ts" --include="*.js" --include="*.tsx" --include="*.jsx" -l grep -rn "getCurrentHub\|enableTracing\|captureUserFeedback\|@WithSentry\|autoSessionTracking" --include="*.ts" --include="*.js" --include="*.tsx" --include="*.jsx" -l
If the user didn't specify a target version, recommend the latest major version (v9 as of this writing). If the user has already bumped package versions but has broken code, detect the target from package.json.
Present a migration summary based on detected state.
For multi-hop migrations, apply code changes incrementally but update package versions once to the final target.
Load the appropriate version-specific reference:
Present a concrete summary of changes needed, categorized by complexity:
Auto-fixable (apply directly):
@sentry/utils to @sentry/core)@WithSentry to @SentryExceptionCaptured)enableTracing to tracesSampleRate)AI-assisted (explain and propose):
transactionContext flatteningManual review (flag for user):
Ask the user:
npx @sentry/wizard -i upgrade exists as a CLI alternative for v8→v9 but may not handle all patternsStep through changes file by file.
For each file identified in Phase 1.3:
Work through changes in this order:
Replace removed/renamed package imports. Reference the version-specific migration file for the complete mapping.
Apply mechanical method and function renames.
Update Sentry.init() options and build configuration.
Handle patterns requiring understanding of context:
Update all @sentry/* packages to the target version. All packages must be on the same major version.
bash# Detect package manager if [ -f "yarn.lock" ]; then echo "yarn" elif [ -f "pnpm-lock.yaml" ]; then echo "pnpm" else echo "npm" fi
Install updated dependencies using the detected package manager.
bash# Check for type errors npx tsc --noEmit 2>&1 | head -50 # Run build npm run build 2>&1 | tail -20
Fix any remaining type errors or build failures.
Consult references/upgrade-patterns.md for framework-specific config file locations and validation steps.
Next.js: Check instrumentation.ts, next.config.ts wrapper, both client and server configs. Nuxt: Check Nuxt module config and both plugin files. SvelteKit: Check hooks files and Vite config. Express/Node: Verify early initialization order. NestJS: Check for decorator and filter renames.
@sentry/* packages on same versionSuggest adding a test error:
js// Add temporarily to verify Sentry is working after upgrade setTimeout(() => { throw new Error('Sentry upgrade verification - safe to delete'); }, 3000);
Mention features available in the new version that the user might want to enable:
v8 new features: OpenTelemetry-based Node tracing, automatic database/HTTP instrumentation, functional integrations, new span APIs
v9 new features: Structured logging (Sentry.logger.*), improved source maps handling, simplified configuration
If the user has other Sentry SDKs (Python, Ruby, Go, etc.) that also need upgrading, note that this skill covers JavaScript SDK only.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-08 | pass→pass | 11,379 | 9,052 | -20% | 1 | 1 | 0% | 2,286 | 4,105 | +80% | 0 | 0 | — |
case-01 | fail→fail | 2,040 | 4,004 | +96% | 1 | 1 | 0% | 229 | 2,594 | +1033% | 0 | 0 | — |
case-02 | fail→fail | 5,120 | 3,136 | -39% | 1 | 1 | 0% | 354 | 2,804 | +692% | 0 | 0 | — |
case-09 | fail→pass | 9,480 | 6,340 | -33% | 1 | 1 | 0% | 1,641 | 3,334 | +103% | 0 | 0 | — |
case-03 | fail→fail | 2,036 | 4,220 | +107% | 1 | 1 | 0% | 269 | 2,599 | +866% | 0 | 0 | — |
case-04 | fail→pass | 10,500 | 7,950 | -24% | 1 | 1 | 0% | 1,833 | 3,808 | +108% | 0 | 0 | — |
case-05 | pass→pass | 2,391 | 1,198 | -50% | 1 | 1 | 0% | 418 | 2,544 | +509% | 0 | 0 | — |
case-06 | pass→pass | 8,572 | 6,166 | -28% | 1 | 1 | 0% | 1,613 | 3,490 | +116% | 0 | 0 | — |
case-07 | pass→pass | 8,140 | 3,935 | -52% | 1 | 1 | 0% | 1,502 | 3,106 | +107% | 0 | 0 | — |
case-10 | pass→pass | 6,363 | 5,274 | -17% | 1 | 1 | 0% | 1,205 | 3,406 | +183% | 0 | 0 | — |
case-11 | fail→pass | 14,264 | 7,154 | -50% | 1 | 1 | 0% | 2,371 | 3,663 | +54% | 0 | 0 | — |
case-12 | pass→pass | 12,919 | 8,630 | -33% | 1 | 1 | 0% | 2,440 | 3,946 | +62% | 0 | 0 | — |
case-13 | pass→pass | 13,619 | 6,626 | -51% | 1 | 1 | 0% | 2,601 | 3,720 | +43% | 0 | 0 | — |
case-14 | fail→pass | 6,470 | 2,114 | -67% | 1 | 1 | 0% | 1,179 | 2,690 | +128% | 0 | 0 | — |
case-15 | pass→pass | 13,829 | 6,831 | -51% | 1 | 1 | 0% | 2,409 | 3,606 | +50% | 0 | 0 | — |
case-16 | pass→pass | 12,101 | 5,315 | -56% | 1 | 1 | 0% | 2,196 | 3,439 | +57% | 0 | 0 | — |
case-17 | fail→pass | 10,955 | 3,862 | -65% | 1 | 1 | 0% | 2,044 | 3,051 | +49% | 0 | 0 | — |
case-18 | pass→pass | 7,022 | 4,346 | -38% | 1 | 1 | 0% | 1,303 | 3,117 | +139% | 0 | 0 | — |
case-19 | fail→fail | 13,148 | 6,187 | -53% | 1 | 1 | 0% | 2,652 | 2,741 | +3% | 0 | 0 | — |
case-20 | fail→fail | 13,406 | 8,637 | -36% | 1 | 1 | 0% | 2,688 | 4,134 | +54% | 0 | 0 | — |
case-21 | fail→fail | 10,741 | 4,819 | -55% | 1 | 1 | 0% | 2,263 | 2,626 | +16% | 0 | 0 | — |
case-22 | pass→pass | 11,013 | 8,344 | -24% | 1 | 1 | 0% | 1,968 | 3,967 | +102% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 18 counted toward the lift figure. The other 4 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +23 percentage points is the difference between those two pass rates over the 18 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.