Codumentor logo Codumentor

Slash Commands Plugin

The Slash Commands Plugin lets users define personal shorthand commands that expand to full prompts. For example, /test can expand to "Write comprehensive unit tests for the following code:".

Overview

The Slash Commands plugin:

  1. Intercepts user input at the start of a message for /command patterns
  2. Looks up the command in the user's personal settings (falls back to admin-configured defaults)
  3. Replaces the slash command with its configured prompt text
  4. Appends any arguments that followed the command

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:"

Configuration Parameters

Usage

Invoking a Command

Type a slash command at the start of your message:

/test                          # Expands to the full prompt
/test UserService.create       # Expands to: "Write comprehensive unit tests for UserService.create"
/review src/api.py             # Expands to: "Review this code for ... src/api.py"

Any text after the command name is appended to the expanded prompt with a space.

Customizing Commands

Each user can customize their commands via Settings → Slash Commands in the Web UI. The default_commands from server config are pre-populated for easy editing. Changes are stored per-user and do not affect other users.

Command Naming Rules

Notes