← 返回 Skills 市场
huaibuer

Bug Data Generator

作者 HuaiBuer · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ✓ 安全检测通过
164
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install bug-data-generator
功能描述
根据 BUG 描述生成对应的工具名和用户指令列表,供用户审核确认后再调用 data-generator 生成完整 JSONL 训练数据。触发场景:(1) 输入 BUG 描述,获取应调用的工具和触发指令列表;(2) 确认指令后自动调用 data-generator;(3) BUG 数据生成的中间步骤。
使用说明 (SKILL.md)

Bug Data Generator

将 BUG 描述转换为可用的训练指令序列。

工作流

用户: BUG描述 + 错误原因
        ↓
Agent: 分析 BUG → 确定工具 + 生成用户指令列表
        ↓
用户: 审核指令列表(可修改/补充/删除)
        ↓
用户: 确认 "没问题,生成数据"
        ↓
调用 data-generator → 输出 JSONL(新格式)

第一步:分析 BUG

输入以下信息,自动推断:

字段 说明 示例
BUG 描述 用户的实际指令 + 系统的错误行为 "用户说X分钟后开空调,系统却立即执行"
错误原因 为什么错 + 正确工具 "调用了 dev_control 而应该调用 scene_generator"

第二步:生成指令列表

输出内容:

工具: scene_generator

用户指令列表:
  1. 5分钟后打开空调
  2. 3分钟后关灯
  3. 10分钟后开启空气净化器
  ...(共 N 条)

发送给用户确认,等待回复。

第三步:用户修改指令

用户可直接回复修改意见:

  • "把第3条改成 20分钟后打开加湿器"
  • "删除第5条"
  • "补充5条延时类指令"
  • "指令没问题,生成数据"

第四步:调用 data-generator

收到确认后,使用最终版指令列表,调用 data-generator v2.0.0(新格式):

输入参数:

tool_name: scene_generator
user_instructions: [确认后的完整列表]

输出 JSONL(新格式):

{
  "conversations": [
    {"from": "human", "value": "\x3C当前用户指令>5分钟后打开空调\x3C/当前用户指令>\
\x3C本地设备>舒享家(空调)\x3C/本地设备>\
\x3C当前时间>2026-03-21 20:00:00\x3C/当前时间>\
\x3C用户场景列表>[...]\x3C/用户场景列表>\
\x3C用户设备列表>{...}\x3C/用户设备列表>"},
    {"from": "assistant", "value": "\x3Ctool_call>{\"tool_name\":\"scene_generator\",\"query\":\"...\"}\x3C/tool_call>"},
    {"from": "observation", "value": "\x3Ctool_response>场景创建成功。\x3C/tool_response>"},
    {"from": "assistant", "value": "好的,5分钟后准时执行~"}
  ],
  "system": "",
  "history": []
}

格式规则(新格式)

  1. conversations[0].value = 完整上下文(\x3C当前用户指令> + \x3C本地设备> + \x3C当前时间> + \x3C用户场景列表> + \x3C用户设备列表>
  2. conversations[1].value = tool_call,无垫音前缀
  3. conversations[2].value = \x3Ctool_response>...\x3C/tool_response>
  4. conversations[3].value = 终接回复,无垫音前缀
  5. system = ""history = []

指令模板参考

生成时可参考以下模板类型:

类型 模板示例
延时-分钟 {N}分钟后打开{D}
延时-秒 {N}秒后关闭{D}
延时-小时 {H}小时后开{D}
定时-今天 今天{H}点打开{D}
定时-明天 明天{H}点关{D}
循环-每天 每天{H}点打开{D}
设备开关 打开{D}把{D}关闭

输出格式(第一步)

{
  "tool_name": "scene_generator",
  "instruction_count": 20,
  "instructions": [
    {"id": 1, "text": "5分钟后打开空调", "type": "延时-分钟"},
    {"id": 2, "text": "3分钟后关灯", "type": "延时-分钟"}
  ],
  "note": "以上为由 AI 根据 BUG 分析生成的指令列表,请审核或修改后确认,确认后调用 data-generator 生成 JSONL。"
}

注意

  • 不依赖 data-generator 内部实现:仅输出中间产物(工具名 + 指令列表)
  • 可迭代:用户可多轮修改指令,直到满意再生成
  • data-generator 升级时,bug-data-generator 无需更新
安全使用建议
This skill appears to do what it claims: generate candidate user instructions from a bug description and hand them off to a separate data-generator. Before installing, consider: (1) It tries to import build_prompt from /app/openclaw/skills/data-generator/scripts — ensure the data-generator skill is present and trusted, or the script will fall back to writing text files. (2) It writes files under /workspace and /tmp; confirm those paths are acceptable and that file permissions/privacy meet your requirements. (3) There are no network calls or credential usage in the included code, but if you plan to integrate with a remote data-generator, review that component separately. If you have low trust in the environment or in other installed skills, inspect the build_prompt implementation in the data-generator skill before use.
功能分析
Type: OpenClaw Skill Name: bug-data-generator Version: 1.1.0 The bug-data-generator skill is a developer utility designed to generate synthetic training data (JSONL) for fine-tuning AI agents to fix tool-calling errors. The Python scripts (gen_bug_data.py and gen_bug_prompts.py) use predefined templates and randomization to create realistic user instructions and simulated tool responses. The workflow described in SKILL.md includes a manual review step for the user, and the code contains no evidence of malicious intent, data exfiltration, or unauthorized system access.
能力评估
Purpose & Capability
Name/description match the implementation: scripts generate instruction lists from BUG descriptions and either produce JSONL or a prompt for a separate data-generator. No unrelated credentials, binaries, or external services are requested.
Instruction Scope
SKILL.md and the scripts stick to generating instruction lists and assembling JSONL. One implementation detail: gen_bug_data.py attempts to import build_prompt from a specific path (/app/openclaw/skills/data-generator/scripts) to integrate with a separate data-generator skill; if unavailable it falls back to writing an instructions text file. This is expected behavior but means the skill assumes presence/read access to another skill's code path.
Install Mechanism
Instruction-only skill with included Python scripts and no install spec. Nothing is downloaded or installed by the skill itself.
Credentials
The skill requires no environment variables or credentials. It does write output to paths like /workspace/... and /tmp, and it inserts a hard-coded sys.path to access another skill's scripts; these file-path assumptions are legitimate for its purpose but worth confirming in your environment (permissions, shared workspace).
Persistence & Privilege
No always:true, no special persistent privileges requested, and no modifications of other skills' configurations. Autonomous invocation remains enabled by default (normal for skills).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install bug-data-generator
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /bug-data-generator 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
更新格式说明:data-generator已升至v2.0.0,JSONL格式已更新,bug-data-generator确认指令后调用新版data-generator
v1.0.1
解耦设计:仅生成tool_name+指令列表,JSONL生成由data-generator完成
v1.0.0
bug-data-generator 1.0.0 - Initial release. - Automatically generates training data to fix bugs based on user-provided bug descriptions and error causes. - Parses bug description to identify correct tools, generate triggering user instruction sets, and utilizes data-generator to output JSONL training data. - Supports natural language commands for generating batch training data tailored to specific bugs. - Customizes output formats and user instruction templates according to bug characteristics and intended tool usage.
元数据
Slug bug-data-generator
版本 1.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

Bug Data Generator 是什么?

根据 BUG 描述生成对应的工具名和用户指令列表,供用户审核确认后再调用 data-generator 生成完整 JSONL 训练数据。触发场景:(1) 输入 BUG 描述,获取应调用的工具和触发指令列表;(2) 确认指令后自动调用 data-generator;(3) BUG 数据生成的中间步骤。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 164 次。

如何安装 Bug Data Generator?

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

Bug Data Generator 是免费的吗?

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

Bug Data Generator 支持哪些平台?

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

谁开发了 Bug Data Generator?

由 HuaiBuer(@huaibuer)开发并维护,当前版本 v1.1.0。

💬 留言讨论