sentry-pr-code-review by getsentry/sentry-agent-skills
npx skills add https://github.com/getsentry/sentry-agent-skills --skill sentry-pr-code-review审查并修复由 Seer(Sentry 出品)在 GitHub PR 评论中指出的问题。
gh CLI重要提示: 下面解析的评论格式基于 Seer 当前的输出。这不是 API 契约,可能会发生变化。请始终验证实际的评论结构。
gh api repos/{owner}/{repo}/pulls/{PR_NUMBER}/comments --paginate \
--jq '.[] | select(.user.login == "seer-by-sentry[bot]") | {file: .path, line: .line, body: .body}'
机器人登录名是 seer-by-sentry[bot] — 不是 sentry[bot] 或 sentry-io[bot]。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
如果未提供 PR 编号,则查找最近包含 Seer 评论的 PR:
gh pr list --state open --json number,title --limit 20 | \
jq -r '.[].number' | while read pr; do
count=$(gh api "repos/{owner}/{repo}/pulls/$pr/comments" --paginate \
--jq '[.[] | select(.user.login == "seer-by-sentry[bot]")] | length')
[ "$count" -gt 0 ] && echo "PR #$pr: $count Seer comments"
done
从 Markdown 正文中提取:
**Bug:** 开头的行<sub>Severity: X | Confidence: X.XX</sub> 中<summary>🔍 <b>Detailed Analysis</b></summary> 块内<summary>💡 <b>Suggested Fix</b></summary> 块内<summary>🤖 <b>Prompt for AI Agent</b></summary> 块内对于每个问题:
## Seer 审查:PR #[number]
### 已解决
| 文件:行号 | 问题 | 严重性 | 应用的修复 |
|-----------|-------|----------|-------------|
| path:123 | desc | HIGH | what done |
### 已跳过(误报或已修复)
| 文件:行号 | 问题 | 原因 |
|-----------|-------|--------|
**总结:** 解决了 X 个,跳过了 Y 个
| 触发条件 | 时机 |
|---|---|
| PR 设置为"准备审查" | 自动错误预测 |
| PR 准备就绪时推送提交 | 重新运行预测 |
@sentry review 评论 | 手动触发完整审查 + 建议 |
| 草稿 PR | 跳过 — 标记为就绪前不进行审查 |
| 问题 | 解决方案 |
|---|---|
| 未找到 Seer 评论 | 验证仓库是否安装了 Seer GitHub 应用 |
| 机器人名称不匹配 | 登录名是 seer-by-sentry[bot],不是 sentry[bot] |
| 新 PR 上未出现评论 | PR 必须为"准备审查"状态(非草稿) |
gh api 返回部分结果 | 确保包含 --paginate 标志 |
| 类别 | 示例 |
|---|---|
| 类型安全 | 缺少空值检查、不安全的类型断言 |
| 错误处理 | 被吞没的错误、缺少边界 |
| 验证 | 过于宽松的输入、缺少清理 |
| 配置 | 缺少环境变量、路径不正确 |
每周安装数
286
仓库
GitHub 星标数
19
首次出现
2026 年 1 月 20 日
安全审计
安装于
opencode260
codex258
gemini-cli253
github-copilot247
cursor242
claude-code223
Review and fix issues identified by Seer (by Sentry) in GitHub PR comments.
gh CLI installed and authenticatedImportant: The comment format parsed below is based on Seer's current output. This is not an API contract and may change. Always verify the actual comment structure.
gh api repos/{owner}/{repo}/pulls/{PR_NUMBER}/comments --paginate \
--jq '.[] | select(.user.login == "seer-by-sentry[bot]") | {file: .path, line: .line, body: .body}'
The bot login isseer-by-sentry[bot] — not sentry[bot] or sentry-io[bot].
If no PR number is given, find recent PRs with Seer comments:
gh pr list --state open --json number,title --limit 20 | \
jq -r '.[].number' | while read pr; do
count=$(gh api "repos/{owner}/{repo}/pulls/$pr/comments" --paginate \
--jq '[.[] | select(.user.login == "seer-by-sentry[bot]")] | length')
[ "$count" -gt 0 ] && echo "PR #$pr: $count Seer comments"
done
Extract from the markdown body:
**Bug:**<sub>Severity: X | Confidence: X.XX</sub><summary>🔍 <b>Detailed Analysis</b></summary> block<summary>💡 <b>Suggested Fix</b></summary> block<summary>🤖 <b>Prompt for AI Agent</b></summary> blockFor each issue:
## Seer Review: PR #[number]
### Resolved
| File:Line | Issue | Severity | Fix Applied |
|-----------|-------|----------|-------------|
| path:123 | desc | HIGH | what done |
### Skipped (false positive or already fixed)
| File:Line | Issue | Reason |
|-----------|-------|--------|
**Summary:** X resolved, Y skipped
| Trigger | When |
|---|---|
| PR set to "Ready for Review" | Automatic error prediction |
| Commit pushed while PR is ready | Re-runs prediction |
@sentry review comment | Manual trigger for full review + suggestions |
| Draft PR | Skipped — no review until marked ready |
| Issue | Solution |
|---|---|
| No Seer comments found | Verify the Seer GitHub App is installed on the repo |
| Bot name mismatch | The login is seer-by-sentry[bot], not sentry[bot] |
| Comments not appearing on new PRs | PR must be "Ready for Review" (not draft) |
gh api returns partial results | Ensure --paginate flag is included |
| Category | Examples |
|---|---|
| Type Safety | Missing null checks, unsafe type assertions |
| Error Handling | Swallowed errors, missing boundaries |
| Validation | Permissive inputs, missing sanitization |
| Config | Missing env vars, incorrect paths |
Weekly Installs
286
Repository
GitHub Stars
19
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
opencode260
codex258
gemini-cli253
github-copilot247
cursor242
claude-code223
前端代码审计工具 - 自动化检测可访问性、性能、响应式设计、主题化与反模式
33,700 周安装