Awesome-omni-skill 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.
git clone https://github.com/diegosouzapw/awesome-omni-skill
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/development/sentry-debugger" ~/.claude/skills/diegosouzapw-awesome-omni-skill-sentry-debugger && rm -rf "$T"
skills/development/sentry-debugger/SKILL.mdSentry Debugger
Debug production issues by fetching and analyzing error data from Sentry's API.
Prerequisites
- Sentry API auth token with
,project:read
,event:read
scopesissue:read - Organization slug and project slug(s)
Authentication
Uses the same auth as
sentry-cli. Priority order:
file (INI format with~/.sentryclirc
section)[auth]
environment variableSENTRY_AUTH_TOKEN
To extract token from sentryclirc:
SENTRY_AUTH_TOKEN=$(grep -A1 '^\[auth\]' ~/.sentryclirc | grep '^token=' | cut -d'=' -f2)
Or use sentry-cli directly for auth verification:
sentry-cli info # Verify auth is working
Core Workflow
1. Fetch Recent Issues
# 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
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:
- Extract file paths and line numbers from stack traces
- Read the relevant source files
- Understand the execution flow from breadcrumbs
- Identify root cause and suggest fix
API Reference
See references/sentry-api.md for complete endpoint documentation.
Debugging Patterns
Pattern 1: High-Frequency Errors
Query by event count to prioritize:
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:
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
# 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
# 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:
- Summary: Error type, frequency, affected users
- Stack Trace Analysis: Key frames with file:line references
- Context: User info, browser/device, request data
- Breadcrumbs: Sequence of events leading to error
- Root Cause: Analysis based on code review
- Recommended Fix: Code changes with rationale
Tips
- Always check
andcontexts.browser
for environment-specific issuescontexts.os - Breadcrumbs show the user journey - crucial for reproducing issues
often contain custom business context (user tier, feature flags, etc.)tags- For React/frontend: check
for component hierarchycontexts.react - Event
field may contain custom debug data from the appextra