sentry-fix-issues

Find and fix issues from Sentry using MCP. Use when asked to fix Sentry errors, debug production issues, investigate exceptions, or resolve bugs reported in…

npx skills add https://github.com/getsentry/webvitals.com --skill sentry-fix-issues

Fix Sentry Issues

Discover, analyze, and fix production issues using Sentry's full debugging capabilities.

Invoke This Skill When

  • User asks to "fix Sentry issues" or "resolve Sentry errors"
  • User wants to "debug production bugs" or "investigate exceptions"
  • User mentions issue IDs, error messages, or asks about recent failures
  • User wants to triage or work through their Sentry backlog

Prerequisites

  • Sentry MCP server configured and connected
  • Access to the Sentry project/organization

Phase 1: Issue Discovery

Use Sentry MCP to find issues. Confirm with user which issue(s) to fix before proceeding.

Search TypeMCP Call
Recent unresolvedsentry_search_issues query: "is:unresolved" sort: "date"
Specific error typesentry_search_issues query: "is:unresolved error.type:TypeError"
By IDsentry_get_issue issue_id: "PROJECT-123"

Phase 2: Deep Issue Analysis

Gather ALL available context for each issue:

Data SourceMCP CallExtract
Core Errorsentry_get_issueException type/message, full stack trace, file paths, line numbers, function names
Event Detailssentry_get_eventBreadcrumbs, tags, custom context, request data
Trace (if available)sentry_get_traceParent transaction, spans, DB queries, API calls, error location
Replay (if available)sentry_get_replayUser actions, UI state, network requests

Phase 3: Root Cause Hypothesis

Before touching code, document:

  1. Error Summary: One sentence describing what went wrong
  2. Immediate Cause: The direct code path that threw
  3. Root Cause Hypothesis: Why the code reached this state
  4. Supporting Evidence: Breadcrumbs, traces, or context supporting this
  5. Alternative Hypotheses: What else could explain this? Why is yours more likely?

Challenge yourself: Is this a symptom of a deeper issue? Check for similar errors elsewhere, related issues, or upstream failures in traces.

Phase 4: Code Investigation

StepActions
Locate CodeRead every file in stack trace from top down
Trace Data FlowFind value origins, transformations, assumptions, validations
Error BoundariesCheck for try/catch - why didn't it handle this case?
Related CodeFind similar patterns, check tests, review recent commits (git log, git blame)

Phase 5: Implement Fix

Before writing code, confirm your fix will:

  • Handle the specific case that caused the error
  • Not break existing functionality
  • Handle edge cases (null, undefined, empty, malformed)
  • Provide meaningful error messages
  • Be consistent with codebase patterns

Apply the fix: Prefer input validation > try/catch, graceful degradation > hard failures, specific > generic handling, root cause > symptom fixes.

Add tests reproducing exact Sentry event conditions and verifying edge cases.

Phase 6: Verification Audit

Complete before declaring fixed:

CheckQuestions
EvidenceDoes fix address exact error message? Handle data state shown? Prevent ALL events?
RegressionCould fix break existing functionality? Other code paths affected? Backward compatible?
CompletenessSimilar patterns elsewhere? Related Sentry issues? Add monitoring/logging?
Self-ChallengeRoot cause or symptom? Considered all event data? Will handle if occurs again?

Phase 7: Report Results

Format:

## Fixed: [ISSUE_ID] - [Error Type]
- Error: [message], Frequency: [X events, Y users], First/Last: [dates]
- Root Cause: [one paragraph]
- Evidence: Stack trace [key frames], breadcrumbs [actions], context [data]
- Fix: File(s) [paths], Change [description]
- Verification: [ ] Exact condition [ ] Edge cases [ ] No regressions [ ] Tests [y/n]
- Follow-up: [additional issues, monitoring, related code]

Quick Reference

MCP Tools: sentry_search_issues, sentry_get_issue, sentry_get_event, sentry_get_trace, sentry_get_replay, sentry_list_projects, sentry_get_project

Common Patterns: TypeError (check data flow, API responses, race conditions) • Promise Rejection (trace async, error boundaries) • Network Error (breadcrumbs, CORS, timeouts) • ChunkLoadError (deployment, caching, splitting) • Rate Limit (trace patterns, throttling) • Memory/Performance (trace spans, N+1 queries)

More skills from sentry

generate-frontend-forms
sentry
Guide for creating forms using Sentry's new form system. Use when implementing forms, form fields, validation, or auto-save functionality.
official
sentry-snapshots-cocoa
sentry
Full Sentry Snapshots setup for Apple/Cocoa projects. Use when asked to "setup SnapshotPreviews", "setup Apple snapshot testing", "upload Apple snapshots to…
official
architecture-review
sentry
Staff-level codebase health review. Finds monolithic modules, silent failures, type safety gaps, test coverage holes, and LLM-friendliness issues.
official
linear-type-labeler
sentry
Classifies Linear issues and applies a Type label from the Sentry workspace's label taxonomy based on the content of each issue's title and description.
official
sentry-flutter-sdk
sentry
Full Sentry SDK setup for Flutter and Dart. Use when asked to "add Sentry to Flutter", "install sentry_flutter", "setup Sentry in Dart", or configure error…
official
sentry-svelte-sdk
sentry
Full Sentry SDK setup for Svelte and SvelteKit. Use when asked to "add Sentry to Svelte", "add Sentry to SvelteKit", "install @sentry/sveltekit", or configure…
official
vercel-react-best-practices
sentry
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js…
official
sentry-tanstack-start-sdk
sentry
Full Sentry SDK setup for TanStack Start React. Use when asked to "add Sentry to TanStack Start", "install @sentry/tanstackstart-react", or configure error…
official