Skip to main content

Slash commands

Slash commands let you trigger reusable prompt templates from the chat input — type / and pick. Kenaz ships a handful of built-ins; you can write your own.

Using a command

Type / in the input box. The picker opens with available commands. Pick one, fill in any arguments it asks for, hit .

The command rewrites your input to a structured prompt before it reaches the model. The model sees the rewritten prompt; you see what you typed.

Built-in commands

CommandWhat it does
/explain"Explain the following at the level of a competent engineer not in this codebase." Takes a selection or a file reference.
/refactorSuggests a refactor of selected code. Always includes the project root path so the model can call read_file for context.
/testGenerates tests for the selected function/file using the project's existing test framework (auto-detected).
/diffPastes a git diff from the project root into context and asks for a review.
/summarizeCompacts the active session and starts a fresh follow-up turn. Useful before a long working session.
/clearForks the session into a fresh branch with no history. Good when context has drifted.
/helpLists all available commands, including custom ones.

Built-ins evolve with releases — /help is the source of truth.

Custom commands

Settings → Slash commands → New command.

A command is:

  • A trigger — the slash name, e.g. /release-notes.
  • A description — shown in the picker.
  • A prompt template — the actual prompt sent to the model. Supports {{argument}} substitution and a small set of helper macros.
  • (Optional) Arguments — typed inputs (text, file, selection, enum).
  • (Optional) Default tools — tools to enable for the command's turn even if disabled in the session.

Template macros

MacroExpands to
{{cwd}}Active project root
{{selection}}The text the user had selected when invoking
{{file}}Path to a file the user picked from a file argument
{{git.branch}}Current git branch in the active project
{{git.diff}}Output of git diff in the project
{{date}}Today's date in ISO format

Example: a /release-notes command

trigger: /release-notes
description: Draft release notes from the diff since a tag.
arguments:
- name: tag
type: text
placeholder: 'e.g. v0.4.0'
prompt: |
Draft user-facing release notes for the changes in {{git.branch}}
since the tag {{tag}}. Tone: professional but not stiff. Group into
sections: Features, Fixes, Deprecations. One bullet per change, in
past tense.

Diff:
{{git.diff}}

Save it, then /release-notes v0.4.0 in any session inside that project produces the draft.

Sharing commands

Commands are stored in $XDG_CONFIG_HOME/kaneaz-harness/slash-commands.yaml. Drop that file in a git repo your team shares and everyone gets the same commands.

A future release will add per-project commands (read from .kenaz/slash-commands.yaml in the project root) so a repo can ship its own command set.

Limits

  • Commands run as a single prompt — they're not multi-turn agents. If you need a workflow with multiple steps, see the workflow system (coming soon).
  • The expanded prompt is what the model sees, including any {{git.diff}} content. Mind the size for long diffs.