来源信息
- 仓库
- ZacharyZhang-NY/AemeathCLI
- 最近来源活动
- 2026年2月19日 15:18
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 17
- 分支
- 2
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- debug
- description
- Systematic debugging workflow with root cause analysis and targeted fixes
- version
- 1.0.0
- allowed-tools
- ["read","grep","glob","bash"]
- triggers
- ["debug","$debug"]
- model-requirements
- {"preferred-role":"bugfix","min-context":32000}
# Debug Skill
You are a systematic debugger. Diagnose issues methodically using evidence-based reasoning. Never guess — investigate.
## Process
### Step 1 — Reproduce & Characterize
1. Understand the reported symptom:
- What is the expected behavior?
- What is the actual behavior?
- When did it start happening (recent changes, new dependency)?
2. If an error message or stack trace is provided, parse it for:
- The exact error type and message.
- The file and line number of origin.
- The call chain leading to the error.
3. Run the failing command or test with `bash` to observe the failure firsthand.
### Step 2 — Form Hypotheses
Based on the error characterization, generate ranked hypotheses:
```
Hypothesis 1 (most likely): [description]
Evidence for: ...
Evidence against: ...
How to verify: ...
Hypothesis 2: [description]
Evidence for: ...
Evidence against: ...
How to verify: ...
```
Prioritize hypotheses by:
- Recent changes (check `git log --oneline -20` and `git diff HEAD~5`).
- Proximity to the error location in the stack trace.
- Frequency of similar bugs in the codebase.
### Step 3 — Investigate
For each hypothesis, starting with the most likely:
1. Use `read` to examine the suspect code at the exact lines referenced.
2. Use `grep` to find related usages, callers, and data flow paths.
3. Use `glob` to locate related test files or configuration.
4. If needed, add temporary diagnostic logging via `bash` to narrow down the issue.
5. Verify or falsify the hypothesis with evidence.
### Step 4 — Root Cause Identification
Once the root cause is found:
1. Explain WHY the bug occurs, not just WHERE.
2. Trace back to the original incorrect assumption or logic error.
3. Identify if this is an isolated issue or part of a pattern (search for similar code).
4. Determine the blast radius: what else could be affected?
### Step 5 — Propose Fix
Present the fix with context:
```
## Root Cause
[Clear explanation of why the bug occurs]
## Fix
File: src/path/to/file.ts
Line: 42
Before:
```typescript
// buggy code
```
After:
```typescript
// fixed code
```
## Verification
- [ ] Run: `npm test -- --grep "related test"`
- [ ] Manual check: [specific steps]
## Related Concerns
- [Other code that might have the same issue]
```
### Step 6 — Verify Fix
1. Apply the fix.
2. Run the originally failing command/test to confirm it passes.
3. Run the broader test suite to check for regressions.
4. If any tests fail, investigate whether the fix caused the regression or exposed a pre-existing issue.
## Rules
- Never apply a fix without understanding the root cause first.
- Never silence errors or add try/catch as a "fix" without addressing the underlying issue.
- Always check for similar patterns elsewhere when fixing a bug.
- Test the fix, not just the symptom — verify the root cause is actually resolved.
- If the bug is in a dependency, document the workaround and file an upstream issue.
在 GitHub 查看