← 返回 Skills 市场
bovinphang

Debug Framework

作者 Bovin Phang · GitHub ↗ · v2.5.0 · MIT-0
cross-platform ✓ 安全检测通过
34
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install fec-debug-framework
功能描述
Use when diagnosing frontend build failures, runtime errors, UI anomalies, API/data problems, white screens, request failures, or unexplained production exce...
使用说明 (SKILL.md)

前端诊断框架

核心方法论(5 步法)

所有前端问题诊断遵循统一流程:

Step 1: 分类(Classify)

识别问题类型和影响范围:

类型 判断依据 诊断入口
build 命令退出非零、stderr 有错误 → Build 模块
runtime 控制台异常、白屏、功能不可用 → Runtime 模块
ui 视觉偏差、交互不符预期 → UI 模块
api 请求状态码异常、数据不一致 → API 模块

跨类型问题(如 API 失败导致 UI 异常)从最表层症状入手,逐层深入。

Step 2: 收集(Collect)

按类型收集证据(各模块有具体策略,见下方)。

Step 3: 假设(Hypothesize)

基于证据提出可能根因,按可能性排序:

  • 每个假设必须可测试(有明确的验证方法)
  • 最多保留 3 个假设,避免发散
  • 格式:「因为 X,导致 Y,可通过 Z 验证」

Step 4: 验证(Verify)

逐一测试假设:

  • 从最可能的假设开始
  • 每次只改一个变量
  • 验证结果记录:证实 / 证伪 / 待定
  • 假设全部证伪时回到 Step 2 重新收集

Step 5: 修复与确认(Fix & Validate)

  • 应用最小修复
  • 运行受影响验证命令
  • 确认无回归
  • 输出修复报告

诊断模块

Build 模块

收集:运行最小失败命令,捕获完整 stderr/stdout 假设:按错误类型分组(类型错误、导入失败、配置解析、依赖缺失),匹配已知模式 验证:修一类根因 → 重跑命令 → 确认错误减少 特殊处理

  • 依赖版本、peer dependency、ESM/CJS、lockfile 相关失败先作为 build 兼容性问题收集证据
  • 记录 package manager、Node 版本、lockfile diff、相关包版本和完整错误日志
  • 不在缺少证据时升级依赖、手工编辑 lockfile,或把依赖迁移与普通调试修复混在同一批改动
  • 若任务目标本身是版本升级、CVE 修复或 lockfile 风险评审,应转入依赖升级工作流
  • CI 专属失败检查 Node 版本、包管理器、环境变量差异

Runtime 模块

收集

  • 复现路径(用户操作序列)
  • 控制台错误和堆栈
  • 组件渲染树状态(检查关键组件是否正确挂载)
  • 相关 store/state 快照

假设

  • 堆栈反向追踪:从异常位置回溯到触发源
  • 状态流分析:检查 state 变化是否符合预期
  • 生命周期分析:是否在错误的时机访问了未初始化的数据

验证

  • 添加临时日志确认状态值
  • 在可疑路径添加断言
  • 复现路径验证修复

UI 模块

收集

  • 当前截图 vs 期望效果
  • DOM 结构检查(元素是否存在、层级是否正确)
  • 计算样式检查(实际应用的 CSS 值)
  • 响应式断点测试

假设

  • CSS 特异性冲突(选择器权重不够被覆盖)
  • 组件状态不匹配(props/state 未正确传递)
  • 布局模型问题(flex/grid 配置错误)
  • 响应式断点遗漏

验证

  • 浏览器 DevTools 实时调整验证
  • 隔离组件测试(排除外部样式干扰)
  • 多断点逐一验证

API 模块

收集

  • 请求 URL、method、headers、body
  • 响应 status、headers、body
  • 网络瀑布时序
  • 相关 store/state 中的缓存数据

假设

  • 请求链路逐跳检查(URL → 中间件 → 拦截器 → 服务端)
  • 数据转换检查(响应解析、类型映射)
  • 缓存策略检查(过期、失效、竞态)
  • 并发请求竞态(race condition)

验证

  • curl 独立复现(排除前端干扰)
  • 逐层 mock 定位问题层级
  • 端到端请求验证修复

报告格式

保存至 reports/debug-YYYY-MM-DD-HHmmss.md

诊断报告

项目 内容
问题类型 build / runtime / ui / api
问题描述 用户报告的现象
收集的证据 关键日志、截图、请求记录
假设与验证 每个假设的验证结果
根因 最终确认的根本原因
修复内容 修改的文件和具体改动
验证结果 修复后的验证命令和结果
剩余风险 未覆盖的边界或潜在回归

强约束

  • 不在缺少证据时猜测根因
  • 不通过关闭规则、删除测试或降低类型安全来「修复」
  • 每次只改一个变量来验证假设
  • 不在验证前扩大改动范围
  • 同一假设连续 3 次验证失败,停止并报告阻塞
安全使用建议
Before installing, be aware that generated debug reports may capture sensitive logs, screenshots, request headers, bodies, URLs, or state snapshots. Use it for frontend debugging, and redact credentials, cookies, tokens, personal data, and internal details before saving or sharing reports.
能力评估
Purpose & Capability
The skill’s capabilities fit its stated purpose: classify frontend build, runtime, UI, and API failures; collect diagnostic evidence; test hypotheses; apply minimal fixes; and validate results.
Instruction Scope
The routing text includes broad debugging terms, especially Chinese trigger words, but the instructions themselves stay within frontend diagnostics and include constraints against guessing, broad changes, disabling rules, deleting tests, or weakening type safety.
Install Mechanism
The package contains only SKILL.md, README.md, metadata.json, and package.json, with no dependencies, install scripts, executable files, or hidden runtime mechanism identified.
Credentials
Running build commands, inspecting UI/API evidence, using curl, adding temporary logs, and making minimal fixes are proportionate to a frontend debugging skill.
Persistence & Privilege
The skill tells the agent to save diagnostic reports under reports/debug-YYYY-MM-DD-HHmmss.md, which is disclosed and local, but those reports may include logs, screenshots, headers, bodies, or request records if the user does not redact them.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install fec-debug-framework
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /fec-debug-framework 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.5.0
Version 2.5.0 - Added formal SKILL.md with detailed diagnosis methodology and step-by-step diagnostic procedures. - Describes the 5-step process (Classify, Collect, Hypothesize, Verify, Fix & Validate) for frontend issue diagnosis. - Documents dedicated modules for build, runtime, UI, and API problem analysis, including specific evidence collection, hypothesis, and validation protocols. - Includes standardized debug report format and strong constraints to avoid guesswork and uncontrolled fixes. - Supports both English and Chinese diagnostic triggers.
元数据
Slug fec-debug-framework
版本 2.5.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Debug Framework 是什么?

Use when diagnosing frontend build failures, runtime errors, UI anomalies, API/data problems, white screens, request failures, or unexplained production exce... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 34 次。

如何安装 Debug Framework?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install fec-debug-framework」即可一键安装,无需额外配置。

Debug Framework 是免费的吗?

是的,Debug Framework 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Debug Framework 支持哪些平台?

Debug Framework 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Debug Framework?

由 Bovin Phang(@bovinphang)开发并维护,当前版本 v2.5.0。

💬 留言讨论