Slash Commands 
CodeBuddy Code supports slash commands, allowing you to perform special operations, manage sessions, and customize common workflows directly in the chat. Built-in Slash Commands
These commands are used to manage your CodeBuddy Code session. Below is the current list of supported commands:
| Command | CodeBuddy Support | Description | 
|---|---|---|
/help | ✅ Supported | Displays help information and provides guidance for feedback channels. | 
/clear | ✅ Supported | Clears the current session's context history and starts a new conversation. | 
/login | ✅ Supported | Log in to your cloud development environment. | 
/logout | ✅ Supported | Log out of the current cloud development environment. | 
/doctor | ✅ Supported | Checks the status and environment of CodeBuddy Code. | 
/status | ✅ Supported | Displays the current repository and session status. | 
/add-dir | ✅ Supported | Prompts to add directory content. | 
/agents | ✅ Supported | Manages experimental AI agents. | 
/compact | ✅ Supported | Compresses the context. | 
/config | ✅ Supported | View or modify local configurations. | 
/cost | ✅ Supported | Displays session cost and token usage. | 
/init | ✅ Supported | Initializes a new CodeBuddy repository. | 
/mcp | ✅ Supported | Manages MCP connections. | 
/memory | ✅ Supported | Manages long-term memory. | 
/model | ✅ Supported | Switches or views the currently used AI model. | 
/permissions | ✅ Supported | Manages tool permissions and workspace directory access. | 
/upgrade | ✅ Supported | Opens the upgrade page in the browser, displaying premium features and subscription options. | 
Custom Slash Commands 
This is one of CodeBuddy Code's most powerful features. You can package common prompts, scripts, and workflows into reusable custom commands to greatly improve efficiency.
Creating Custom Commands 
Custom commands are defined by creating .md (Markdown) files in specific directories.
Project-level commands: Create the
.codebuddy/commands/folder in the root directory of your project. These commands will be available to all collaborators in the project.Global personal commands: Create the
~/.codebuddy/commands/folder in your user home directory. These commands will be available across all your projects.
To create a command, simply add a .md file in either of the above directories. For example, the test.md file will automatically be registered as the /test command.
Frontmatter and Metadata 
You can define metadata for the command using YAML Frontmatter at the top of the Markdown file.
markdown
---
description: "Run unit tests for my project and report the results."
argument-hint: "[test-file]"
---
Please run the command `npm run test -- [test-file]` and summarize the test results. If no test file is provided, run all tests.Supported metadata fields:
description: A brief description of the command that will appear in the autocomplete prompt.argument-hint: Describes the command's required parameters, providing input hints for the user.
Using Parameters 
Your custom command can accept parameters, just like a shell script.
$1,$2,$3, ...: Access individual parameters by position.
Example: greet.md
markdown
---
description: "Send a customizable greeting."
argument-hint: "[name]"
---
Greet **$1** with "Hello!" If $1 is empty, greet "World".- When calling 
/greet "CodeBuddy", the value of$1will be"CodeBuddy". 
Executing Shell Commands 
To execute shell commands, prefix the line with ! and enclose the command in backticks. The output (stdout) of that line will be captured and injected into the context for subsequent AI analysis.
Example: status.md
markdown
---
description: "Display the current git repository status and analyze it."
---
!`git status`
Based on the `git status` output above, please summarize the current status of the branch.