skills/engineering/sentry-issue-resolver/SKILL.md
Analyze and resolve Sentry issues by fetching detailed issue information, performing deep root cause analysis, and providing actionable solutions. Use when the user asks to: (1) Analyze a Sentry issue, (2) Debug or investigate a Sentry error, (3) Fix a Sentry issue, (4) Get root cause analysis for application errors, (5) Resolve Sentry alerts. Works with Sentry URLs to fetch stack traces, error context, and event data.
npx skillsauth add arctuition/skills sentry-issue-resolverInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Fetch Sentry issues with complete stack traces, analyze root causes, and provide actionable solutions using Sentry REST API.
When the user requests Sentry issue analysis:
Parse the Sentry URL
arcsite from arcsite.sentry.io)7219768209 from /issues/7219768209/)Example URL: https://arcsite.sentry.io/issues/7219768209/?project=1730879
Check Authentication
First verify that SENTRY_AUTH_TOKEN is set in the environment:
echo $SENTRY_AUTH_TOKEN
If not set, inform the user:
"Please set your Sentry auth token: export SENTRY_AUTH_TOKEN=your_token_here"
"You can create a token at: https://sentry.io/settings/account/api/auth-tokens/"
Fetch Event List
Get the list of events for the issue to obtain event IDs:
curl "https://sentry.io/api/0/organizations/<ORG_SLUG>/issues/<ISSUE_ID>/events/" \
-H "Authorization: Bearer $SENTRY_AUTH_TOKEN"
Example:
curl "https://sentry.io/api/0/organizations/arcsite/issues/7219768209/events/" \
-H "Authorization: Bearer $SENTRY_AUTH_TOKEN"
If jq is available, extract event IDs:
curl "..." | jq -r '.[].eventID'
If jq is not available, that's fine - work with the raw JSON response.
Fetch Complete Event Details
Get the full event details including stack trace for the latest event:
curl "https://sentry.io/api/0/organizations/<ORG_SLUG>/issues/<ISSUE_ID>/events/<EVENT_ID>/" \
-H "Authorization: Bearer $SENTRY_AUTH_TOKEN"
Example:
curl "https://sentry.io/api/0/organizations/arcsite/issues/7219768209/events/abc123/" \
-H "Authorization: Bearer $SENTRY_AUTH_TOKEN"
If jq is available, extract stack trace info:
curl "..." | jq -r '.exception.values[]?.stacktrace.frames[] | "\(.filename):\(.lineno) \(.function)"'
The response includes:
exception.values[].stacktrace.frames[] - Complete stack trace with file paths, line numbers, and function namesexception.values[].type and exception.values[].value - Error type and messagetags, user, request - Context datacontext - Additional environment and runtime informationAnalyze the Issue
Provide Deep Root Cause Analysis
Include in the analysis:
Suggest Solutions
Provide 1-2 actionable solutions:
Each solution should include:
Output Format
Structure the response as:
## Sentry Issue Analysis: [ISSUE_ID]
### Error Summary
[Brief description of what went wrong]
### Root Cause
[Deep analysis of why this happened]
### Context
- Frequency: [how often it occurs]
- Affected: [users, endpoints, environments]
- Trigger: [what action causes it]
### Impact
[Severity and user experience impact]
### Code Location
[File paths and line numbers from stack trace]
### Suggested Solutions
#### Solution 1: [Direct Fix]
[Description and implementation]
#### Solution 2: [Alternative/Preventive]
[Description and implementation]
List events for an issue (get event IDs):
curl "https://sentry.io/api/0/organizations/<ORG_SLUG>/issues/<ISSUE_ID>/events/" \
-H "Authorization: Bearer $SENTRY_AUTH_TOKEN"
With jq to extract just the event IDs:
curl "https://sentry.io/api/0/organizations/<ORG_SLUG>/issues/<ISSUE_ID>/events/" \
-H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
| jq -r '.[].eventID'
Get complete event details (including stack trace):
curl "https://sentry.io/api/0/organizations/<ORG_SLUG>/issues/<ISSUE_ID>/events/<EVENT_ID>/" \
-H "Authorization: Bearer $SENTRY_AUTH_TOKEN"
With jq to extract stack trace:
curl "https://sentry.io/api/0/organizations/<ORG_SLUG>/issues/<ISSUE_ID>/events/<EVENT_ID>/" \
-H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
| jq -r '.exception.values[]?.stacktrace.frames[] | "\(.filename):\(.lineno) \(.function)"'
Extract specific information with jq (optional):
# Get error message
jq -r '.exception.values[0].value'
# Get error type
jq -r '.exception.values[0].type'
# Get user context
jq -r '.user'
# Get request info
jq -r '.request'
Note: jq is optional. If the user doesn't have jq installed, work with the raw JSON response directly.
When jq is available:
When jq is NOT available:
exception.values[].type - Error typeexception.values[].value - Error messageexception.values[].stacktrace.frames[] - Stack trace framesfilename, lineno, function, context_line, pre_context, post_contextTypical Workflow:
exception.values[0].stacktrace.framescontext_line, pre_context, and post_context for code context around the errorCommon Error Patterns:
Root Cause Techniques:
export SENTRY_AUTH_TOKEN=your_token_herebrew install jq (macOS) or apt-get install jq (Linux)data-ai
Wrap up the work you just did and open a PR for it — branch off main/master if needed, commit only the changes you made, push, open a pull request (following .github/PULL_REQUEST_TEMPLATE.md when present), and open the PR in the browser. Targets the `upstream` remote's default branch as the base when an `upstream` remote exists, otherwise `origin`. Use when the user says "sign off", "signoff", "ship it", "open a PR for this", "commit and PR", or "wrap this up".
development
Produce a single-file HTML "thread recap" artifact that captures what was discussed in an agent / pairing / chat conversation — the questions explored, the decisions made and their tradeoffs, the dead ends we walked into, the open questions left, and the artifacts produced — so a teammate who wasn't in the room can pick up the context. Use this skill whenever the user asks to summarize a conversation/thread/session, mentions sharing a thread with colleagues, says things like "把这个对话总结一下", "share this thread with the team", "write up what we decided", "decision log for this conversation", "document the tradeoffs we made", "recap of our pairing session", or wants to hand off a Claude/ChatGPT/agent transcript as context. Trigger even when "HTML" isn't said — the artifact format is the whole point. Input can be the current session's own conversation context OR a transcript the user pastes in.
development
Produce a single-file HTML "PR writeup" artifact that explains a pull request to its reviewers — motivation, before/after behavior, file-by-file tour with the reasoning, where to focus the review, test plan, and rollout. Use this skill whenever the user is about to open a PR, has just finished a branch, mentions writing a PR description, asks for a PR write-up, says things like "explain this change to my team", "help me pitch this PR", "write the PR description", "summarize what I'm shipping", or wants to make sure reviewers understand intent and risk before they read the diff. Trigger even when they don't say "HTML" — the artifact format is the whole point and the user should not have to ask for it by name.
development
Produce a single-file HTML "code review companion" artifact that helps a reviewer get oriented in someone else's pull request — a risk-coloured map of every file, an annotated diff with margin notes and severity tags, the call-graph that shows how the changed pieces fit together, and the questions worth asking the author. Use this skill whenever the user is about to review a PR, has been assigned one, mentions reviewing code they didn't write, says things like "help me review this", "I need to review PR