skills/sentry-code-review/SKILL.md
Analyze and resolve Sentry comments on GitHub Pull Requests. Use this when asked to review or fix issues identified by Sentry in PR comments. Can review specific PRs by number or automatically find recent PRs with Sentry feedback.
npx skillsauth add getsentry/sentry-for-claude sentry-code-reviewInstall 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.
All Skills > Workflow > Code Review
You are a specialized skill for analyzing and resolving issues identified by Sentry in GitHub Pull Request review comments.
Sentry posts line-specific review comments on code changes in PRs. Each comment includes:
author: The bot username (e.g., "sentry[bot]")file: The specific file being commented on (e.g., "src/sentry/seer/explorer/tools.py")line: The line number in the code (can be null for file-level comments)body: The full comment content (markdown with HTML details tags)The body field contains markdown with collapsible sections:
Header:
**Bug:** [Issue description]
<sub>Severity: CRITICAL | Confidence: 1.00</sub>
Analysis Section (in <details> tag):
<details>
<summary>🔍 <b>Detailed Analysis</b></summary>
Explains the technical problem and consequences
</details>
Fix Section (in <details> tag):
<details>
<summary>💡 <b>Suggested Fix</b></summary>
Proposes a concrete solution
</details>
AI Agent Prompt (in <details> tag):
<details>
<summary>🤖 <b>Prompt for AI Agent</b></summary>
Specific instructions for reviewing and fixing the issue
Includes: Location (file#line), Potential issue description
</details>
TypeError from None values
Validation Issues
Error Handling Gaps
When given a PR number or URL:
# Get PR review comments (line-by-line code comments) using GitHub API
gh api repos/{owner}/{repo}/pulls/<PR_NUMBER>/comments --jq '.[] | select(.user.login | startswith("sentry")) | {author: .user.login, file: .path, line: .line, body: .body}'
Or fetch from the PR URL directly using WebFetch.
file: The file path being commented online: The specific line number (if available)body: Parse the markdown/HTML body to extract:
<sub>Severity: X tag)Confidence: X.XX in sub tag)<summary>🔍 <b>Detailed Analysis</b></summary> details block)<summary>💡 <b>Suggested Fix</b></summary> details block)<summary>🤖 <b>Prompt for AI Agent</b></summary> details block)For each Sentry comment:
file and line from the comment metadata - this tells you exactly where to lookFor each verified issue:
After analyzing and fixing issues, provide a report:
## Sentry Code Review Summary
**PR:** #[number] - [title]
**Sentry Comments Found:** [count]
### Issues Resolved
#### 1. [Issue Title] - [SEVERITY]
- **Confidence:** [score]
- **Location:** [file:line]
- **Problem:** [brief description]
- **Fix Applied:** [what you did]
- **Status:** Resolved
#### 2. [Issue Title] - [SEVERITY]
- **Confidence:** [score]
- **Location:** [file:line]
- **Problem:** [brief description]
- **Fix Applied:** [what you did]
- **Status:** Resolved
### Issues Requiring Manual Review
#### 1. [Issue Title] - [SEVERITY]
- **Reason:** [why manual review is needed]
- **Recommendation:** [suggested approach]
### Summary
- **Total Issues:** [count]
- **Resolved:** [count]
- **Manual Review Required:** [count]
development
Decide which Sentry signal to reach for when instrumenting code — error, span, span attribute, log, or metric. Use when adding instrumentation and unsure whether something should be a log vs a span vs a metric, when deciding "what to instrument where", when reviewing instrumentation for gaps, or when a coding agent needs a rule for choosing between errors, traces, logs, and metrics. This skill decides WHAT to emit; the sentry-*-sdk skills handle HOW to set each pillar up.
development
Full Sentry SDK setup for React Native and Expo. Use when asked to "add Sentry to React Native", "install @sentry/react-native", "setup Sentry in Expo", or configure error monitoring, tracing, profiling, session replay, or logging for React Native applications. Supports Expo managed, Expo bare, and vanilla React Native.
development
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.
development
Configure specific Sentry features beyond basic SDK setup. Use when asked to monitor AI/LLM calls, set up OpenTelemetry pipelines, or create alerts and notifications.