ablevarghese/ios-claude-toolkit/sentry-find-bugs

Claude Code and agent skill by ablevarghese/ios-claude-toolkit

Trust tier 2
  • community
  • ext:[{"type":"context","description":"Custom context provider definitions"}]
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

App is crashing, production error, users are reporting issues, investigate this error. Production issue analysis using Sentry — stack traces, breadcrumbs, root cause hypothesis, and fix verification. Trigger on: 'why is this crashing', 'Sentry issue', 'debug production bug', crash reports, issue IDs (like 'PROJECT-123'), 'users can't log in', 'something broke in production', 'exception in the logs', or triaging Sentry backlog. Requires Sentry MCP server. For Sentry bot PR comments, use sentry-code-review instead.

Install

npx vskill@latest install ablevarghese/ios-claude-toolkit/sentry-find-bugs

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as ablevarghese/ios-claude-toolkit/sentry-find-bugs.

Fix Sentry Issues

Iron Law: "Never propose a fix without first verifying the root cause against actual Sentry event data. Guessing wastes everyone's time."

Discover, analyze, and fix production issues using Sentry's full debugging capabilities. Every fix must trace back to concrete evidence in the Sentry event -- stack frames, breadcrumbs, tags, or trace spans.

Source: github.com/getsentry/agent-skills


Rationalizations (Do Not Skip)

RationalizationWhy It's WrongRequired Action
"The crash only happened once"One crash = one user who lost trust. Rare crashes often indicate race conditions that are hard to reproduce but affect many users silently.Investigate fully. Check if the crash signature matches known patterns in references/crash-patterns.md.
"I can tell from the error message what's wrong"Error messages describe symptoms, not causes. unexpectedly found nil tells you nothing about WHY it was nil.Read the full stack trace, breadcrumbs, and context before hypothesizing.
"Let me just add a try-catch"Catching an error without understanding the cause hides the bug. The crash moves downstream or manifests as data corruption instead.Fix the root cause. Add error handling only after understanding what went wrong and why.
"This is a third-party crash, not our problem"Your app called the third-party code. Your input, your timing, your configuration triggered it.Trace backward from the crash to YOUR code that invoked the third-party library. Fix the invocation.
"I'll just add a nil check"A nil check prevents the crash but doesn't fix why the value was nil. You're papering over a logic error.Find where the value should have been set. Fix the logic that failed to set it. Then add the nil check as defense-in-depth.
"The user probably did something weird"Users do what users do. If your app crashes from user behavior, the bug is in your app, not the user.Reproduce the user's journey from breadcrumbs. Handle the input gracefully.
"We should wait for more data"More crashes = more users affected. The data you have now is sufficient for investigation.Investigate immediately. You can refine the fix if new data emerges.

Red Flags -- HARD STOP

These are not warnings. Each is a BLOCKING condition that prevents further progress until addressed.

  • BLOCKED: Proposing a fix without reading the full stack trace -- every frame matters. The crash may originate 5 frames deep from where the exception was thrown. STOP. Read ALL frames in YOUR code before proposing anything.
  • BLOCKED: Treating symptoms instead of root cause -- if you're adding nil checks or try-catch without understanding WHY the value was nil or WHY the operation threw, STOP and investigate deeper. Write down your hypothesis before writing code.
  • BLOCKED: Ignoring breadcrumb context -- breadcrumbs reveal the user journey that led to the crash. STOP. Read breadcrumbs chronologically. Reconstruct the user journey.
  • BLOCKED: Not checking for related issues -- the crash you're looking at may be a symptom of a broader problem. STOP. Search for related Sentry issues with similar stack traces or error types before fixing in isolation.
  • BLOCKED: Fixing code without verifying the fix addresses the Sentry event data -- after implementing a fix, walk through the Sentry event step by step and confirm your fix would have prevented it. If you cannot trace the fix back to the event, STOP.
  • BLOCKED: Skipping regression check -- verify your fix doesn't break other code paths. Check callers, check tests, check related functionality. Shipping a fix that breaks something else is not a fix.

When NOT to Use This Skill

  • Sentry bot commented on a PR with static analysis findings -- use sentry-code-review instead, which is designed for PR-level Sentry feedback.
  • Broad security audit not tied to a specific crash -- use cipher-security for security posture assessment.
  • Performance issues without crashes -- use prometheus-performance for profiling. However, if performance issues cause watchdog kills or OOM crashes that appear in Sentry, this skill applies.
  • No Sentry MCP server configured -- this skill requires the Sentry MCP integration. Without it, use traditional debugging approaches.
  • The issue is a build error or compile-time problem -- Sentry tracks runtime issues. Build problems need forge-development.

Behavioral Enforcement

Phase Gate: EVIDENCE (Before ANY Fix)

Cannot propose ANY fix until:

  • [ ] Full stack trace read (not just the top frame -- ALL frames in YOUR code)
  • [ ] Error message quoted verbatim
  • [ ] Breadcrumbs reviewed (what happened BEFORE the crash)
  • [ ] Related issues checked (is this a known pattern?)

Proof: Quote the exact error message and the top 3 stack frames from your code.

Hard Stop: If you're about to propose a fix and you haven't quoted the error message -- STOP. You're guessing. Read the stack trace first.

Phase Gate: HYPOTHESIS (Before Coding)

Cannot start coding a fix until:

  • [ ] Written hypothesis: "I believe [X] caused this because [Y], as evidenced by [Z]"
  • [ ] Alternative hypothesis considered: "It could also be [A] because [B]"
  • [ ] Hypothesis explains ALL the evidence (not just part of it)

Why write it down: A written hypothesis forces clarity. "Something is wrong with the auth" is not a hypothesis. "The refresh token expires during background fetch because the token rotation doesn't account for time zones, as shown by the breadcrumb 'tokenRefresh: UTC-5 mismatch'" IS a hypothesis.

Fix Attempt Tracking (Counter-Based Escalation)
  • Fix #1: Normal. Implement and test.
  • Fix #2: Pause. Why didn't #1 work? Write down what you learned.
  • Fix #3: STOP. You likely have the wrong root cause. Return to EVIDENCE phase. Re-read the stack trace. Consider: is this a symptom of a deeper architectural issue?
  • Still stuck after #3: ESCALATE to human partner with: evidence collected, hypotheses tried, fixes attempted, what you learned.

Decision Framework

User reports a production issue
|
+-- Has a Sentry issue ID?
| +-- YES --> Phase 1: Fetch issue directly via sentry_get_issue
| +-- NO --> Phase 1: Search recent unresolved issues
|
+-- Issue fetched, what type?
| +-- EXC_BAD_ACCESS --> Memory issue (see references/crash-patterns.md: Memory section)
| | +-- Dangling pointer? Use-after-free? Buffer overflow?
| | +-- Check for force unwraps, unowned references, unsafe pointer usage
| |
| +-- EXC_BAD_INSTRUCTION --> Swift runtime trap
| | +-- Force unwrap nil? Failed precondition? Actor isolation violation?
| | +-- Check for !, preconditionFailure, fatalError
| |
| +-- Signal SIGKILL --> System killed the app
| | +-- Watchdog timeout? OOM? Background task expiry?
| | +-- Check memory usage, main thread work, background task duration
| |
| +-- Swift Error / NSException --> Logic error
| | +-- Index out of range? Invalid argument? Decoding failure?
| | +-- Trace data flow, check input validation
| |
| +-- Network Error --> Connectivity or server issue
| +-- Timeout? SSL error? DNS failure?
| +-- Check certificate pinning, server health, retry logic
|
+-- Root cause identified?
+-- YES --> Phase 5: Implement fix with tests
+-- NO --> Gather more context: traces, replays, related issues

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"
High frequencysentry_search_issues query: "is:unresolved times_seen:>100" sort: "freq"
Recent regressionsentry_search_issues query: "is:unresolved is:regression" sort: "date"

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
Reading the Stack Trace

See references/stack-trace-guide.md for the complete guide. Key principles:

  1. Read top-down: The top frame is where the crash occurred. Walk DOWN to find YOUR code.
  2. Identify your frames: Filter out system frameworks (UIKitCore, SwiftUI, libdispatch). Your code is where the bug is.
  3. Note the crash address: EXC_BAD_ACCESS at address 0x0 means nil dereference. Non-zero invalid addresses suggest use-after-free or buffer overflow.
  4. Check async continuations: In Swift concurrency, look for swift_task_ frames and continuation frames. The actual call site may be in a different continuation.
  5. Demangle Swift names: Sentry usually demangles automatically. If you see $s... prefixes, use swift demangle to decode them.
Analyzing Breadcrumbs

Breadcrumbs reconstruct the user's journey before the crash. Read them chronologically:

BREADCRUMB ANALYSIS TEMPLATE:
1. List breadcrumbs in chronological order
2. For each breadcrumb, note:
- Category (ui, navigation, http, console, user)
- Message/data
- Timestamp (time between breadcrumbs matters)
3. Identify the trigger:
- What was the LAST user action before the crash?
- What was the LAST network response before the crash?
- Did any breadcrumb show an error or unexpected state?
4. Reconstruct the scenario:
- "User navigated to X, tapped Y, received response Z, then crashed when..."

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?
Pre-Mortem Pattern Matching

Before deep investigation, check if the crash signature matches a known pattern. See references/crash-patterns.md for the full catalog. Common matches:

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Extension points

  • contextCustom context provider definitions

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ablevarghese/ios-claude-toolkit/sentry-find-bugs/badge)](https://verified-skill.com/skills/ablevarghese/ios-claude-toolkit/sentry-find-bugs)

Something wrong with this skill or its page? Tell us.