Skip to main content
ClaudeWave
Skill822 repo starsupdated 5d ago

diagnose

The diagnose skill provides a structured approach for investigating difficult bugs and performance degradation issues. Use it when users report failures, errors, hangs, or performance regressions, particularly when problems are intermittent or environment-dependent. It prioritizes establishing reproducible feedback loops through tests and scripts before making changes, validates assumptions with targeted logging rather than broad instrumentation, and fixes root causes before writing regression tests.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/Haohao-end/openagent /tmp/diagnose && cp -r /tmp/diagnose/api/internal/core/skills/catalog/diagnose ~/.claude/skills/diagnose
Then start a new Claude Code session; the skill loads automatically.

skill.md

# 诊断

这是一个面向疑难 bug 和性能退化的诊断技能。

## 适用场景

- 用户明确说“坏了”“报错了”“卡住了”“性能变差了”
- 需要排查回归、间歇性失败或环境相关问题
- 需要把猜测收敛成可复现的证据

## 工作方式

1. 先建立反馈回路:优先写失败测试、curl 脚本、CLI fixture、Playwright 或 throwaway harness。
2. 再复现问题,确保看到的是同一个失败,而不是附近的另一个失败。
3. 用最少的日志和最强的信号验证假设,避免“log everything and grep”。
4. 先修复根因,再写回归测试锁住行为。

## 约束

- 没有反馈回路就不要急着下结论。
- 不能复现时,必须明确说明已经尝试了什么。
- 性能问题先测量,再修改。