sentry-debugger

Debug production issues using Sentry error tracking API. Use when Claude needs to investigate production errors, crashes, or issues by fetching error data from Sentry - including stack traces, user context, breadcrumbs, and error frequency. Triggers on requests like "check Sentry for errors", "debug this production issue", "what's causing crashes", "investigate errors in [project]", or when users share Sentry issue URLs.

16 stars

Best use case

sentry-debugger is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Debug production issues using Sentry error tracking API. Use when Claude needs to investigate production errors, crashes, or issues by fetching error data from Sentry - including stack traces, user context, breadcrumbs, and error frequency. Triggers on requests like "check Sentry for errors", "debug this production issue", "what's causing crashes", "investigate errors in [project]", or when users share Sentry issue URLs.

Teams using sentry-debugger should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/sentry-debugger/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/sentry-debugger/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/sentry-debugger/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How sentry-debugger Compares

Feature / Agentsentry-debuggerStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Debug production issues using Sentry error tracking API. Use when Claude needs to investigate production errors, crashes, or issues by fetching error data from Sentry - including stack traces, user context, breadcrumbs, and error frequency. Triggers on requests like "check Sentry for errors", "debug this production issue", "what's causing crashes", "investigate errors in [project]", or when users share Sentry issue URLs.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Sentry Debugger

Debug production issues by fetching and analyzing error data from Sentry's API.

## Prerequisites

- Sentry API auth token with `project:read`, `event:read`, `issue:read` scopes
- Organization slug and project slug(s)

## Authentication

Uses the same auth as `sentry-cli`. Priority order:
1. `~/.sentryclirc` file (INI format with `[auth]` section)
2. `SENTRY_AUTH_TOKEN` environment variable

To extract token from sentryclirc:
```bash
SENTRY_AUTH_TOKEN=$(grep -A1 '^\[auth\]' ~/.sentryclirc | grep '^token=' | cut -d'=' -f2)
```

Or use sentry-cli directly for auth verification:
```bash
sentry-cli info  # Verify auth is working
```

## Core Workflow

### 1. Fetch Recent Issues

```bash
# Get token from sentryclirc (same as sentry-cli)
SENTRY_TOKEN=$(grep -A1 '^\[auth\]' ~/.sentryclirc 2>/dev/null | grep '^token=' | cut -d'=' -f2)
SENTRY_TOKEN=${SENTRY_TOKEN:-$SENTRY_AUTH_TOKEN}

curl -s "https://sentry.io/api/0/projects/{org_slug}/{project_slug}/issues/?query=is:unresolved&statsPeriod=24h" \
  -H "Authorization: Bearer $SENTRY_TOKEN" | jq '.[] | {id, title, count, userCount, firstSeen, lastSeen}'
```

### 2. Get Issue Details with Latest Event

```bash
curl -s "https://sentry.io/api/0/issues/{issue_id}/events/latest/" \
  -H "Authorization: Bearer $SENTRY_TOKEN" | jq '{
    message: .message,
    timestamp: .dateCreated,
    user: .user,
    tags: .tags,
    contexts: .contexts,
    exception: .entries[] | select(.type == "exception"),
    breadcrumbs: .entries[] | select(.type == "breadcrumbs")
  }'
```

### 3. Analyze and Cross-Reference with Codebase

After fetching error data:
1. Extract file paths and line numbers from stack traces
2. Read the relevant source files
3. Understand the execution flow from breadcrumbs
4. Identify root cause and suggest fix

## API Reference

See [references/sentry-api.md](references/sentry-api.md) for complete endpoint documentation.

## Debugging Patterns

### Pattern 1: High-Frequency Errors
Query by event count to prioritize:
```bash
curl -s "https://sentry.io/api/0/projects/{org}/{project}/issues/?query=is:unresolved&sort=freq" \
  -H "Authorization: Bearer $SENTRY_TOKEN"
```

### Pattern 2: User-Reported Issues
Filter by specific user or search query:
```bash
curl -s "https://sentry.io/api/0/projects/{org}/{project}/issues/?query=user.email:user@example.com" \
  -H "Authorization: Bearer $SENTRY_TOKEN"
```

### Pattern 3: Specific Error Types
```bash
# JavaScript errors
curl -s "https://sentry.io/api/0/projects/{org}/{project}/issues/?query=error.type:TypeError"

# HTTP errors  
curl -s "https://sentry.io/api/0/projects/{org}/{project}/issues/?query=http.status_code:500"
```

### Pattern 4: Time-Based Investigation
```bash
# Last hour
?statsPeriod=1h

# Specific date range
?start=2024-01-01T00:00:00&end=2024-01-02T00:00:00
```

## Output Format

When presenting findings to user:

1. **Summary**: Error type, frequency, affected users
2. **Stack Trace Analysis**: Key frames with file:line references
3. **Context**: User info, browser/device, request data
4. **Breadcrumbs**: Sequence of events leading to error
5. **Root Cause**: Analysis based on code review
6. **Recommended Fix**: Code changes with rationale

## Tips

- Always check `contexts.browser` and `contexts.os` for environment-specific issues
- Breadcrumbs show the user journey - crucial for reproducing issues
- `tags` often contain custom business context (user tier, feature flags, etc.)
- For React/frontend: check `contexts.react` for component hierarchy
- Event `extra` field may contain custom debug data from the app

Related Skills

sentry-setup-tracing

16
from diegosouzapw/awesome-omni-skill

Setup Sentry Tracing (Performance Monitoring) in any project. Use this when asked to add performance monitoring, enable tracing, track transactions/spans, or instrument application performance. Supports JavaScript, TypeScript, Python, Ruby, React, Next.js, and Node.js.

sentry-setup-metrics

16
from diegosouzapw/awesome-omni-skill

Setup Sentry Metrics in any project. Use this when asked to add Sentry metrics, track custom metrics, setup counters/gauges/distributions, or instrument application performance metrics. Supports JavaScript, TypeScript, Python, React, Next.js, and Node.js.

sentry-setup-logging

16
from diegosouzapw/awesome-omni-skill

Setup Sentry Logging in any project. Use this when asked to add Sentry logs, enable structured logging, setup console log capture, or integrate logging with Sentry. Supports JavaScript, TypeScript, Python, Ruby, React, Next.js, and other frameworks.

sentry-python-setup

16
from diegosouzapw/awesome-omni-skill

Setup Sentry in Python apps. Use when asked to add Sentry to Python, install sentry-sdk, or configure error monitoring for Python applications, Django, Flask, FastAPI.

sentry-python-sdk

16
from diegosouzapw/awesome-omni-skill

Full Sentry SDK setup for Python. Use when asked to "add Sentry to Python", "install sentry-sdk", "setup Sentry in Python", or configure error monitoring, tracing, profiling, logging, metrics, crons, or AI monitoring for Python applications. Supports Django, Flask, FastAPI, Celery, Starlette, AIOHTTP, Tornado, and more.

openclaw-sentry-pro

16
from diegosouzapw/awesome-omni-skill

Full secret scanning suite: detect leaked API keys, tokens, and credentials, then automatically redact, quarantine exposed files, and enforce .gitignore policies. Everything in openclaw-sentry (free) plus automated countermeasures.

nextjs-production-debugger

16
from diegosouzapw/awesome-omni-skill

Advanced debugging guide for Next.js App Router production issues including SSR/CSR bugs, hydration errors, runtime mismatches, performance, and caching.

js-reverse-automation-page-redirect-debugger

16
from diegosouzapw/awesome-omni-skill

页面跳转 JS 代码定位通杀方案:在跳转前触发 debugger 以定位调用源。仅在确认跳转定位需求时启用。

1k-sentry

16
from diegosouzapw/awesome-omni-skill

Sentry error tracking and monitoring for OneKey. Use when configuring Sentry, filtering errors, analyzing crash reports, or debugging production issues. Covers platform-specific setup (desktop/mobile/web/extension) and error filtering strategies.

1k-sentry-analysis

16
from diegosouzapw/awesome-omni-skill

Analyze and fix production errors from Sentry crash reports. Use when investigating AppHang, ANR, crashes, or production errors. Includes complete workflow from JSON analysis to bug fix implementation with evidence-based methodology. Triggers on sentry, crash, AppHang, ANR, error analysis, production error, bug analysis, crash report, freeze, hang, not responding, stacktrace, breadcrumbs, exception.

browser-debugger

16
from diegosouzapw/awesome-omni-skill

Systematically tests UI functionality, validates design fidelity with AI visual analysis, monitors console output, tracks network requests, and provides debugging reports using Chrome DevTools MCP. Use after implementing UI features, for design validation, when investigating console errors, for regression testing, or when user mentions testing, browser bugs, console errors, or UI verification.

sentry-setup-ai-monitoring

16
from diegosouzapw/awesome-omni-skill

Setup Sentry AI Agent Monitoring in any project. Use this when asked to add AI monitoring, track LLM calls, monitor AI agents, or instrument OpenAI/Anthropic/Vercel AI/LangChain/Google GenAI. Automatically detects installed AI SDKs and configures the appropriate Sentry integration.