Clawdbot 斜杠命令

使用斜杠命令与 Clawdbot AI 助手交互。了解可用命令以及如何创建自定义命令。

Clawdbot 斜杠命令概述

斜杠命令提供对常见操作和技能的快速访问。输入 / 后跟命令名称即可执行。

内置命令

通用命令

命令描述
/help显示可用命令
/status显示网关状态
/clear清除对话
/reset重置会话

代理命令

命令描述
/agent切换代理
/model更改 AI 模型
/persona更改人格

会话命令

命令描述
/new新对话
/save保存对话
/export导出转录

技能命令

用户可调用的技能显示为斜杠命令:

命令描述
/commit生成提交消息
/review代码审查
/explain解释代码

命令语法

基本用法

/command

带参数

/command arg1 arg2

带选项

/command --option value

创建自定义命令

通过技能

创建一个 user-invocable: true 的技能:

---
name: my-command
description: 我的自定义命令
user-invocable: true
---

给代理的说明...

通过配置

{
  "commands": {
    "custom": [
      {
        "name": "todo",
        "description": "添加待办事项",
        "action": "run_agent",
        "prompt": "添加待办: {{args}}"
      }
    ]
  }
}

提供商特定命令

Discord 斜杠命令

向 Discord 注册斜杠命令:

{
  "providers": {
    "discord": {
      "slashCommands": {
        "register": true,
        "commands": ["help", "status"]
      }
    }
  }
}

Telegram 机器人命令

使用 BotFather 注册命令:

clawdbot providers telegram register-commands

命令分派

直接工具分派

绕过模型直接调用工具:

---
name: exec
user-invocable: true
command-dispatch: tool
command-tool: bash
---

代理分派

路由到特定代理:

---
name: code
user-invocable: true
command-dispatch: agent
command-agent: coder
---

下一步