Reference · Composing and shortcuts
Slash commands
How to run a slash command from the composer, and where the list of them comes from.
Typing / at the start of the draft opens a menu of slash commands, narrowing as more is
typed. The menu closes the moment a space is typed. The CLI reads a slash command only when it
opens the whole message, so what follows that space becomes the command's own argument.
A skill a project defines and a built-in command like /compact or /clear appear in the same
list, in no visibly distinct groups. The CLI treats a skill the same way it treats a built-in
command: both are a name put at the front of a message.
What the menu shows
Each row carries the command's name, its description, and an argument hint where the command
takes an argument. A skill from a plugin appears as /plugin:skill, carrying the plugin's own
name ahead of the colon.
Matching
Nothing typed yet lists the commands in the order the CLI reports them, skills ahead of the built-in commands. Once typing starts, a name matching what was typed ranks above a name that merely contains it. A plugin skill's own part after the colon counts as its name for this.
A command whose description starts a word with what was typed also appears, ranked below every
name match. That tier is what lets "commit" reach a skill named /ship-it.
Some commands answer to several names — /cost and /stats both reach /usage — and any of
them matches the same way the command's primary name does.
Where the list comes from
The engine running the session reports its own commands, so the list can differ from session to session with what that folder's own configuration offers. The list is read the first time the menu is opened, and held for as long as the window stays on that session.