--- summary: "Slash commands: text vs native, config, and supported commands" read_when: - Using or configuring chat commands - Debugging command routing or permissions --- # Slash commands Commands are handled by the Gateway. Most commands must be sent as a **standalone** message that starts with `/`. The host-only bash chat command uses `! ` (with `/bash ` as an alias). There are two related systems: - **Commands**: standalone `/...` messages. - **Directives**: `/think`, `/verbose`, `/reasoning`, `/elevated`, `/exec`, `/model`, `/queue`. - Directives are stripped from the message before the model sees it. - In normal chat messages (not directive-only), they are treated as “inline hints” and do **not** persist session settings. - In directive-only messages (the message contains only directives), they persist to the session and reply with an acknowledgement. There are also a few **inline shortcuts** (allowlisted/authorized senders only): `/help`, `/commands`, `/status`, `/whoami` (`/id`). They run immediately, are stripped before the model sees the message, and the remaining text continues through the normal flow. ## Config ```json5 { commands: { native: "auto", nativeSkills: "auto", text: true, bash: false, bashForegroundMs: 2000, config: false, debug: false, restart: false, useAccessGroups: true } } ``` - `commands.text` (default `true`) enables parsing `/...` in chat messages. - On surfaces without native commands (WhatsApp/WebChat/Signal/iMessage/MS Teams), text commands still work even if you set this to `false`. - `commands.native` (default `"auto"`) registers native commands. - Auto: on for Discord/Telegram; off for Slack (until you add slash commands); ignored for providers without native support. - Set `channels.discord.commands.native`, `channels.telegram.commands.native`, or `channels.slack.commands.native` to override per provider (bool or `"auto"`). - `false` clears previously registered commands on Discord/Telegram at startup. Slack commands are managed in the Slack app and are not removed automatically. - `commands.nativeSkills` (default `"auto"`) registers **skill** commands natively when supported. - Auto: on for Discord/Telegram; off for Slack (Slack requires creating a slash command per skill). - Set `channels.discord.commands.nativeSkills`, `channels.telegram.commands.nativeSkills`, or `channels.slack.commands.nativeSkills` to override per provider (bool or `"auto"`). - `commands.bash` (default `false`) enables `! ` to run host shell commands (`/bash ` is an alias; requires `tools.elevated` allowlists). - `commands.bashForegroundMs` (default `2000`) controls how long bash waits before switching to background mode (`0` backgrounds immediately). - `commands.config` (default `false`) enables `/config` (reads/writes `clawdbot.json`). - `commands.debug` (default `false`) enables `/debug` (runtime-only overrides). - `commands.useAccessGroups` (default `true`) enforces allowlists/policies for commands. ## Command list Text + native (when enabled): - `/help` - `/commands` - `/skill [input]` (run a skill by name) - `/status` (show current status; includes provider usage/quota for the current model provider when available) - `/allowlist` (list/add/remove allowlist entries) - `/search [--from ] [--platform ] [--since