360 Secure SkillHub
360 安全技能中心

RedHat Debugger

该 Skill 提供诊断代码失败的确定性流程:先复现问题并记录命令与版本,再定位到最小失败单元,逐一验证假设,实施最小修复并补充回归测试,最后确认原始复现与相关测试均通过。输出结构化 YAML,含根因、修复内容、验证命令与后续加固项,并强调不得靠禁用测试或检查来掩盖问题。

mzfshark
mzfshark
热度 37.12
最近更新 2026-05-11 17:45:41
分类:开发依赖:纯提示词应用场景:调试排错

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add axodus-debugging
Metadata
name
debugging
description
Diagnose failures using reproduce → isolate → fix → verify workflow.
metadata
{"author":"RedHat Dev","version":"1.0.0","owner":"RedHat Dev Agent","category":"quality"}

SKILL: debugging

Purpose

Diagnose errors with a deterministic workflow: reproduce → isolate → fix → verify.

When to Use

  • Tests are failing.
  • Runtime errors occur (stack traces, crashes, misbehavior).
  • Performance regressions or unexpected output is reported.

Inputs

  • symptom (required, string): error message, failing test, or observed behavior.
  • repro_steps (optional, string): how to reproduce.
  • logs (optional, string): relevant logs/traces.
  • environment (optional, object|string): OS, versions, env vars (no secrets).

Steps

  1. Reproduce deterministically:
    • capture exact command(s)
    • capture versions
  2. Localize failure:
    • narrow to smallest failing unit/test
    • add targeted logging/diagnostics if needed
  3. Form hypotheses and test them one by one.
  4. Implement the smallest fix that resolves the root cause.
  5. Add/adjust tests to prevent regression.
  6. Verify:
    • original repro no longer fails
    • related tests still pass

Validation

  • Root cause is stated explicitly (not only the symptom).
  • Fix is verified by test/repro.
  • No unrelated behavior changes are introduced.

Output

root_cause: "<what broke and why>"
fix: "<what changed>"
verification: ["<commands/tests>"]
follow_ups: ["<optional hardening>"]

Safety Rules

  • Do not “fix” by disabling tests or checks unless explicitly approved and justified.
  • Prefer reversible debugging changes (guarded logs, small diffs).

Example

Symptom: “TypeError: cannot read property 'x' of undefined in production.” Output: root cause (missing null check), fix, and regression test.