Slash Commands
Slash commands provide quick access to functionality within the interactive REPL.
Usage
Type / followed by the command name:
> /commitCommands can accept arguments:
> /diff --stagedAuto-completion
The REPL provides tab-completion for slash commands. Type / and press Tab to see available commands.
Relationship to Skills
Some slash commands are powered by the Skills System. Skills are extended command definitions that can:
- Load custom prompts
- Chain multiple operations
- Accept structured input
- Provide specialized UI
When a user invokes a skill via /skill-name, the skill’s prompt is expanded and executed.
Common Slash Commands
| Command | Category | Description |
|---|---|---|
/help | Info | List available commands |
/clear | Session | Clear conversation |
/compact | Session | Compress context |
/commit | Git | Create AI-assisted commit |
/diff | Git | Show changes |
/cost | Info | Token/cost summary |
/config | Config | Edit settings |
/mcp | Extension | Manage MCP servers |
Parsing
Slash commands are parsed by the command system in src/commands.ts. The parser:
- Detects the
/prefix in user input - Extracts the command name and arguments
- Resolves to a registered command handler
- Executes with parsed arguments
Last updated on