Custom Commands
The Custom Commands feature allows you to encapsulate frequently used prompts and workflows into reusable commands. Simply type/ in the Agent dialog to quickly invoke these commands, significantly improving your daily development efficiency.
Whether you frequently perform code reviews, generate test cases, or need quick access to project specifications, custom commands can simplify repetitive operations into “one-click” tasks.
Command Types and Scope
| Feature | User Commands | Project Commands |
|---|---|---|
| Scope | Applies to all projects for the current user | Only effective in the current project root directory and its subdirectories |
| Storage Path | - macOS / Linux: /home/<username>/.qoder/commands/ or /Users/<username>/.qoder/commands/- Windows: C:\Users\<username>\.qoder\commands\ | <project-root>/.qoder/commands/ |
| Directory Organization | Supports categorization by folders under the commands directory | Supports categorization by folders under the commands directory |
| Use Cases | General development tasks, such as: • Code review • Generate unit tests | Project-specific tasks, such as: • Check project API specifications • Validate configuration file format |
| Sharing | Limited to current user only | Can be shared with team members via Git or other version control systems |
Note: User-level commands do not support cross-device synchronization. You can manually migrate configuration files. Note: Before creating a project-level command, please open the target project first; if user-level and project-level commands with the same name exist simultaneously, a scope indicator will be attached in the list for easy distinction.
Creating Custom Commands
-
Open the Command Management Interface
- Method 1: Go to the Commands page in Qoder Settings and click the “Add” button
- Method 2: Type
/in the dialog and click the “Add Command” shortcut at the bottom (if available)
-
Enter a unique command name (e.g.,
gen-test) in the top search bar, then press Enter. -
Command name rules:
- Only lowercase letters, numbers, hyphens (
-), and underscores (_) are supported - Name cannot be empty
- Recommended length is under 100 characters
- Cannot duplicate an existing command name within the same scope
- Only lowercase letters, numbers, hyphens (
-
Select the command type:
- User-level: Universal commands applicable to all projects
- Project-level: Only available in the current project; cannot be created if no project is open
- Fill in the command description and body content in the editing area. It’s recommended to start with a brief description of its purpose, followed by the complete prompt or steps in the body.
-
After saving, return to the conversation and type
/in the dialog to see the newly created command.
Note: If the command body is empty or only retains the default placeholder content, the command will not appear in the available list.
Command Updates and List Refresh
When you add, modify, or delete command files, the command list will refresh to the latest state, allowing you to seamlessly continue using the latest version in your conversation. Common refresh scenarios include:- After adding a command, a new option will appear in the list
- After modifying command content, subsequent selections will use the updated content
- After deleting a command, the corresponding item will disappear from the list
- Place commands into different subdirectories by purpose for easier organization
- Provide clear descriptions for commands to facilitate searching and identification in the list
- Regularly clean up old, unused commands to reduce duplication and confusion
Example Commands
/code-inspect
/code-inspect
/security-check
/security-check
/create-pr
/create-pr
/project-test
/project-test
/gen-agents-md
/gen-agents-md