
Sentry Code Review
Pull Sentry bot feedback on GitHub PRs, interpret severity and line comments, and apply fixes without manually hunting each thread.
Overview
sentry-code-review is an agent skill most often used in Ship (also Operate/errors) that analyzes and resolves line-specific Sentry bot comments on GitHub pull requests.
Install
npx skills add https://github.com/getsentry/sentry-for-ai --skill sentry-code-reviewWhat is this skill?
- Parses Sentry PR comment shape: Bug header, severity, confidence, and collapsible Detailed Analysis / Fix sections
- Works from a specific PR number or discovers recent PRs that already have Sentry feedback
- Child of sentry-workflow with explicit GitHub + Sentry integration context
- Allowed tooling spans Read/Edit/Write, Bash, Grep, Glob, and WebFetch for repo-grounded fixes
- disable-model-invocation: true—intended as an invoked workflow skill, not ambient auto-hook
Adoption & trust: 1.5k installs on skills.sh; 197 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
Sentry posts detailed PR review comments and you lose time translating severity, file, and fix guidance into actual code changes.
Who is it for?
Solo builders using Sentry + GitHub who want an agent to systematically work sentry[bot] threads on active PRs.
Skip if: Repos without Sentry on PRs, non-GitHub workflows, or greenfield features with zero Sentry feedback yet.
When should I use this skill?
When asked to review or fix issues identified by Sentry in GitHub Pull Request comments, including by PR number or by finding recent PRs with Sentry feedback.
What do I get? / Deliverables
Targeted PR fixes aligned with Sentry’s stated bug, analysis, and recommended fix sections, ready for re-review and merge.
- Code edits addressing Sentry PR comments
- Summary of resolved vs outstanding bot threads
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
First appears when you are shipping changes and need PR review remediation tied to production error intelligence—before merge, not during initial ideation. Review is the canonical shelf because the workflow centers on GitHub PR review comments authored by sentry[bot], not on deploying infra or writing marketing copy.
Where it fits
Before merge, you ask the agent to walk every sentry[bot] line comment on PR #42 and patch the flagged Python tool handler.
A recurring Sentry issue was flagged on an open hotfix PR—you use the skill to align the diff with the bot’s Detailed Analysis section.
How it compares
Focused PR comment resolver for Sentry bot output—not a generic linter pass or standalone MCP server.
Common Questions / FAQ
Who is sentry-code-review for?
Developers shipping on GitHub with Sentry PR integrations who need help turning bot review comments into concrete patches.
When should I use sentry-code-review?
In Ship/review when a PR has sentry[bot] comments; in Operate/errors when production issues were caught pre-merge and you are closing the loop on the same PR.
Is sentry-code-review safe to install?
The skill requests broad repo and network tools—confirm scope in your agent settings and review the Security Audits panel on this Prism page before install.
SKILL.md
READMESKILL.md - Sentry Code Review
> [All Skills](../../SKILL_TREE.md) > [Workflow](../sentry-workflow/SKILL.md) > Code Review # Sentry Code Review You are a specialized skill for analyzing and resolving issues identified by **Sentry** in GitHub Pull Request review comments. ## Sentry PR Review Comment Format Sentry posts **line-specific review comments** on code changes in PRs. Each comment includes: ### Comment Metadata (from API) - `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) ### Body Structure The `body` field contains markdown with collapsible sections: **Header:** ``` **Bug:** [Issue description] <sub>Severity: CRITICAL | Confidence: 1.00</sub> ``` **Analysis Section (in `<details>` tag):** ```html <details> <summary>🔍 <b>Detailed Analysis</b></summary> Explains the technical problem and consequences </details> ``` **Fix Section (in `<details>` tag):** ```html <details> <summary>💡 <b>Suggested Fix</b></summary> Proposes a concrete solution </details> ``` **AI Agent Prompt (in `<details>` tag):** ```html <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> ``` ### Example Issues 1. **TypeError from None values** - Functions returning None when list expected - Missing null checks before iterating 2. **Validation Issues** - Too permissive input validation - Allowing invalid data to pass through 3. **Error Handling Gaps** - Errors logged but not re-thrown - Silent failures in critical paths ## Your Workflow ### 1. Fetch PR Comments When given a PR number or URL: ```bash # 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. ### 2. Parse Sentry Comments - **ONLY** process comments from Sentry (username starts with "sentry", e.g., "sentry[bot]") - **IGNORE** comments from "cursor[bot]" or other bots - Extract from each comment: - `file`: The file path being commented on - `line`: The specific line number (if available) - `body`: Parse the markdown/HTML body to extract: - Bug description (from header line starting with "**Bug:**") - Severity level (from `<sub>Severity: X` tag) - Confidence score (from `Confidence: X.XX` in sub tag) - Detailed analysis (text inside `<summary>🔍 <b>Detailed Analysis</b></summary>` details block) - Suggested fix (text inside `<summary>💡 <b>Suggested Fix</b></summary>` details block) - AI Agent prompt (text inside `<summary>🤖 <b>Prompt for AI Agent</b></summary>` details block) ### 3. Analyze Each Issue For each Sentry comment: 1. Note the `file` and `line` from the comment metadata - this tells you exactly where to look 2. Read the specific file mentioned in the comment 3. Navigate to the line number to see the problematic code 4. Read the "🤖 Prompt for AI Agent" section for specific context about the issue 5. Verify if the issue is still present in the current code 6. Understand the root cause from the Detailed Analysis 7. Evaluate the Suggested Fix ### 4. Implement Fixes For each verified issue: 1. Read the affected file(s)