← 返回 Skills 市场
kennyzir

btw command

作者 claw0x · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
97
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install btw-command
功能描述
Ask non-blocking clarifying questions during agent workflows. Use when agents need user input without halting execution. Handles deployment decisions, code r...
使用说明 (SKILL.md)

\r \r

btw Command\r

\r Local skill by Claw0x — runs entirely in your OpenClaw agent.\r \r

Runs locally. No external API calls, no API key required. Complete privacy.\r \r

What It Does\r

\r The btw Command skill allows AI agents to ask clarifying questions without halting their main workflow. Questions are queued, users are notified via multiple channels, and if no answer is received within the timeout period, a default answer is used automatically.\r \r Think of it as "by the way, I need to know..." — the agent continues working while waiting for your input.\r \r

Quick Reference\r

\r | When This Happens | Do This | What You Get |\r |-------------------|---------|--------------|\r | Need deployment confirmation | Ask "Deploy to staging or production?" | Non-blocking answer with default |\r | Code review decision | Ask "Refactor this complex function?" | User choice without workflow halt |\r | Data validation | Ask "Found duplicates, merge or keep?" | Timeout-safe decision |\r | Security check | Ask "API key expiring, rotate now?" | Priority-based notification |\r \r

5-Minute Quickstart\r

\r

Step 1: Install (30 seconds)\r

openclaw skill add btw\r
```\r
\r
### Step 2: Ask Your First Question (1 minute)\r
```typescript\r
const result = await agent.run('btw', {\r
  question: 'Deploy to staging or production?',\r
  options: ['staging', 'production'],\r
  default: 'staging',\r
  timeout: 300,\r
  priority: 'urgent'\r
});\r
\r
console.log(result.answer); // 'production' or 'staging' (default)\r
```\r
\r
### Step 3: Handle the Answer (instant)\r
```typescript\r
if (result.timed_out) {\r
  console.log(`Used default: ${result.answer}`);\r
} else {\r
  console.log(`User chose: ${result.answer} in ${result.response_time_ms}ms`);\r
}\r
```\r
\r
## Real-World Use Cases\r
\r
### Scenario 1: Deployment Automation\r
**Problem**: Agent needs to deploy but unsure which environment\r
**Solution**: Ask non-blocking question with timeout\r
**Example**:\r
```typescript\r
const { answer } = await btw({\r
  question: 'Tests passed! Deploy to which environment?',\r
  options: ['staging', 'production', 'skip'],\r
  default: 'staging',\r
  timeout: 600, // 10 minutes\r
  priority: 'urgent'\r
});\r
\r
if (answer === 'production') {\r
  await deployToProduction();\r
} else if (answer === 'staging') {\r
  await deployToStaging();\r
}\r
```\r
\r
### Scenario 2: Code Review Decisions\r
**Problem**: Agent finds complex code, unsure if refactoring is needed\r
**Solution**: Ask for human judgment without blocking\r
**Example**:\r
```typescript\r
const { answer } = await btw({\r
  question: 'Function `processData` has 150 lines. Refactor?',\r
  options: ['yes', 'no', 'later'],\r
  default: 'later',\r
  timeout: 300,\r
  priority: 'normal',\r
  context: {\r
    file: 'src/utils/data.ts',\r
    lines: 150,\r
    complexity: 'high'\r
  }\r
});\r
```\r
\r
### Scenario 3: Data Validation\r
**Problem**: Agent finds duplicate records, needs merge strategy\r
**Solution**: Ask with context and smart default\r
**Example**:\r
```typescript\r
const { answer } = await btw({\r
  question: 'Found 5 duplicate users. How to handle?',\r
  options: ['merge', 'keep-all', 'keep-newest'],\r
  default: 'keep-newest',\r
  timeout: 180,\r
  priority: 'normal',\r
  context: {\r
    duplicates: 5,\r
    table: 'users',\r
    criteria: 'email'\r
  }\r
});\r
```\r
\r
### Scenario 4: Security Checks\r
**Problem**: API key expiring soon, needs rotation decision\r
**Solution**: High-priority question with short timeout\r
**Example**:\r
```typescript\r
const { answer } = await btw({\r
  question: 'API key expires in 2 days. Rotate now?',\r
  options: ['yes', 'no', 'remind-tomorrow'],\r
  default: 'remind-tomorrow',\r
  timeout: 60,\r
  priority: 'urgent',\r
  context: {\r
    key_name: 'STRIPE_API_KEY',\r
    expires_at: '2026-03-29'\r
  }\r
});\r
```\r
\r
## Integration Recipes\r
\r
### OpenClaw Agent\r
```typescript\r
agent.onTask(async (task) => {\r
  // Ask question without blocking\r
  const { answer } = await agent.run('btw', {\r
    question: 'Approve this change?',\r
    options: ['yes', 'no'],\r
    default: 'no',\r
    timeout: 300\r
  });\r
  \r
  if (answer === 'yes') {\r
    await task.execute();\r
  }\r
});\r
```\r
\r
### LangChain Agent\r
```python\r
def ask_user(question, options, default, timeout=300):\r
    # Use btw skill locally\r
    result = agent.run('btw', {\r
        'question': question,\r
        'options': options,\r
        'default': default,\r
        'timeout': timeout\r
    })\r
    return result['answer']\r
\r
# Use in agent\r
answer = ask_user(\r
    'Deploy to production?',\r
    ['yes', 'no'],\r
    'no',\r
    timeout=600\r
)\r
```\r
\r
### Custom Agent\r
```javascript\r
// Local btw implementation\r
async function askBtw(question, options, defaultAnswer) {\r
  const result = await agent.run('btw', {\r
    question,\r
    options,\r
    default: defaultAnswer,\r
    timeout: 300\r
  });\r
  \r
  return result.answer;\r
}\r
```\r
\r
## Workflow Diagram\r
\r
```\r
Agent Workflow\r
     │\r
     ├─ Main Task (continues)\r
     │\r
     └─ btw Question\r
          ├─ Queue Question\r
          ├─ Notify User (Web/Mobile/Slack)\r
          │\r
          ├─ User Answers → Return Answer\r
          │\r
          └─ Timeout → Return Default\r
```\r
\r
## Why Use Via Claw0x?\r
\r
- **Zero configuration**: No API keys, no setup\r
- **Complete privacy**: Runs entirely locally\r
- **Offline capable**: Works without internet\r
- **Unlimited usage**: No rate limits or quotas\r
- **Open source**: Transparent implementation\r
- **Agent-native**: Built for autonomous workflows\r
\r
## Prerequisites\r
\r
**None.** Just install and use.\r
\r
## Input Parameters\r
\r
| Parameter | Type | Required | Default | Description |\r
|-----------|------|----------|---------|-------------|\r
| `question` | string | Yes | - | The question to ask |\r
| `options` | string[] | No | - | Available answer options |\r
| `default` | string | No | First option | Default if timeout |\r
| `timeout` | number | No | 300 | Timeout in seconds |\r
| `priority` | string | No | "normal" | Priority: urgent/normal/low |\r
| `context` | object | No | {} | Additional context |\r
\r
## Output Schema\r
\r
| Field | Type | Description |\r
|-------|------|-------------|\r
| `answer` | string | User's answer or default |\r
| `answered_at` | string | ISO timestamp |\r
| `timed_out` | boolean | Whether timeout occurred |\r
| `response_time_ms` | number | Time to answer |\r
\r
## Error Codes\r
\r
| Code | Meaning | Solution |\r
|------|---------|----------|\r
| 400 | Invalid input | Check question is non-empty |\r
| 500 | Internal error | Retry or check logs |\r
\r
## Pricing\r
\r
**Free.** No API key required, no usage limits.\r
\r
- Runs entirely locally in your agent\r
- No external API calls\r
- Complete privacy\r
- Unlimited questions\r
\r
## Rate Limits\r
\r
**None.** Unlimited questions.\r
\r
## About Claw0x\r
\r
[Claw0x](https://claw0x.com) is the native skills layer for AI agents — providing unified API access, atomic billing, and quality control.\r
\r
**Explore more skills**: [claw0x.com/skills](https://claw0x.com/skills)\r
\r
**GitHub**: [github.com/kennyzir/btw](https://github.com/kennyzir/btw)\r
安全使用建议
This skill appears to be low-risk code that runs locally (no network calls or credentials), but the documentation and implementation are not fully aligned. Before installing or using it in production: - Understand blocking behavior: run() waits until an answer or timeout. If you need true non-blocking behavior, you must call it without awaiting or change the integration to poll listPendingQuestions and call answerQuestion later. The examples in SKILL.md can be misleading. - Notifications and durability are not implemented: the README mentions multi-channel notifications and persistent queuing, but the handler only logs to console and keeps questions in memory. If you need notifications or persistence across restarts, you'll need to extend the skill or provide external plumbing. - Test in a safe environment: because blocking behavior could pause agent workflows or deployment tasks until timeout, validate workflows in staging before relying on this for critical decisions. - The skill exposes answerQuestion() and listPendingQuestions() which you can use to implement your own UI/notification integration; consider adding secure persistence and notification hooks if you intend to use this for security- or deployment-critical prompts. Overall: not malicious, but the documentation over-promises features that aren't implemented; treat this as an incomplete/local helper and verify behavior before trusting it in important flows.
功能分析
Type: OpenClaw Skill Name: btw-command Version: 1.0.0 The 'btw-command' skill is a legitimate utility designed to allow AI agents to ask clarifying questions without halting execution. The implementation in handler.ts uses a simple in-memory queue and a polling mechanism to wait for user input or a timeout, and it contains no network requests, file system access, or malicious execution logic.
能力评估
Purpose & Capability
The skill's stated purpose is to provide non-blocking, queued questions with notifications via multiple channels. The code implements a simple in-memory queue and console logging only (no notification channels, no persistence). The required capabilities (none) are appropriate, but the feature claims (multi-channel notifications, durable queue) are not implemented in handler.ts.
Instruction Scope
SKILL.md emphasizes non-blocking behavior ('agent continues working while waiting') and gives examples that imply background queuing. The implementation's run() awaits waitForAnswer, which blocks until an answer or timeout, so calling agent.run('btw', ...) will block the caller unless invoked without awaiting. SKILL.md also suggests notifying users through channels; the code only logs to console. This mismatch could lead to incorrect integration assumptions (e.g., relying on non-blocking semantics or persistence).
Install Mechanism
No install spec and only a single small TypeScript handler are included; nothing is downloaded or written during install. This is low-risk from an installation/execution standpoint.
Credentials
The skill requests no environment variables, no credentials, and the code does not read env vars or config paths. That is proportional to its described local utility.
Persistence & Privilege
The skill does not request persistent presence (always:false) and runs locally. However, it stores questions only in memory — pending questions will be lost on process restart — which is not highlighted in the documentation and may be important for real-world use (especially for deployment/security prompts).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install btw-command
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /btw-command 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
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.
元数据
Slug btw-command
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

btw command 是什么?

Ask non-blocking clarifying questions during agent workflows. Use when agents need user input without halting execution. Handles deployment decisions, code r... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 97 次。

如何安装 btw command?

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

btw command 是免费的吗?

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

btw command 支持哪些平台?

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

谁开发了 btw command?

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

💬 留言讨论