Community程式設計與開發github.com

ComposioHQ/sentry-triage

診斷 Sentry 問題,無需複製貼上堆疊追蹤。使用 Composio CLI 提取問題詳細資訊、事件、麵包屑和可疑提交,然後將框架對應到本地原始碼,讓 AI 助理可以直接提出修復方案。

sentry-triage 是什麼?

這個技能讓 AI 助理(例如 Claude Code、Coder 或 Codex)能夠直接與 Sentry 互動,診斷錯誤問題,而無需手動複製貼上堆疊追蹤。它透過 Composio CLI 運作,可以提取問題詳細資訊、事件、麵包屑和可疑提交。助理會自動將堆疊追蹤中的每個框架對應到本地原始碼檔案,並讀取相關行數,從而提出修復方案。支援的動作包括取得單一問題、列出事件、更新問題狀態(例如標記為已解決),以及批次處理未解決的問題。這個技能對於處理新 Sentry 警報、診斷回歸問題,或建立「前十大未解決問題」摘要非常有幫助。它也支援與其他工具鏈結,例如自動在 Linear 開立工單或傳送 Slack 通知。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComposioHQ/awesome-codex-skills/tree/main/sentry-triage

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Sentry Triage

透過 Composio CLI 將 Sentry 問題、事件和可疑提交直接提取到 AI 助理中。省去複製貼上堆疊追蹤的繁瑣步驟。

使用時機

  • 出現新的 Sentry 警報,且希望 AI 助理進行調查,而不只是引用主旨行。
  • 診斷回歸問題:找出發布版本、可疑提交和受影響的檔案。
  • 建立「前十大未解決問題」摘要,並附上重現提示。

前置需求

curl -fsSL https://composio.dev/install | bash
composio login
composio link sentry        # 需要 event:read + project:read 權限的驗證 token

探索工具

composio search "get sentry issue" --toolkits sentry
composio search "list events for issue" --toolkits sentry
composio tools list sentry

常見的 slug(請用 --get-schema 驗證):

  • SENTRY_GET_AN_ISSUE
  • SENTRY_LIST_AN_ISSUES_EVENTS
  • SENTRY_RETRIEVE_AN_EVENT_FOR_A_PROJECT
  • SENTRY_LIST_A_PROJECTS_ISSUES
  • SENTRY_UPDATE_AN_ISSUE

診斷單一問題

  1. 取得問題(使用短 ID,例如 PROJ-1F4 或數字 ID):
    composio execute SENTRY_GET_AN_ISSUE -d '{"issue_id":"PROJ-1F4"}'
    
  2. 擷取最新事件,包含完整堆疊和麵包屑:
    composio execute SENTRY_LIST_AN_ISSUES_EVENTS \
      -d '{"issue_id":"PROJ-1F4","full":true,"limit":1}'
    
  3. 將每個框架對應到本地原始碼。 針對堆疊中的每個 filename 和 lineno,AI 助理會開啟檔案並讀取前後 ±20 行。無需手動複製貼上。
  4. 檢查可疑提交(當設定版本追蹤時,Sentry 會附加這些資訊)— 在本機使用 git show <sha> 開啟。
  5. 提出修復方案,附上 diff,執行測試,並在測試通過後將問題標記為已解決:
    composio execute SENTRY_UPDATE_AN_ISSUE \
      -d '{"issue_id":"PROJ-1F4","status":"resolved","statusDetails":{"inNextRelease":true}}'
    

批次處理問題

composio execute SENTRY_LIST_A_PROJECTS_ISSUES -d '{
  "organization_slug":"acme",
  "project_slug":"api",
  "query":"is:unresolved age:-24h",
  "sort":"freq",
  "limit":20
}'

透過管道傳給 jq 以產生排名摘要:

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

工作流程檔案

scripts/sentry-diag.ts,透過 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));

接著,AI 助理會讀取每個 file 的 line ± 20 行,並草擬修補程式。

路由到 Linear / Slack

鏈結工具,為前十大未解決問題開立工單:

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}`
  });
'

問題排除

  • issue_id 出現 404 錯誤 → 使用短 ID(例如 PROJ-1F4),而非 URL slug。
  • 事件為空 → 問題已解決或封存;請使用 query:"is:resolved" 查詢,或增加 limit。
  • 缺少可疑提交 → 未在 Sentry 中設定版本追蹤;請在 CI 中設定 sentry-cli releases。
  • 沒有 inApp 框架 → 未上傳 source map;堆疊只會顯示供應商程式碼。

完整 CLI 參考:docs.composio.dev/docs/cli

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComposioHQ/-21risk-automation

Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/-2chat-automation

Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/ably-automation

Automate Ably tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abstract-automation

Automate Abstract tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abuselpdb-automation

Automate Abuselpdb tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abyssale-automation

Automate Abyssale tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accelo-automation

Automate Accelo tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accredible-certificates-automation

Automate Accredible Certificates tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/acculynx-automation

Automate Acculynx tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/active-campaign-automation

Automate ActiveCampaign tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/addresszen-automation

Automate Addresszen tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adobe-automation

Automate Adobe tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adrapid-automation

Automate Adrapid tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adyntel-automation

Automate Adyntel tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aeroleads-automation

Automate Aeroleads tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aero-workflow-automation

Automate Aero Workflow tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinda-automation

Automate Affinda tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinity-automation

Automate Affinity tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agencyzoom-automation

Automate Agencyzoom tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agent-deep-links

Build, validate, and troubleshoot deep links for Codex, Cursor, VS Code, Visual Studio, and similar tools. Use when users ask for clickable links (especially in Slack) that open threads, files, folders, or app settings.

相關技能