---
id: gh-safe-debug
name: "safe-debug"
url: https://skills.yangsir.net/skill/gh-safe-debug
author: lllllllama
domain: ai-system-observability-sre
tags: ["deep-learning", "debugging", "troubleshooting", "ai-research", "code-diagnosis"]
install_count: 330200
rating: 4.90 (120 reviews)
github: https://github.com/lllllllama/rigorpilot-skills/tree/main/skills/safe-debug
---

# safe-debug

> 此技能专为深度学习研究工作中的调试与审计设计。当用户遇到追溯错误、终端报错、CUDA OOM、检查点加载失败、形状不匹配或训练故障等问题时，该 Skill 能提供保守的诊断和最小化的修复建议，且明确区分调试修复与研究贡献，从而帮助用户快速定位并解决问题，保障研究流程的严谨性与效率。

**Stats**: 330,200 installs · 4.9/5 (120 reviews)

## Before / After 对比

### 深度学习错误诊断效率

**Before**:

在没有此技能之前，开发者在深度学习研究中遇到复杂错误时，需要手动耗费大量时间分析堆栈跟踪、日志和代码，以定位根本原因。这不仅效率低下，还可能在调试过程中无意引入新的问题或混淆研究成果，导致项目延期。

**After**:

该 Skill 能够快速诊断深度学习错误，提供精确且最小化的修复建议，并明确区分调试与研究贡献。此技能显著缩短了故障排除时间，降低了引入新错误的风险，并确保了研究代码的纯净性，极大地提升了开发者的工作效率和研究质量。

| Metric | Before | After | Change |
|---|---|---|---|
| 诊断时间 | 120分钟 | 15分钟 | -88% |

## Readme

# safe-debug

Use this as the Rigor Debug / Rigor Audit skill. The installed slug remains
`safe-debug` for compatibility.

Use the shared operating principles in
`../../references/agent-operating-principles.md`; this skill should guide
conservative diagnosis without blocking the model from finding the local root
cause.

## When to apply

- The user provides a traceback, terminal error, or concrete training or inference failure symptom.
- The user wants diagnosis, root-cause narrowing, and minimal patch suggestions before code is changed.
- The user wants a safe debug flow with explicit human approval before mutation.

## When not to apply

- When the user wants a broad repository walkthrough without an active failure.
- When the task is speculative experimentation or code adaptation.
- When the user is asking for a large refactor or readability rewrite.

## Clear boundaries

- Diagnose first.
- Do not modify repository code by default.
- If a patch is needed, propose the smallest fix and require explicit approval first.
- Escalate savepoint or branch creation before medium-risk or high-risk changes.
- A debug fix is not automatically a research contribution; if it changes
  experiment meaning or comparability, say so explicitly.

## Output expectations

- `debug_outputs/DIAGNOSIS.md`
- `debug_outputs/PATCH_PLAN.md`
- `debug_outputs/status.json`

## Notes

Use `references/debug-policy.md`, `../../references/research-rigor-principles.md`, and the shared `references/research-pitfall-checklist.md`.


---
*Source: https://skills.yangsir.net/skill/gh-safe-debug*
*Markdown mirror: https://skills.yangsir.net/api/skill/gh-safe-debug/markdown*