重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
fix-sentry-issues by brianlovin/claude-config
npx skills add https://github.com/brianlovin/claude-config --skill fix-sentry-issuesSentry 错误本身不是问题,它只是一个信号。
你的目标不是关闭 Sentry 工单。你的目标是发现根本原因,理解应用程序哪里出了问题,并修复潜在的缺陷。正确完成这些工作后,关闭 Sentry 工单只是自然而然的结果。
要问 "为什么会失败?" ——而不是 "如何让 Sentry 安静下来?" 永远不要将日志级别调整视为修复。回退路径意味着用户体验降级;要追踪主路径失败的原因并在上游修复它。
catch (error) 中的 error 或剥离状态码。这些数据是你理解失败原因的关键。日志级别降级仅适用于真正预期的情况(例如,可选列缺失、资源已删除)——不适用于有回退路径的失败情况。
使用 Sentry MCP(先用 ToolSearch 加载工具):find_organizations → → ,附带 。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
find_projectssearch_issuesnaturalLanguageQuery: "all unresolved issues sorted by events"建立一个分类表格。操作仅限 调查 或 忽略:
| ID | 标题 | 事件数 | 操作 | 原因 |
|---|---|---|---|---|
| PROJ-A | 保存时出错 | 14 | 调查 | 面向用户的保存失败 |
| PROJ-B | GM_register... | 3 | 忽略 | Greasemonkey 扩展 |
调查: 多次事件、用户体验降级、高频警告、每次运行都重现。忽略: 浏览器扩展代码、ChunkLoadError(可自行恢复)、单次事件的瞬态错误、已修复的问题。
应用:mcp__sentry__update_issue(..., status: "ignored") 或对已修复的问题使用 status: "resolved"。
按顺序执行以下步骤。不要跳过或批量处理问题。
获取事件级别数据 — 问题摘要会隐藏细节。使用 get_issue_details 和 search_issue_events,附带 naturalLanguageQuery: "all events with extra data"。提取:URL、参数、堆栈跟踪、状态码、时间戳。
交叉参考 Axiom — 事件包含 traceId。运行 axiom query "['shiori-events'] | where traceId == '<traceId>'" -f json 以获取相关上下文(authMethod、client_version、请求元数据)。
阅读失败的代码路径 — 跟随堆栈跟踪。阅读每个文件。在提出更改前先理解代码。
向上游追踪输入路径 (最常被跳过,也最重要) — 什么数据到达了失败函数?这些数据是否本就不应到达此路径?是否存在缺失的过滤器?输入是否错误(二进制 URL、重定向、格式错误)?我们能否在上游阻止错误输入?
复现 — 使用 Sentry 中实际失败的输入。用完全相同的数据调用函数。对超时的 URL 执行 fetch()。验证你的理解。
确定根本原因 — 为什么这个输入会失败?为什么它会到达这个路径?正确的修复方法是什么?(例如,"在发送到 Firecrawl 之前过滤二进制 URL"——而不是"抑制日志")
| 模式 | 真正的修复方法 |
|---|---|
| 外部 API 对某些 URL 失败 | 在发送前过滤/验证输入 |
| 超时 | 调查是什么导致缓慢;调整超时时间或输入大小 |
| 数据库"无效的 json" | 在插入前进行清理 |
| 定时任务中的陈旧引用 | 检测陈旧性,自动清理 |
每个问题一个分支。git checkout main && git pull && git checkout -b fix/<描述性名称>
每周安装次数
43
代码仓库
GitHub 星标数
275
首次出现
13 天前
安全审计
安装于
claude-code31
codex24
github-copilot23
cursor23
opencode21
gemini-cli20
The Sentry error is not the problem. It's a signal.
Your goal is not to close the Sentry issue. Your goal is to discover the root cause, understand what's wrong with the application, and fix the underlying defect. Closing the Sentry issue is a side effect of doing that correctly.
Ask "Why does this fail?" — not "How do I make Sentry quiet?" Never treat log level changes as fixes. A fallback path means degraded user experience; trace why the primary path fails and fix it upstream.
error from catch (error) or strip status codes. That data is how you understand failures.Log level downgrade is valid ONLY for genuinely expected states (e.g., optional column missing, resource deleted) — NOT for failures with fallbacks.
Use Sentry MCP (ToolSearch first to load tools): find_organizations → find_projects → search_issues with naturalLanguageQuery: "all unresolved issues sorted by events".
Build a triage table. Action = Investigate or Ignore only:
| ID | Title | Events | Action | Reason |
|---|---|---|---|---|
| PROJ-A | Error in save | 14 | Investigate | User-facing save failure |
| PROJ-B | GM_register... | 3 | Ignore | Greasemonkey extension |
Investigate: multiple events, degraded user experience, high-volume warnings, recurring on every run. Ignore: browser extension code, ChunkLoadError (self-resolving), single-event transients, already fixed.
Apply: mcp__sentry__update_issue(..., status: "ignored") or status: "resolved" for already-fixed.
Work through these steps in order. Do not skip or batch issues.
Pull event-level data — Issue summaries hide details. Use get_issue_details and search_issue_events with naturalLanguageQuery: "all events with extra data". Extract: URLs, params, stack traces, status codes, timestamps.
Cross-reference Axiom — Events have traceId. axiom query "['shiori-events'] | where traceId == '<traceId>'" -f json for surrounding context (authMethod, client_version, request metadata).
Read the failing code path — Follow the stack trace. Read every file. Understand before proposing changes.
Trace the input path upstream (most often skipped, most important) — What data reaches the failing function? Should it have reached this path at all? Is there a missing filter? Is the input wrong (binary URL, redirect, bad format)? Can we prevent bad inputs upstream?
Reproduce — Use actual failing inputs from Sentry. Call the function with exact data. fetch() the URLs that timed out. Verify your understanding.
| Pattern | Real Fix |
|---|---|
| External API fails on certain URLs | Filter/validate inputs before sending |
| Timeout | Investigate what's slow; adjust timeout or input size |
| DB "invalid json" | Sanitize before insert |
| Stale reference on cron | Detect staleness, auto-clean |
One branch per issue. git checkout main && git pull && git checkout -b fix/<descriptive-name>
Weekly Installs
43
Repository
GitHub Stars
275
First Seen
13 days ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
claude-code31
codex24
github-copilot23
cursor23
opencode21
gemini-cli20
Dogfood - Vercel Labs 自动化 Web 应用探索与问题报告工具
20,800 周安装
Mermaid序列图创建器 - 自动化生成专业图表代码,提升视觉内容创作效率
44 周安装
产品头脑风暴工具:从产品经理、设计师、工程师多视角生成创意,筛选最佳方案
417 周安装
Spring缓存单元测试指南:@Cacheable、@CacheEvict、@CachePut测试方法与内存缓存管理器
412 周安装
Spring ApplicationEvent单元测试指南:JUnit 5测试事件发布与监听器
412 周安装
AWS SDK Java 2.x DynamoDB 开发指南:增强客户端、事务与Spring Boot集成
412 周安装
uCharts图表库使用指南:uni-app/微信小程序/H5跨平台数据可视化教程
44 周安装
Identify root cause — Why does this input fail? Why does it reach this path? What's the right fix? (e.g., "Filter binary URLs before Firecrawl" — not "suppress the log")