/loom-engineering:loom-systematic-debugging <failure or symptom>from loom-engineering
Structured debugging workflow for diagnosing bugs, test failures, flaky behavior, and runtime errors. Follows a phased approach: reproduce, gather info, hypothesize, verify, fix.
Ships in loom-engineering. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
先建立真实反馈环,再找根因和修复。 没有本项目实测数据,不宣称固定首次修复率。
独立失败信号与实现顺序
默认实现 → 重构 → 持久化 public boundary 行为测试 → 验证。bug 和关键不变量还须有独立于待改实现的预期:来自已批准意图、原始复现或既有不变量;保留真实 baseline 观察、修复后同口径观察和回归证据。缺依赖、导入错误、超时与行为失败分开记录。失败信号可以是 CLI、HTTP、轨迹重放或 probe,不以测试代码的写作先后证明质量;本段是执行指导,不是假装已有受保护的机器门禁。
Phase 1 完成前不许提出解决方案。 三次修复失败 → 重新审视架构,不是再试一次补丁。
Phase 1 的完成标准不是“看起来知道原因”,而是已经建立一个 red-capable feedback loop:一个已运行过、能暴露失败、足够快、agent 可重复执行的命令、测试、脚本或 harness。
多组件系统:在每个边界插桩,定位数据流在哪里断了。
阶段映射:Step1+2=收集信息 → Step3+4=形成/验证假设 → Step5+6=修复验证
先构造可运行的 pass/fail 信号,再进入根因分析。可选方式包括:
完成标准:
如果无法建立反馈环,必须停止并说明已尝试的方法、缺失的环境/日志/artifact,以及需要用户提供什么;不得进入修复。
错误信息:控制台输出、日志文件、堆栈追踪
上下文信息:触发条件、输入数据、系统状态
对比分析:最近的代码变更、配置变更、环境变更
基于收集的信息,列出 3-5 个按可能性排序、可证伪的原因:
| # | 假设 | 依据 | 验证方法 |
| --- | -------------- | ---------------- | -------------- |
| 1 | 数据库连接超时 | 日志显示连接错误 | 检查连接池配置 |
| 2 | 参数解析错误 | 请求参数格式异常 | 检查绑定标签 |
逐一验证假设,每次只验证一个:
详细模式和工具见 references/common-patterns.md
当调试异步问题时,不要使用固定 sleep,而是:
建立多层防护来验证假设:
出现以下想法意味着你在走捷径,立即回到 Phase 1:
所有这些意味着:停止猜测,回到根因分析。
## 调试报告
**问题描述:** xxx
**影响范围:** xxx
**复现步骤:**
1. xxx
2. xxx
### 根因分析
- **反馈环:** <已运行命令 / 测试 / harness>
- **失败信号:** <red 输出摘要>
- **直接原因:** xxx
- **根本原因:** xxx
### 修复方案
- **修改文件:** path/to/file
- **修改内容:** xxx
- **回归测试:** 已添加测试覆盖
### 预防措施
- 添加监控告警
- 添加单元测试覆盖
What SKILL.md sets; muted values are Claude Code's defaults
Diagnose bugs, failing tests, flaky behavior, or unexplained runtime errors through a structured loop.
Three short reads, in order
debugging, bug-hunting, root-cause-analysis, troubleshooting
22 skills in this plugin
/loom-analyze-artifactsRead-only cross-artifact consistency analysis after planning and before approval. Verifies that spec.md, requirements.json, plan.md, tasks/Tn.md, traceability.json are mutually consistent: no duplicate/ambiguous requirements, every behavior mapped to a task, no orphan tasks, no coverage gaps, no contradictions. Outputs artifact-analysis.json with coverage% and severity. CRITICAL/HIGH findings block the approval gate. Use when: planning produced plan.md + tasks + traceability.json, before the user approves the plan.
/loom-brainstormingExplore 2-3 implementation options with trade-offs when the user describes a new feature or requirement. Use when: the user asks for a new feature design, implementation options, or technical trade-off analysis.
/loom-Other plugins' skills for the same job
Claude Code installs this plugin but refuses to load it
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest/PreSkillShellCommand at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest/PreSkillShellCommand at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
Checked against Claude Code 2.1.332. The listing below is what the repository ships; Claude Code doesn't load it as published.