Sentry Audit Skill
This skill minimizes token usage while extracting actionable crash data from the Sentry REST API and mapping it to the local codebase.
Execution Steps:
Fetch Unresolved Issues: Run a
curlcommand against the Sentry API to fetch unresolved issues. Extract ONLY theid,shortId,title, andculprit.curl -s -H 'Authorization: Bearer <SENTRY_TOKEN>' "https://sentry.io/api/0/projects/af-developments/shizukuplus/issues/?query=is:unresolved" | jq -c '.[] | {id, shortId, title, culprit}'Note: Do NOT fetch the full JSON dump into context; it is massive and wastes tokens.
Fetch Stack Trace for Top Issue: Pick the highest priority issue ID and fetch its exact stack trace.
curl -s -H 'Authorization: Bearer <SENTRY_TOKEN>' "https://sentry.io/api/0/issues/<ISSUE_ID>/events/latest/" | jq -r '.entries[] | select(.type=="exception") | .data.values[].stacktrace.frames[] | "\(.filename):\(.lineNo) - \(.function)"'Note: Using
jqfilters the payload down to just filename, line number, and function, drastically saving context space.Map to Codebase: Use the
grep_searchtool to find the corresponding file inmanager/src/main/based on the.filenamefrom the stack trace.Repair: Analyze the bug and use the
replace_file_contentormulti_replace_file_contenttool to patch the error.Resolve via API: Once pushed to master, automatically resolve the issue on Sentry:
curl -s -X PUT -H 'Authorization: Bearer <SENTRY_TOKEN>' -H "Content-Type: application/json" -d '{"status":"resolved"}' "https://sentry.io/api/0/issues/<ISSUE_ID>/"