Slash Commands Plugin
The Slash Commands plugin lets each user define personal shorthand that expands to a full prompt. For example, /test can become "Write comprehensive unit tests for the following code:".
Using commands
Type a slash command at the very start of your message:
/test
/test UserService.create
/review src/api.py
Any text after the command name is appended to the expanded prompt with a space.
Customize commands in Settings → Slash Commands. Server-configured default_commands are pre-filled until you edit them. Changes are per user and do not affect anyone else.
Naming rules
- Must start with a letter or underscore, followed by letters, numbers, or underscores
- Matching is case-insensitive (
/Testmatchestest) - Only matches when the command is at the very start of the message
Configuration
plugins:
- module: codumentor.plugins.slashcmds
class: SlashCommandsPlugin
args:
enabled: true
default_commands:
- name: test
prompt: "Write comprehensive unit tests for the following code:"
- name: review
prompt: "Review this code for bugs, security issues, and code quality:"
- name: explain
prompt: "Explain what this code does in plain language:"
- name: docs
prompt: "Write docstrings and inline documentation for:"
| Parameter | Type | Default | Description |
|---|---|---|---|
enabled | bool | true | Enable or disable the plugin. |
default_commands | list | [] | Starting commands for users who have not customized their own. Each entry needs name (without the slash) and prompt. Entries missing either field are ignored. |
Notes
- Users who have never customized commands receive
default_commands. An empty list means they start with no commands until they add their own. - Skills and slash commands can coexist. This plugin runs first, so a personal command with the same name as a skill takes precedence.