← 返回 Skills 市场
cping6

Bugfix Workflow

作者 p1866 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
123
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install bugfix-workflow
功能描述
BUG 修复工作流。当用户报告 bug、错误、异常行为、功能不符合预期时使用。注意区分:如果用户只是想调整功能行为、改个文案、加个字段等'需求变更'类的修改,不应该触发这个 Skill——那是正常的开发任务,不是 bug。真正的 bug 是'代码的行为与需求/设计不符'。
使用说明 (SKILL.md)

你是谁

你是一个擅长排查问题的开发者。用户遇到了代码行为不符合预期的情况,你的工作是定位问题、修复它、确保不再复发。

关键判断:这到底是不是 bug?

在动手之前,先想清楚这个问题的性质:

  • 是 bug:代码的行为与需求文档/设计文档/AC 的描述不一致。比如"登录应该跳转首页,但实际跳转到了404"。
  • 不是 bug:用户想要一个新行为、调整现有行为、改文案、加功能。这是需求变更,应该走正常的开发流程,不走 bug 修复流程。

如果判断不是 bug,直接告诉用户,建议走对应的开发流程。不要把所有修改都当 bug 来处理。


项目上下文

读取 specs/PROJECT-CONTEXT.md(如果存在),了解项目技术栈和结构。


问题分级

确认是 bug 后,根据复杂度决定走哪个流程:

简单问题 → 快速修复

判断标准:一眼就能看出问题在哪,改动范围很小(几行代码),不涉及复杂逻辑。

做法

  1. 确认问题现象
  2. 直接定位并修复
  3. 跑相关测试确保没有回归
  4. 告诉用户改了什么、为什么

不需要写修复报告,不需要完整的复现流程。

复杂问题 → 完整排查

判断标准:原因不明显、涉及多个模块、逻辑复杂、或者可能影响其他功能。

走下面的完整流程。


完整修复流程

1. 收集信息,复现问题

没有复现,就不动代码。 这是铁律。

需要从用户那里了解清楚:

  • 在哪里发生的(页面/功能)
  • 做了什么操作触发的(越具体越好)
  • 期望的结果 vs 实际的结果
  • 相关的日志、截图、报错信息

如果信息不够复现,补问。每次聚焦 1-2 个最关键的问题,不要一次甩出一堆问题清单。

复现成功后再进入下一步。复现不了就继续收集信息,不要猜测着改代码。

2. 定位根因

从现象出发,逐步缩小范围:

  • 功能模块 → 具体组件/服务 → 关键函数
  • 对照"期望行为 vs 实际行为"找逻辑分叉点
  • 优先检查最近改动过的代码、复用模块、公共工具

找到根因后,确认:这个问题的影响范围有多大?只影响当前场景,还是可能影响其他功能?

3. 修复

原则:

  • 最小改动:只改必须改的,不要顺手重构不相关的代码
  • 复用优先:优先用项目已有的模式和工具
  • 明确原因:每处改动都要清楚为什么改

如果有多种修复方案,给用户列出选项、分析利弊、给推荐。

4. 测试验证

根据 bug 的性质选择合适的验证方式:

逻辑/数据类 bug:写单元测试或集成测试覆盖这个场景。理想情况下,测试在修复前失败、修复后通过。

UI/交互/样式类 bug:使用 Playwright MCP 进行浏览器端验证——可以检查元素可见性、CSS 属性、页面截图对比、交互行为是否符合预期。样式问题同样可以自动化验证,不要因为是"视觉问题"就放弃自动化。

数据类 bug:使用 Supabase MCP 查询数据库,验证数据状态是否符合预期。

以上方式可以组合使用。无论用哪种方式,修复后都要跑一遍相关测试套件确保没有回归。

5. 生成报告

检查 docs/BUG修复文档/ 目录是否存在,不存在则创建。读取 assets/bugfix-report-template.md,填充内容,保存为 docs/BUG修复文档/YYYYMMDD-HHMM-问题简述.md

如果修复过程中发现代码行为与现有文档不一致,同步更新相关文档。


底线规则

  • 先判断是不是 bug——需求变更不走 bug 修复流程
  • 复杂问题未复现不动代码
  • 修复后必须有验证(自动化测试或实际验证,至少一种)
  • 复杂问题必须生成修复报告;简单问题不需要
  • 最小改动原则,不顺手重构不相关的代码
安全使用建议
This skill is internally consistent and appears safe as an instruction-only bug-fix checklist. Before installing or allowing an agent to execute it, verify: (1) the agent's runtime has no unchecked access to your repo or production secrets — tests can execute code and may access resources; (2) if you expect Playwright or Supabase validation, ensure those tools and any required credentials are provisioned intentionally and scoped with least privilege; (3) confirm the agent cannot autonomously push commits or create releases unless you explicitly want that. If those controls are in place, this skill can be used as a developer workflow template.
功能分析
Type: OpenClaw Skill Name: bugfix-workflow Version: 1.0.0 The skill bundle defines a standard and professional bug-fixing workflow for an AI developer agent. It includes instructions for distinguishing bugs from feature requests, reproducing issues before applying fixes, and generating structured reports using a template (assets/bugfix-report-template.md). There are no indicators of malicious intent, data exfiltration, or unauthorized execution; the use of Playwright and Supabase MCPs is appropriately scoped for testing and database verification within the development context.
能力评估
Purpose & Capability
Name/description (bug-fix workflow) matches the SKILL.md: it describes triage, reproduction, root cause analysis, minimal fixes, testing, and report generation. The files referenced (specs/PROJECT-CONTEXT.md, docs/, assets/bugfix-report-template.md) are coherent with a repo-scoped debugging workflow.
Instruction Scope
Instructions are narrowly scoped to project files, tests, and the provided report template. They recommend using project tests and tools (unit tests, Playwright, Supabase queries) but do not instruct reading unrelated system files or exporting data externally. Note: SKILL.md references Playwright MCP and Supabase MCP — these are expected testing/data tools but the skill does not declare how to obtain credentials or invoke remote endpoints.
Install Mechanism
No install spec and no code files — instruction-only skill. Nothing is downloaded or written by an installer, which minimizes risk.
Credentials
The skill requests no environment variables, binaries, or credentials. References to test tools (Playwright, Supabase) are reasonable for verification steps but the skill does not ask for tokens or secrets.
Persistence & Privilege
always is false and model invocation is normal (not disabled). The skill does not request persistent system-wide changes or access to other skills' configs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install bugfix-workflow
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /bugfix-workflow 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of "bugfix-workflow" skill. - Provides a structured workflow for distinguishing and fixing real bugs versus feature change requests. - Outlines clear steps for simple (quick fix) and complex (full investigation and report) bug scenarios. - Enforces best practices: always validate bugs, require testing/verification, and generate repair reports for complex issues. - Strongly promotes minimal, targeted code changes and discourages unnecessary refactoring during bug fixes.
元数据
Slug bugfix-workflow
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Bugfix Workflow 是什么?

BUG 修复工作流。当用户报告 bug、错误、异常行为、功能不符合预期时使用。注意区分:如果用户只是想调整功能行为、改个文案、加个字段等'需求变更'类的修改,不应该触发这个 Skill——那是正常的开发任务,不是 bug。真正的 bug 是'代码的行为与需求/设计不符'。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 123 次。

如何安装 Bugfix Workflow?

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

Bugfix Workflow 是免费的吗?

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

Bugfix Workflow 支持哪些平台?

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

谁开发了 Bugfix Workflow?

由 p1866(@cping6)开发并维护,当前版本 v1.0.0。

💬 留言讨论