Skip to content

Slash Commands

Slash commands are built-in control commands provided by Kimi Code CLI in the interactive TUI, used to switch modes, manage sessions, view status, and more. Type / in the input box to trigger command completion; the candidate list filters in real time as you continue typing, and command aliases participate in matching as well.

After typing a full command name (such as /help), press Enter to execute it. If the /-prefixed input does not match any built-in or skill command, it is sent to the agent as an ordinary message.

Tip

Some commands are only available in the idle state. Running them while the session is streaming a response or compacting the context will be blocked, with a hint to press Esc or Ctrl-C first to interrupt the current operation. The "Always available" column in the tables below marks commands that remain available during streaming or compacting.

Account and configuration

CommandAliasDescriptionAlways available
/loginPick an account or platform and sign in: Kimi Code uses the OAuth device code flow, while the Moonshot AI Open Platform signs in with an API key.No
/logoutClear the credentials of the currently selected account (Kimi Code OAuth credentials, or the corresponding open platform provider config).No
/modelSwitch the LLM model used by the current session.Yes
/settings/configOpen the settings panel inside the TUI.Yes
/permissionChoose a permission mode.Yes
/editorConfigure the external editor launched by Ctrl-G.Yes
/themeSwitch the terminal UI color theme.Yes

Session management

CommandAliasDescriptionAlways available
/new/clearStart a brand-new session, discarding the current context.No
/sessions/resumeBrowse historical sessions and switch to or resume one.Yes
/tasks/taskBrowse the background task list.Yes
/forkFork a new session from the current one, preserving the full conversation history.No
/title [<text>]/renameWithout arguments, show the current session title; with an argument, set it as the new title (up to 200 characters).Yes
/compact [<instruction>]Compact the current conversation context to free up token usage; optionally pass a custom instruction telling the model what to preserve during compaction.No
/initAnalyze the current codebase and generate AGENTS.md.No

Mode and runtime control

CommandAliasDescriptionAlways available
/yolo [on|off]/yesToggle auto-approve mode. Without arguments, flip the current state; pass on/off explicitly to force the corresponding state. When enabled, ordinary tool call approvals are skipped; the Plan mode exit approval is not skipped.Yes
/plan [on|off]Toggle Plan mode. Without arguments, flip the current state; pass on/off explicitly to force the corresponding state. Toggling alone does not create an empty plan file.Yes
/plan clearClear the current plan.No

Note

/yolo skips approval confirmation for ordinary tool calls. Make sure you understand the potential risks before enabling it. It does not skip the approval required to leave Plan mode; in Plan mode, Bash follows the same ordinary allow rules as /yolo.

Information and status

CommandAliasDescriptionAlways available
/help/h, /?Show keyboard shortcuts and all available commands.Yes
/usageShow token usage, context consumption, and quota information.Yes
/statusShow the current session runtime status, including version, model, working directory, and permission mode.Yes
/mcpList the MCP servers in the current session and their connection status.Yes
/versionShow the Kimi Code CLI version number.Yes
/feedbackSubmit feedback to help improve Kimi Code CLI.Yes

Exit

CommandAliasDescriptionAlways available
/exit/quit, /qExit Kimi Code CLI.No

Dynamic skill commands

In addition to the built-in commands, user-activatable skills are automatically registered as slash commands under the skill: namespace:

/skill:<name> [extra text]

For example, /skill:code-style loads the content of the code-style skill and sends it to the agent; any text after the command is appended to the skill prompt, as in /skill:git-commits fix the login failure issue.

For convenience, skill commands also support a short form /<name> that omits the skill: prefix, provided the name is not already taken by a built-in command. In other words, /code-style falls back to matching /skill:code-style.

Kimi Code CLI ships with a built-in mcp-config skill for configuring MCP servers and handling MCP OAuth login. It still belongs to the skill namespace in completion and help (/skill:mcp-config), and it can also be invoked directly as /mcp-config.

Skill types that can be exposed as slash commands include prompt, inline, flow, and skills without an explicitly declared type. For skill installation and authoring, see Agent Skills.

Note

All skill commands are only available while the agent is idle; during streaming or compacting, press Esc or Ctrl-C first to interrupt the current operation.

Note

Flow-type skills are also exposed via /skill:<name>; there is no separate /flow: namespace.