Skip to main content

Module commands

Module commands 

Source
Expand description

Predefined Slash Commands

Loads Stakpak-shipped slash commands from .md files embedded at compile time. Any .md file placed in libs/api/src/commands/ automatically becomes a predefined slash command that appears in the TUI dropdown.

Files are named <command-name>.v<version>.md. The command name is derived by stripping the .v<N> version suffix (e.g., review.v1.mdreview). If multiple versions of the same command exist, the highest version wins.

Optional YAML front matter provides a description:

---
description: Review code changes
---

You are a code reviewer...

If no front matter is present, the first non-empty line (truncated to 60 chars) is used as the description.

Functions§

load_predefined_commands
Load all predefined commands from the embedded commands/ directory.