360 Secure SkillHub
360 安全技能中心

principle-fix-root-causes

用于调试场景的原则型 Skill:先复现问题并持续追问原因,定位系统首次出错的位置,判断触发状态是否合法;避免用防御性检查、重试或吞错掩盖真正缺陷,同时修复同类模式并建议可常驻的早期信号。

分类:开发
michael-denyer
热度 0.00
最近更新 2026-11-25 17:32:58

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add michael-denyer/pstack-claude/principle-fix-root-causes
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
principle-fix-root-causes
description
Apply when debugging. Trace each symptom back to the first place the system went wrong and fix it there. A guard is a fix only when the state it handles is legitimate.
user-invocable
false

Fix Root Causes

Fix the fault, not the place where it surfaced. The root cause is the first place the system did something it should not do, or failed to handle a state it should handle.

  • Reproduce first. Ask "why" until the answer is a wrong decision in the code. When stuck, instrument and read the actual state.
  • Ask whether the state that triggered the symptom is legitimate. If it is, handle it where the code broke. If it should never exist, a check there hides the bug, so find what produced it. Guards, retries, swallowed errors, clamped values, and discarded state are the usual ways to hide a bug.
  • Fix the pattern, not the instance. Find every place with the same fault.
  • If the deciding fact took a deep dig, propose the cheap, always-on signal that would have shown it at first look.