Analyze, validate, and fix issues identified by sentry bot in GitHub Pull Request reviews. Use this when asked to review or address sentry bot comments on PRs.
This skill helps you systematically analyze, validate, and fix issues identified by the sentry automated code review bot in GitHub Pull Requests.
Invoke this skill when:
If PR number is provided:
If NO PR number is provided:
List Recent PRs
gh pr list --limit 10 --json number,title,author,updatedAt,headRefName
Check Each PR for Sentry Comments For the most recent PRs (up to 5), check for sentry bot comments:
gh api repos/{owner}/{repo}/pulls/{pr_number}/comments
Filter for comments from sentry[bot]
Present Options to User If multiple PRs have sentry comments:
Found sentry bot comments on multiple recent PRs:
- PR #42: "Fix authentication flow" (3 sentry comments)
- PR #38: "Update build script" (1 sentry comment)
Which PR would you like me to review? Or should I review all of them?
Default Behavior If only one PR has sentry comments, automatically proceed with that PR. If no recent PRs have sentry comments, inform the user.
Get PR Comments
gh api repos/{owner}/{repo}/pulls/{pr_number}/comments
Look for comments from user sentry[bot] (login: sentry[bot])
Parse Comment Structure Sentry bot comments typically include:
Organize by Priority Sort comments by:
For each comment, systematically verify:
Understand the Context
Verify the Problem
Assess Impact
Risk Matrix
High Severity × High Confidence = FIX IMMEDIATELY
High Severity × Low Confidence = INVESTIGATE THOROUGHLY
Low Severity × High Confidence = FIX IF TIME PERMITS
Low Severity × Low Confidence = LIKELY IGNORE
Before implementing fixes, validate the bot's claim:
Path Resolution Issues
Logic Errors
Build/CI Issues
Create a Reproduction If possible, write a test case or scenario that demonstrates the issue
When you've validated the issue is real:
Checkout PR Branch
git fetch origin pull/{pr_number}/head:temp-branch-name
git checkout temp-branch-name
Apply the Fix
Verify the Fix
Commit the Change
git add <files>
git commit -m "fix: address sentry bot comment - <brief description>
<detailed explanation of what was fixed>
Resolves issue identified by sentry bot.
Severity: <severity>, Confidence: <confidence>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>"
Push to PR Branch
git push origin <branch-name>
Provide a structured summary:
## Sentry Bot Comment Review
### Comment Analysis
- **Location**: file_path:line_number
- **Issue**: <brief description>
- **Severity**: X.X (Critical/Medium/Low)
- **Confidence**: X.X (High/Medium/Low)
### Validation Result
✅ VALID / ❌ FALSE POSITIVE / ⚠️ PARTIALLY VALID
**Analysis**: <your assessment>
### Action Taken
✅ FIXED / ⏭️ SKIPPED / 🔍 NEEDS INVESTIGATION
**Details**: <what you did or why you skipped>
### Impact
<explain what would have happened without the fix>
Pattern: Build scripts move files to wrong locations
Example: mv file.tgz ../../wrong/path/
Validation: Trace the path from the command's working directory
Pattern: Functions that can throw but aren't wrapped in try/catch Validation: Check if calling code handles errors
Pattern: Async operations without proper awaits Validation: Trace async/await chains
Pattern: TypeScript/type errors in builds Validation: Check type definitions and usages
Pattern: Missing or incorrect config files Validation: Check if config is read by the application
Pattern: Exposed secrets, SQL injection, XSS Validation: ALWAYS FIX - verify the vulnerability exists
If you determine a comment is a false positive:
Document Why
Add a Comment to PR
gh pr comment {pr_number} --body "Sentry bot comment at file:line appears to be a false positive because..."
Consider Improving the Code Even if not a bug, unclear code led to the false positive Consider refactoring for clarity
Fetch PR comments: gh api repos/{owner}/{repo}/pulls/{pr_number}/comments
Get PR diff: gh pr diff {pr_number}
Checkout PR: git fetch origin pull/{pr}/head:branch && git checkout branch
Push fix: git push origin {branch-name}
Switch back: git checkout main
For a comprehensive command reference, see QUICKREF.md.
# 1. Fetch comments
gh api repos/codyde/sentryvibe/pulls/38/comments > comments.json
# 2. Analyze each comment
# (use Read tool to view code, validate issues)
# 3. Checkout PR branch
git fetch origin pull/38/head:fix-branch
git checkout fix-branch
# 4. Apply fix
# (use Edit tool)
# 5. Commit and push
git add .
git commit -m "fix: correct path in build script
Fixes path resolution issue identified by sentry bot.
..."
git push origin fix-branch
# 6. Return to main
git checkout main
For detailed real-world examples and scenarios, see EXAMPLES.md.
A successful sentry-reviewer session: