系统化定位 bug、测试失败与异常行为,并在修复前梳理原因与排查步骤。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "systematic-debugging" 技能: 1. 下载 https://raw.githubusercontent.com/obra/superpowers/main/skills/systematic-debugging/SKILL.md 2. 保存为 ~/.claude/skills/systematic-debugging/SKILL.md 3. 装好后重载技能,告诉我可以用了
我有一个单元测试突然失败了。请不要直接给修复方案,先用系统化调试方法帮我分析:可能原因分类、需要收集的证据、最小复现步骤、优先排查顺序,以及如何缩小问题范围。以下是错误日志和相关代码:...
一份结构化排查方案,包含假设列表、验证步骤、复现方法与下一步调查顺序。
线上服务出现间歇性报错和响应变慢。请先不要建议改代码,而是按系统化调试流程输出:症状定义、可能影响面、应查看的监控与日志、排查分支、如何确认是配置、依赖、数据还是代码问题。背景信息如下:...
一套面向生产问题的诊断清单,帮助快速界定范围并定位最可能根因。
我的数据处理脚本输出结果和预期差很多。请在不给最终修复建议的前提下,系统化分析这个问题:输入数据、转换逻辑、边界条件、环境差异、依赖版本分别该怎么检查?并给出逐步验证计划。相关脚本和样例数据如下:...
一个分层排查框架,明确每类问题的检查方法、验证顺序和证据要求。
Random fixes waste time and create new bugs. Quick patches mask underlying issues.
Core principle: ALWAYS find root cause before attempting fixes. Symptom fixes are failure.
Violating the letter of this process is violating the spirit of debugging.
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
If you haven't completed Phase 1, you cannot propose fixes.
Use for ANY technical issue:
Use this ESPECIALLY when:
Don't skip when:
You MUST complete each phase before proceeding to the next.
BEFORE attempting ANY fix:
Read Error Messages Carefully
Reproduce Consistently
Check Recent Changes
Gather Evidence in Multi-Component Systems
WHEN system has multiple components (CI → build → signing, API → service → database):
BEFORE proposing fixes, add diagnostic instrumentation:
For EACH component boundary:
- Log what data enters component
- Log what data exits component
- Verify environment/config propagation
- Check state at each layer
Run once to gather evidence showing WHERE it breaks
THEN analyze evidence to identify failing component
THEN investigate that specific component
Example (multi-layer system):
# Layer 1: Workflow
echo "=== Secrets available in workflow: ==="
echo "IDENTITY: ${IDENTITY:+SET}${IDENTITY:-UNSET}"
# Layer 2: Build script
echo "=== Env vars in build script: ==="
env | grep IDENTITY || echo "IDENTITY not in environment"
# Layer 3: Signing script
echo "=== Keychain state: ==="
security list-keychains
security find-identity -v
# Layer 4: Actual signing
codesign --sign "$IDENTITY" --verbose=4 "$APP"
This reveals: Which layer fails (secrets → workflow ✓, workflow → build ✗)
Trace Data Flow
WHEN error is deep in call stack:
See root-cause-tracing.md in this directory for the complete backward tracing technique.
Quick version:
Find the pattern before fixing:
Find Working Examples
Compare Against References
Identify Differences
Understand Dependencies
Scientific method:
…
帮助你审慎分析代码评审意见,核实技术合理性后再决定是否采纳。
在对话开始时建立技能发现与调用规则,确保先用技能再作答。
在宣称任务完成或修复成功前,先执行验证并用结果佐证结论。
在开发分支完成并通过测试后,帮助选择合并、提 PR 或清理收尾方案。
在创意与实现前梳理用户意图、需求与方案方向,降低返工风险。
用于在当前会话中拆分并并行推进独立实现任务,加快开发执行效率。
用四阶段系统化排查框架定位缺陷根因,再制定可靠修复方案。
系统化排查测试失败、构建中断与异常运行问题,帮助快速恢复开发进度
用四阶段系统化调试方法先定位根因,再制定可靠修复方案。
帮助你系统复现、定位并修复代码或环境中的复杂故障问题。
帮助你为复杂问题编写调试测试并反复验证,快速定位异常根因。
系统性沿调用链逆向排查缺陷,快速定位问题的最初触发点