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
/helpLists all registered commands, including user-defined ones.
/clearAppends a system divider to the current session transcript to mark a context boundary.
/model <id>Switches the active provider and model for this session. Without an argument, lists available models.
/branch [model-id]Without an argument, lists recommended smaller/same/larger model alternatives. With a model id, forks the conversation onto a new child session pinned to that model.
/secretManage secret references — list, set, and delete @secret: locators available in the session.
/skillInvoke an installed skill (model-invokable command from the skills catalog).
/wfStart, stop, or inspect a workflow run.
/effortAdjust the model's effort/reasoning budget for the session.
/memorizeStore a memory chunk for the active project.
/recallRetrieve stored memory.
/forgetRemove a stored memory chunk.

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

Custom commands

Settings → Slash Commands → New command.

A command has:

  • A name — the slash trigger, e.g. release-notes (no leading slash in the form; you invoke it as /release-notes).
  • A kindtext (literal expansion), prompt (LLM prompt with template variables), or tool (dispatch a specific tool).
  • A description — shown in the picker and /help.
  • (Optional) Inputs — typed parameters (text, file, enum, number, artifact_ref, project_ref).

Template variables

For kind: prompt commands, the body is a prompt template. Supported substitutions:

VariableExpands to
{{selection}}Text selection active at invocation
{{cwd}}Current working directory
{{date}}Today's date (ISO 8601)
{{session_id}}Active session ID
{{project_id}}Active project ID (empty if no project)
{{input_name}}Value of a declared input named input_name
{{?optional_var}}Optional substitution — empty string if missing
{{#var}}…{{/var}}Conditional block — omitted when var is empty

Example: a /release-notes command

name: release-notes
kind: prompt
description: Draft release notes from a tag comparison.
inputs:
- name: tag
type: text
hint: 'e.g. v0.4.0'

Body (markdown, written in the editor below the frontmatter):

Draft user-facing release notes for changes since the tag {{tag}}.
Tone: professional but not stiff. Group into sections: Features, Fixes, Deprecations.
One bullet per change, past tense.

Save it, then /release-notes in any session opens the tag input and produces the draft.

Where commands are stored

Commands are stored as individual markdown files with YAML frontmatter:

  • Global commands~/.kenaz/harness/<env>/slash_commands/<name>.md
  • Project-scoped commands~/.kenaz/harness/<env>/projects/<project-id>/slash_commands/<name>.md

Project-scoped commands are only available inside sessions that belong to that project.

Limits

  • kind: prompt commands run as a single prompt — they're not multi-turn agents. For multi-step workflows, use the Workflows surface.
  • The expanded prompt counts toward the model's context window. Large {{selection}} values can push you close to the limit.