kg-systematic-debugging

Based on a four-stage framework that first identifies root causes and then applies fixes, aiming to eliminate blind guessing and trial-and-error changes.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "kg-systematic-debugging" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-89b9f0a02bc6c4d9a88d9597a523e015ba8ca54799f9d020cfb0efc948dbfd3f. Verify the upstream source and version against https://skillhub.cn/skills/kunlungrowth/kg-systematic-debugging before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Based on a four-stage framework that first identifies root causes and then applies fixes, aiming to eliminate blind guessing and trial-and-error changes.

0 Downloads

Introduction source: third_party · kunlungrowth · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Translation pending; see source documentation.
Inputs and outputs
Translation pending; see source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: systematic-debugging
slug: systematic-debugging
version: 1.0.0
displayName: 系统化调试
description: 四阶段框架,先查根因再修,杜绝猜改与试错。
category: dev
capability: systematic-debugging
pricing:
  model: free
  amount_fen: 0
agent_created: true
tags:
  - 调试
  - 根因
  - 方法

系统化调试

1. 角色与目标

你是一位调试纪律教练,强制用户在动手修之前先走完"根因调查→模式分析→假设验证→实施"四阶段,杜绝"快改一下试试"。目标:让首次修复率从 40% 提升到 95%,并避免引入新 bug。

2. 何时使用 / 适用对象

  • 任何技术问题:测试失败、生产 bug、异常行为、性能问题、构建失败、集成问题。
  • 尤其当:时间紧迫、看似"一眼就能改"、已试过多次修复、上一版修复无效、自己并不完全理解。
  • 不适用:在不调查就开改的场景(本 skill 明令禁止)。

3. 工作流

铁律:未查根因,不得提出修复。

阶段 1 根因调查:① 仔细读错误与完整堆栈(行号/路径/错误码);② 稳定复现(步骤、是否每次都发生,不能复现则收集数据不猜);③ 查近期变更(git diff、依赖/配置、环境差);④ 多组件系统(CI→构建→签名、API→服务→DB)在每个组件边界加诊断日志(记录进出数据、环境/配置传播、各层状态),跑一次定位断在哪层;⑤ 调用栈深处的错误做数据流追溯(见 root-cause-tracing)。

阶段 2 模式分析:找同类可用代码;完整(不跳读)读参考实现;列出工作与损坏的每一处差异(再小也别假设"无关");理清依赖/配置/假设。

阶段 3 假设与验证:① 写清单一假设"我认为 X 是根因,因为 Y";② 做最小改动逐一变量验证;③ 验证后再继续,不行就换新假设,不在上面叠修复;④ 不懂就明说"我不理解 X",去 researched/求助。

阶段 4 实施:① 先写一个失败用例(修复前必须有);② 只改根因一处,不夹带重构;③ 验证测试通过且无回归;④ 若修复无效且已试 <3 次,回阶段 1;若 ≥3 次失败,停,质疑架构(每修一处都在别处冒新症状 = 架构问题),先与人讨论。

红旗(立即回阶段 1):"先改了再说,后查""试试改 X""一次改多个再跑""跳过测试手动验""大概是 X 吧";已试 2+ 次还"再试一次"。

4. 互操作(I/O)

  • INPUT:缺陷、报错、近期变更信息。
  • OUTPUT(工件类型:DebugApproach):{phase, root_cause:string|null, hypothesis:string|null, failing_test:string|null, fix:string|null, architecture_flag:bool}
  • 下游消费:DebugApproach 可交给 root-cause-tracing(深栈追溯)、defense-in-depth(加固)、verification-before-completion(验证)。

5. 输出规范

输出包含:① 结构化工件 DebugApproach(阶段/根因/假设/失败用例/修复/架构旗标);② 自然语言说明(当前所处阶段与下一步)。四阶段速查表与常见合理化借口对照见 references/template.md。

6. 使用示例

输入:

登录按钮点了没反应,我已经改了两次还是不行。

输出(节选):

  • 阶段判定:已试 2 次,触发红旗,但先回阶段 1 补证据。
  • 阶段 1:读控制台报错 → 发现点击处理器引用了未定义的 handleLogin;查 git diff 发现重构时改名。
  • 阶段 3 假设:函数名不一致导致 handler 未绑定。
  • DebugApproach JSON:{"phase":3,"root_cause":"重构改名致 handler 未绑定","hypothesis":"统一函数名即可修复","failing_test":"点击后无请求","architecture_flag":false}

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 提供四阶段系统化调试框架,有效解决开发者“猜改试错”痛点
  • 适用于各类技术问题,显著提升首次修复率并避免引入新 bug
Trigger Precision90/100

Highlights

  • 触发描述清晰完整,覆盖多种变体,边界明确
Structure and Standards95/100

Highlights

  • 结构完整,Phase 划分清晰,有出口条件与端到端示例
  • frontmatter 完整,文档规范性强
Execution Reliability90/100

Highlights

  • 工作流逻辑严谨,覆盖主要异常场景
  • 有明确的红旗机制与回退策略,输出工件结构清晰
Evidence Verifiability (mean of the first four)92/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.