OpenClaw 斜杠命令指南

概述

命令由 Gateway 处理。大多数命令必须作为以 / 开头的独立消息发送。

主机专用的 bash 聊天命令使用 ! <cmd>/bash <cmd> 作为别名)。


命令列表

文本 + 原生(启用时)

命令 说明
/help 显示帮助
/commands 列出所有命令
/skill [input] 按名称运行技能
/status 显示当前状态
/allowlist 列出/添加/删除允许列表条目
/approve 解析 exec 批准提示
/context 解释”上下文”
/whoami 显示您的发送者 ID
/subagents 检查、停止、记录或消息子代理运行
/config 持久化配置到磁盘
/debug 运行时覆盖
/usage 每响应使用页脚或本地成本摘要
/tts 控制 TTS
/stop 停止当前任务
/restart 重启 Gateway
/reset/new 开始新会话
/think 动态选择(按模型/提供者)
/verbose 详细模式
/reasoning 推理模式
/elevated 提升模式
/exec 设置 exec 参数
/model 切换模型
/queue 队列设置
/bash 主机 shell 命令

配置

{
  "commands": {
    "native": "auto",
    "nativeSkills": "auto",
    "text": true,
    "bash": false,
    "bashForegroundMs": 2000,
    "config": false,
    "debug": false,
    "restart": false,
    "useAccessGroups": true
  }
}
  • commands.text(默认 true)在聊天消息中启用解析 /...
  • commands.native(默认 "auto")在支持时注册原生命令
  • commands.bash(默认 false)启用 ! 来运行主机 shell 命令

模型选择 (/model)

/model
/model list
/model 3
/model openai/gpt-5.2
/model opus@anthropic:default
/model status

调试覆盖 (/debug)

/debug show
/debug set messages.responsePrefix="[openclaw]"
/debug set channels.whatsapp.allowFrom=["+1555","+4477"]
/debug unset messages.responsePrefix
/debug reset

配置更新 (/config)

/config show
/config get messages.responsePrefix
/config set messages.responsePrefix="[openclaw]"
/config unset messages.responsePrefix

来源: https://docs.openclaw.ai/tools/slash-commands

作者:十一张  创建时间:2026-03-08 22:33
最后编辑:十一张  更新时间:2026-03-28 11:56