跳到正文
Skillpedia
部署与云(DevOps)16k · #10844

investigate-production

它能做什么

这个技能利用 Sazabi 的日志,以真实的证据解释生产环境的错误。适合需要回答哪里坏了、为什么坏、影响了谁的人。

适用场景

  • ✓当用户报告生产环境出错,或某个接口变慢或失败的时候。
  • ✓当告警触发,你需要知道实际发生了什么的时候。
  • ✓当某个东西停止工作,你需要知道之前有什么改动的时候。

技能链接

https://github.com/ParadevAI/Paradev/blob/main/plugins/sazabi/skills/investigate-production/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ParadevAI/Paradev/blob/main/plugins/sazabi/skills/investigate-production/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“用户说结账从今天早上开始一直失败。请用我们的生产日志告诉我哪里失败了、为什么失败,以及影响了谁。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会检查 Sazabi 中是否已经有关于该问题的问题单或讨论串,然后向日志提出精确的问题。它会阅读支持每个答案的日志行,然后对哪里失败以及影响了谁作出判断。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Investigate with the logs, not the guess

Sazabi stores your logs, traces and metrics and answers questions about them. The job is to turn "something is broken" into a claim about what fails, why, and who it hits, backed by real log lines, before anyone edits code.

0. How the tools work

The Sazabi MCP server lists only two tools, search and execute. Browse Sazabi's operations with search and namespace: "sazabi" (an empty query without a namespace lists connected connectors, not Sazabi operations). Before calling one, repeat search with namespace: "sazabi", the hit's full name as the query, and includeInputSchema: true to load its arguments. Then run it with execute as { name, arguments }, the name copied from the hit (for example sazabi/logs.ask).

Most operations work on one project. If the user did not name one and more than one exists, ask which, or pick the one whose name matches this repository.

1. Start from what is already known

Run sazabi/issues.search for the symptom. Sazabi opens issues on its own when it sees new or growing errors, so the bug may already have a title, a severity, and a first-seen time. Then run sazabi/search.threads for the same words: a teammate or the Sazabi agent may already have investigated it.

Treat search hits as candidates. Match on the error and the code path, not on title similarity.

2. Ask the logs one precise question at a time

sazabi/logs.ask takes a question in plain language and returns an answer, an explanation of what it measured, the window, and a queryId.

  • Open with an overview when you do not know where to look yet: "what is broken in the last hour", "what changed since yesterday's deploy". It returns the kinds of log lines in the window, with counts against the window before and example lines.
  • Then narrow to questions with one answer: "how many 5xx did POST /api/checkout return per 5 minutes over the last 6 hours", "which customer IDs saw PaymentTimeout today", "show the 20 most recent lines for trace id abc123".
  • Read explanation and window every time. An answer over the wrong service, window or field is confidently wrong.

3. Read the lines, then the code

Pull the actual log lines for the failure, including the requests just before it. Find the first line this repository emits on the failing path, then open that code in the working tree. Production runs a release: check the version or commit in the logs against the branch before you trust line numbers.

Before you propose a cause, check what the failures have in common: one endpoint, one tenant, one region, one release, one upstream? A failure scoped to a dimension names its own trigger. A failure that starts at a deploy points at that deploy's diff.

4. Report cause, scope, and blast radius

Write three sentences: what fails, why, and who it hits (volume, affected customers, since when). Quote the log lines and the question you asked, so the user can rerun it. Only then, if asked, fix the code you found.

Anti-patterns

  • Fixing the first error you see. The loudest line is often a downstream retry, not the cause.
  • One overview, no follow-up. An overview finds where to look; it is not the evidence.
  • Trusting an answer without its window. "No errors" over the last 5 minutes says nothing about the outage an hour ago.
  • Pasting secrets from logs. Log lines can hold tokens and personal data. Quote only what the finding needs.
常见问题

它在调查时会修改代码吗?

不会。技能先从日志和问题单入手,在原因明确之前不会修改代码。

如果有多个项目怎么办?

如果你没有指定项目,它会询问使用哪一个,或选择与当前代码库匹配的那个。

如果我对原因有猜测呢?

不会被直接采纳。它会把症状与原因区分开,并用日志行为每一项结论提供依据。

详情

作者的原始描述

Find out what is actually happening in production from Sazabi's logs, traces and issues before touching code — ask the logs a precise question, read the lines behind the answer, and separate the symptom from its cause. Use when the user reports a production error, a slow or failing endpoint, a customer complaint, an alert, or asks what is broken, what changed, or why something stopped working.

repo: ParadevAI/Paradev

热度

GitHub 星标
16k
排名
#10844
许可证
—
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能