Slash Commands

Built-in Slash Commands

Hawa Code comes with a rich set of built-in slash commands. Type / in the terminal to trigger command completion hints, with support for arrow key selection, Tab or Enter confirmation.

Command Description
/cd Change the current session’s working directory. Usage: /cd <path>, supports relative paths and directory autocomplete
/clear Clear conversation history and release context, while triggering SessionEnd / SessionStart hooks
/compact Compress conversation history, keeping summary in context. Prioritizes Session Memory compression, otherwise falls back to traditional API call method
/resume Resume previous conversation, switch to historical session selection interface
/cost Display total cost and duration of current session
/plan Enable Plan mode, requiring user approval before executing tasks
/auto Enable Auto mode, automatically execute without individual confirmation
/loop Timed loop execution of prompt or slash commands, default interval is 10 minutes. Usage: /loop [interval] <prompt>, interval supports s/m/h/d suffix
/init Analyze codebase and create HAWA.md project documentation, including common commands, architecture description, etc.
/review Review GitHub Pull Request. Can include PR number parameter, lists open PRs when not provided
/pr-comments Get GitHub PR comments (including PR-level and code review-level comments)
/config Open interactive configuration panel
/mcp Manage MCP servers (add, remove, configure)
/sandbox Configure sandbox environment. Display current status: auto-allow, fallback allowed, etc.
/memory Edit Hawa Code memory files (Memory system)
/doctor Check Hawa Code installation environment health
/ide Connect to IDE (such as VS Code) for integrated development features
/help Display help information and available command list

/cd Change Working Directory

/cd is used to change the working directory of the current Hawa Code session. This command only changes the current session’s cwd and does not affect the original directory where Hawa Code was started.

Usage

/cd <path>

Features

  • Supports relative paths: paths are resolved based on the current working directory, e.g., /cd subdir or /cd ../sibling
  • Directory autocomplete: after typing /cd , the terminal lists matching subdirectory suggestions, supporting arrow key selection, Enter or Tab confirmation
  • Same directory hint: if the target directory is the same as the current directory, it prompts Already in ...
  • Success hint: returns Changed directory to .../

Examples

/cd src
/cd ../another-project
/cd /home/user/projects/my-app

Skill Commands

All Skills defined in ~/.hcode/skills/ or project .hcode/skills/ that have userInvocable: true set will automatically generate corresponding slash commands. For example, if a commit skill is defined, it can be called via /commit.

Skill commands are divided into two categories:

  • context !== ‘fork’: Generate prompt type commands, sending Skill content as prompt to AI
  • context === ‘fork’: Generate local type commands, executing Skill in independent agent

Custom Slash Commands

Field Description
name Slash command name
description Slash command description
enabled Whether the command is enabled, when set to false the command will not be displayed in the terminal
progressMessage Message displayed when command is executed
argNames List of parameter names

See the following example

---
name: "Test"
description: "A simple test command"
enabled: true
progressMessage: "Running test command..."
argNames: [arg1, arg2]
---
Execute shell ls command, {arg1}, {arg2} write the required prompt statement here

Command files are markdown files with the file path:

  • ~/.hcode/commands/
  • project file/commands/