返回顶部
b

btw Command" btw命令

>

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
83
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

btw Command"

btw 命令

Claw0x 提供的本地技能 — 完全在您的 OpenClaw 代理中运行。

本地运行。 无需外部 API 调用,无需 API 密钥。完全隐私。

功能概述

btw 命令技能允许 AI 代理在不中断其主要工作流程的情况下提出澄清性问题。问题会被排队,通过多种渠道通知用户,如果在超时时间内未收到回答,则自动使用默认答案。

可以将其理解为顺便问一下,我需要知道...——代理在等待您输入的同时继续工作。

快速参考

发生情况操作结果
需要部署确认询问部署到预发布环境还是生产环境?带默认值的非阻塞回答
代码审查决策
询问重构这个复杂函数? | 不中断工作流程的用户选择 | | 数据验证 | 询问发现重复数据,合并还是保留? | 超时安全的决策 | | 安全检查 | 询问API 密钥即将过期,立即轮换? | 基于优先级的通知 |

5 分钟快速入门

步骤 1:安装(30 秒)

bash openclaw skill add btw

步骤 2:提出第一个问题(1 分钟)

typescript const result = await agent.run(btw, { question: 部署到预发布环境还是生产环境?, options: [staging, production], default: staging, timeout: 300, priority: urgent });

console.log(result.answer); // production 或 staging(默认值)

步骤 3:处理回答(即时)

typescript if (result.timed_out) { console.log(使用默认值:${result.answer}); } else { console.log(用户选择:${result.answer},响应时间:${result.responsetimems}ms); }

实际应用场景

场景 1:部署自动化

问题:代理需要部署但不确定环境 解决方案:提出带超时的非阻塞问题 示例: typescript const { answer } = await btw({ question: 测试通过!部署到哪个环境?, options: [staging, production, skip], default: staging, timeout: 600, // 10 分钟 priority: urgent });

if (answer === production) {
await deployToProduction();
} else if (answer === staging) {
await deployToStaging();
}

场景 2:代码审查决策

问题:代理发现复杂代码,不确定是否需要重构 解决方案:不阻塞地请求人工判断 示例: typescript const { answer } = await btw({ question: 函数 processData 有 150 行。需要重构吗?, options: [yes, no, later], default: later, timeout: 300, priority: normal, context: { file: src/utils/data.ts, lines: 150, complexity: high } });

场景 3:数据验证

问题:代理发现重复记录,需要合并策略 解决方案:带上下文和智能默认值提问 示例: typescript const { answer } = await btw({ question: 发现 5 个重复用户。如何处理?, options: [merge, keep-all, keep-newest], default: keep-newest, timeout: 180, priority: normal, context: { duplicates: 5, table: users, criteria: email } });

场景 4:安全检查

问题:API 密钥即将过期,需要轮换决策 解决方案:高优先级问题,短超时 示例: typescript const { answer } = await btw({ question: API 密钥将在 2 天后过期。立即轮换?, options: [yes, no, remind-tomorrow], default: remind-tomorrow, timeout: 60, priority: urgent, context: { keyname: STRIPEAPI_KEY, expires_at: 2026-03-29 } });

集成方案

OpenClaw 代理

typescript agent.onTask(async (task) => { // 不阻塞地提问 const { answer } = await agent.run(btw, { question: 批准此更改?, options: [yes, no], default: no, timeout: 300 });

if (answer === yes) {
await task.execute();
}
});

LangChain 代理

python def ask_user(question, options, default, timeout=300): # 本地使用 btw 技能 result = agent.run(btw, { question: question, options: options, default: default, timeout: timeout }) return result[answer]

在代理中使用

answer = ask_user( 部署到生产环境?, [yes, no], no, timeout=600 )

自定义代理

javascript // 本地 btw 实现 async function askBtw(question, options, defaultAnswer) { const result = await agent.run(btw, { question, options, default: defaultAnswer, timeout: 300 });

return result.answer;
}

工作流程示意图

代理工作流程

├─ 主要任务(继续执行)

└─ btw 问题
├─ 排队问题
├─ 通知用户(Web/移动端/Slack)

├─ 用户回答 → 返回回答

└─ 超时 → 返回默认值

为什么选择 Via Claw0x?

  • - 零配置:无需 API 密钥,无需设置
  • 完全隐私:完全本地运行
  • 离线可用:无需互联网即可工作
  • 无限制使用:无速率限制或配额
  • 开源:实现透明
  • 代理原生:专为自主工作流程构建

前提条件

无。 只需安装即可使用。

输入参数

参数类型必需默认值描述
questionstring-要提出的问题
options
string[] | 否 | - | 可用的回答选项 | | default | string | 否 | 第一个选项 | 超时时的默认值 | | timeout | number | 否 | 300 | 超时时间(秒) | | priority | string | 否 | normal | 优先级:urgent/normal/low | | context | object | 否 | {} | 额外上下文 |

输出模式

字段类型描述
answerstring用户的回答或默认值
answered_at
string | ISO 时间戳 | | timed_out | boolean | 是否发生超时 | | responsetimems | number | 回答时间 |

错误代码

代码含义解决方案
400无效输入检查问题是否非空
500
内部错误 | 重试或检查日志 |

定价

免费。 无需 API 密钥,无使用限制。

  • - 完全在您的代理中本地运行
  • 无外部 API 调用
  • 完全隐私
  • 无限问题

速率限制

无。 无限问题。

关于 Claw0x

Claw0x 是 AI 代理的原生技能层——提供统一的 API 访问、原子计费和质量控制。

探索更多技能claw0x.com/skills

GitHubgithub.com/kennyzir/btw

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 btw-command-1775977091 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 btw-command-1775977091 技能

通过命令行安装

skillhub install btw-command-1775977091

下载

⬇ 下载 btw Command" v1.0.0(免费)

文件大小: 5.34 KB | 发布时间: 2026-4-13 09:34

v1.0.0 最新 2026-4-13 09:34
btw-command v1.0.0

- Initial release of the btw Command skill.
- Enables agents to ask non-blocking clarifying questions during workflows, with timeout defaults and priority levels.
- Supports use cases like deployment confirmations, code review approvals, data validation, and security checks.
- Offers configurable options, default answers, timeout settings, and context support.
- Works entirely locally (no external API), ensuring privacy and no dependency on internet access.
- Includes integration examples for OpenClaw, LangChain, and custom agents.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部