Skip to main content

What slash commands do

Slash commands are shortcuts. Instead of explaining what you want, you type /command and the AI knows the workflow. Trellis ships with commands for common tasks. You can add your own.

Built-in commands

Session management

Development workflow

Multi-agent

Maintenance

Using commands

Type the command in Claude Code:
The command expands into a full prompt that tells the AI what to do. You don’t see this prompt, but the AI follows it.

Creating custom commands

Commands are markdown files in .claude/commands/. Create a new command:
Create .claude/commands/my-project/deploy-check.md:
Now /my-project:deploy-check is available.

Command structure

A command file is just a prompt. When you invoke the command, the file contents become instructions for the AI. Good commands:
  • Have clear steps
  • Include actual commands to run
  • Specify what output to expect
  • Tell the AI what to do if something fails
Bad commands:
  • Are vague (“check the code”)
  • Don’t specify how to check
  • Leave the AI guessing

Namespacing

Commands use the folder name as a namespace:
Keep your project commands in a separate folder from Trellis commands. This avoids conflicts when Trellis updates.

Arguments

Commands can accept arguments. Reference them with $ARGUMENTS in the command file:
Usage: /my-project:review src/api/users.ts The AI receives the prompt with $ARGUMENTS replaced by src/api/users.ts.