sentry-triage
它能做什么
这个技能帮助 AI 智能体调查在 Sentry 中报告的错误,无需手动复制堆栈跟踪。适合需要查找新警报或回归问题原因的开发者。
适用场景
- ✓当新的 Sentry 警报出现,你希望智能体进行调查,而不只是重复标题时。
- ✓当某个缺陷似乎在发布后出现,你希望找到可疑提交和文件时。
- ✓当你希望获得未解决的主要错误摘要,并附带复现提示时。
技能链接
https://github.com/composio-community/awesome-codex-skills/blob/master/sentry-triage/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“Sentry 上出现了结账页面的新警报。请帮我调查,并告诉我哪个文件可能是原因。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会通过 Composio 工具获取问题及其最新事件,包括堆栈跟踪和面包屑。然后它会把每个堆栈帧对应到你项目中的源文件,并提出修复方案。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Sentry Triage
Pull Sentry issues, events, and suspect commits straight into the agent via the Composio CLI. Skip the copy-paste-stack-trace dance.
When to Use
- New Sentry alert and you want the agent to investigate, not just quote the subject line.
- Diagnosing a regression: find the releases, suspect commit, and affected files.
- Building a "top 10 unresolved issues" digest with reproduction hints.
Prereqs
curl -fsSL https://composio.dev/install | bash
composio login
composio link sentry # auth token with event:read + project:read
Discover Tools
composio search "get sentry issue" --toolkits sentry
composio search "list events for issue" --toolkits sentry
composio tools list sentry
Common slugs (verify with --get-schema):
SENTRY_GET_AN_ISSUESENTRY_LIST_AN_ISSUES_EVENTSSENTRY_RETRIEVE_AN_EVENT_FOR_A_PROJECTSENTRY_LIST_A_PROJECTS_ISSUESSENTRY_UPDATE_AN_ISSUE
Diagnose a Single Issue
- Fetch the issue (by short ID like
PROJ-1F4or numeric ID):composio execute SENTRY_GET_AN_ISSUE -d '{"issue_id":"PROJ-1F4"}' - Grab the latest event with full stack + breadcrumbs:
composio execute SENTRY_LIST_AN_ISSUES_EVENTS \ -d '{"issue_id":"PROJ-1F4","full":true,"limit":1}' - Map each frame to local source. For each
filename+linenoin the stack, the agent opens the file and reads ±20 lines. No manual copy-paste. - Check suspect commits (Sentry attaches these when release tracking is set up) — open them with
git show <sha>locally. - Propose a fix with a diff, run tests, and — once green — mark the issue resolved:
composio execute SENTRY_UPDATE_AN_ISSUE \ -d '{"issue_id":"PROJ-1F4","status":"resolved","statusDetails":{"inNextRelease":true}}'
Triage a Batch
composio execute SENTRY_LIST_A_PROJECTS_ISSUES -d '{
"organization_slug":"acme",
"project_slug":"api",
"query":"is:unresolved age:-24h",
"sort":"freq",
"limit":20
}'
Pipe into jq for a ranked summary:
composio execute SENTRY_LIST_A_PROJECTS_ISSUES -d '{"organization_slug":"acme","project_slug":"api","query":"is:unresolved"}' \
| jq -r '.[] | "\(.count)\t\(.shortId)\t\(.title)"' | sort -rn | head
Workflow File
scripts/sentry-diag.ts, run with composio run --file scripts/sentry-diag.ts -- --id PROJ-1F4:
const id = process.argv[process.argv.indexOf("--id") + 1];
const issue = await execute("SENTRY_GET_AN_ISSUE", { issue_id: id });
const [event] = await execute("SENTRY_LIST_AN_ISSUES_EVENTS", {
issue_id: id, full: true, limit: 1
});
const frames = (event?.entries ?? [])
.filter(e => e.type === "exception")
.flatMap(e => e.data.values.flatMap(v => v.stacktrace?.frames ?? []))
.filter(f => f.inApp)
.map(f => ({ file: f.filename, line: f.lineno, fn: f.function }));
console.log(JSON.stringify({ title: issue.title, culprit: issue.culprit, frames }, null, 2));
The agent then reads each file at line ± 20 and drafts a patch.
Route to Linear / Slack
Chain tools to open a ticket for the top unresolved issue:
composio run '
const [top] = await execute("SENTRY_LIST_A_PROJECTS_ISSUES", {
organization_slug: "acme", project_slug: "api",
query: "is:unresolved", sort: "freq", limit: 1
});
await execute("LINEAR_CREATE_ISSUE", {
teamId: "TEAM_ID",
title: `[Sentry] ${top.title}`,
description: `Short ID: ${top.shortId}\nPermalink: ${top.permalink}\nCount: ${top.count}`
});
'
Troubleshooting
404 on issue_id→ use the short ID (PROJ-1F4), not the URL slug.- Empty events → the issue was resolved/archived; query with
query:"is:resolved"or bumplimit. - Missing suspect commit → release tracking isn't configured in Sentry; set up
sentry-cli releasesin CI. - No
inAppframes → source maps not uploaded; stack will only show vendor code.
Full CLI reference: docs.composio.dev/docs/cli
常见问题
连接 Sentry 需要什么?
你需要通过 Composio 工具连接 Sentry,使用一个可以读取事件和项目的令牌。
它能读取堆栈跟踪吗?
可以。它会获取包含完整堆栈跟踪和面包屑的最新事件。
它会修改 Sentry 中的问题吗?
该技能包含更新操作,因此当你要求时,它可以修改问题。
详情
作者的原始描述
Diagnose Sentry issues without copy-pasting stack traces. Uses the Composio CLI to pull issue details, events, breadcrumbs, and suspect commits, then maps the frames to local source so the agent can propose a fix directly.
热度
- GitHub 星标
- 17k
- 排名
- #10759
- 许可证
- —
- 更新时间
- 2026/7/25
评论
- …
同一仓库的更多技能
agent-deep-links
17k帮你的智能体制作可点击的链接,直接在 Codex 或 Cursor 等应用中打开某个线程、文件、文件夹或设置。
brand-guidelines
17k帮你的智能体使用 OpenAI 风格的品牌颜色和字体来设计作品,使其与 Codex 的外观和感觉保持一致。
codebase-migrate
17k帮你的智能体规划并执行涉及数百个文件的大型代码迁移,例如框架升级或 API 重命名。
connect-apps
17k让你的智能体在 Gmail、Slack 和 GitHub 等应用中执行真实操作,例如发送邮件或创建问题单。