.agents/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 nikolovlazar/dotfiles 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]
tools
Guide for using the Sentry CLI to interact with Sentry from the command line. Use when the user asks about viewing issues, events, projects, organizations, making API calls, or authenticating with Sentry via CLI.
development
Fix production issues and review code with Sentry context. Use when asked to fix Sentry errors, debug issues, triage exceptions, review PR comments from Sentry, or resolve bugs.
development
Setup Sentry AI Agent Monitoring in any project. Use when asked to monitor LLM calls, track AI agents, or instrument OpenAI/Anthropic/Vercel AI/LangChain/Google GenAI/Pydantic AI. Detects installed AI SDKs and configures appropriate integrations.
development
Upgrade the Sentry JavaScript SDK across major versions. Use when asked to upgrade Sentry, migrate to a newer version, fix deprecated Sentry APIs, or resolve breaking changes after a Sentry version bump.