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: My custom command
user-invocable: true
---

Instructions for the agent...

通過配置

{
  "commands": {
    "custom": [
      {
        "name": "todo",
        "description": "Add a todo item",
        "action": "run_agent",
        "prompt": "Add todo: {{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
---

下一步