sentry-pr-code-review by getsentry/sentry-for-ai
npx skills add https://github.com/getsentry/sentry-for-ai --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}'
机器人登录名是 — 不是 或 。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
seer-by-sentry[bot]sentry[bot]sentry-io[bot]如果未提供 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 标志 |
| 类别 | 示例 |
|---|---|
| 类型安全 | 缺少空值检查、不安全的类型断言 |
| 错误处理 | 被吞没的错误、缺少边界 |
| 验证 | 过于宽松的输入、缺少清理 |
| 配置 | 缺少环境变量、路径不正确 |
每周安装量
262
仓库
GitHub 星标数
83
首次出现
2026年3月1日
安全审计
安装于
codex259
gemini-cli255
cursor255
github-copilot255
amp254
kimi-cli254
All Skills > Workflow > PR Code Review
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
262
Repository
GitHub Stars
83
First Seen
Mar 1, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
codex259
gemini-cli255
cursor255
github-copilot255
amp254
kimi-cli254
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
140,500 周安装
Docassemble 表单构建器技能 - 创建智能动态问卷与文档生成工具
257 周安装
Fastify TypeScript 生产级后端框架指南:高性能 Node.js Web 开发与 JSON 模式验证
257 周安装
AI 演示文稿生成器 | 一键创建专业幻灯片,支持 Marp 格式输出
257 周安装
Mapbox搜索模式指南:地理编码、POI搜索与位置发现最佳实践
257 周安装
Zustand适配器:为json-render提供状态管理后端,支持嵌套切片与Zustand v5+
257 周安装
Blender MCP 插件使用指南:3D 场景自动化与 Python 脚本控制教程
257 周安装