Skip to main content
skill CX Codex

safe-debug — Claude Code skill: what it does, how to install

Conservative failure diagnosis for deep learning research: narrows down root causes and drafts minimal patches without touching code without approval.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add lllllllama/RigorPilot-Skills --skill safe-debug -a claude-code
Open on GitHub

What safe-debug does

The safe-debug skill enforces conservative troubleshooting for deep learning research projects. When training crashes with a CUDA OOM, checkpoint load failure, shape mismatch, or NaN loss, the agent avoids speculative code changes. It diagnoses the local root cause first and documents findings in the debug_outputs/ directory.

The workflow produces debug_outputs/DIAGNOSIS.md, debug_outputs/PATCH_PLAN.md, and debug_outputs/status.json. Code remains untouched by default. If a fix is required, the agent formulates the smallest possible patch and demands explicit user confirmation before applying it. For medium or high-risk edits, it mandates savepoints or git branches.

The core boundary states that a debug fix does not count as a research contribution. If a modification affects experiment comparability or scientific validity, the agent flags it explicitly. The skill is strictly scoped to debugging: broad repo walkthroughs, refactoring, and speculative adaptations are forbidden.

What it helps with

  • Diagnose CUDA OOM and checkpoint loading failures
  • Trace tensor shape mismatches and NaN loss occurrences
  • Generate structured analysis in debug_outputs/DIAGNOSIS.md
  • Prevent unapproved agent modifications to repository files
  • Separate debugging bugfixes from research contributions

Example prompts for the agent

  • Training crashed with a CUDA out of memory error, analyze the traceback with safe-debug without editing files
  • I got a shape mismatch during tensor operations, identify the root cause and write debug_outputs/PATCH_PLAN.md
  • Loss became NaN at step 400, run safe-debug to diagnose the calculation failure

How to install safe-debug

1Skills CLI (Vercel)

npx skills add lllllllama/RigorPilot-Skills --skill safe-debug -a claude-code

2Manually: put the files in place

~/.claude/skills/safe-debug/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/safe-debug/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about safe-debug

How to install safe-debug in Claude Code?

Run npx skills add lllllllama/RigorPilot-Skills --skill safe-debug -a claude-code. Alternatively, place the file directly at ~/.claude/skills/safe-debug/SKILL.md.

What does safe-debug do?

It guides the agent through disciplined deep learning diagnostics without automatic file edits. The skill enforces explicit human approval for any proposed patch and records outputs in debug_outputs/.

When should you not use safe-debug?

Do not apply it for repository walkthroughs, speculative experimentation, or broad readability refactoring. It is built strictly for concrete training and inference failures.

Source text

SKILL.md · MIT
---
name: safe-debug
description: Rigor Debug / Rigor Audit skill for deep learning research work. Use when the user pastes a traceback, terminal error, CUDA OOM, checkpoint load failure, shape mismatch, NaN loss symptom, or training failure and wants conservative diagnosis before any patching, with debug fixes clearly separated from research contributions. Do not use for broad refactoring, speculative adaptation, automatic exploratory patching, or general repository familiarization.
---

# 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
`../ai-research-reproduction/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`, `../ai-research-reproduction/references/research-rigor-principles.md`, and the shared `../ai-research-reproduction/references/research-pitfall-checklist.md`.

© lllllllama · MIT · lllllllama/RigorPilot-Skills

Similar skills

Everything for AI and ML →

From the same set10

The whole set →
minimal-run-and-audit Captures and normalizes execution evidence from deep learning smoke tests and inference commands into standardized repro_outputs/ files. CX Codex +1 476,200installs env-and-assets-bootstrap Prepares environment and checkpoint/dataset paths before the first run of a README-documented repo. CX Codex +1 476,100installs ai-research-explore Governs deep learning research exploration on top of an existing baseline. It isolates candidate experiments and generates structured comparison reports. CX Codex +1 337,400installs analyze-project Reads a deep learning repository and maps its structure, entrypoints and suspicious spots. Changes nothing, runs no heavy jobs. CX Codex +1 337,200installs ai-research-reproduction This skill guides a repository-grounded reproduction run from its README to an evidence bundle. Use it to test a documented model run without quietly changing the experiment. CX Codex +1 337,100installs explore-code A skill for cautious code experiments in deep learning repositories: it transplants modules and adapts architectures on an isolated branch, with rollback-aware records. CX Codex +1 336,700installs explore-run Plans bounded exploratory machine learning runs with comparability caveats and saves summaries to explore_outputs. CX Codex +1 336,500installs run-train Runs a selected training command and organizes the resulting evidence. Use it for startup checks, short-run verification, full training kickoff, or resume handling. CX Codex +1 336,500installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor