Skip to main content
Slash commands are shortcuts that start with / and perform specific actions inside a Claude Code session. Mains supports both built-in commands and custom commands you define yourself.

Built-in Commands

Custom Commands

Custom commands are Markdown files that define reusable prompts. The filename becomes the command name.

Locations

Creating a Command

Create a .md file in one of the command directories: .{your_project}/commands/review.md:
Then invoke it in a session:

Arguments

Commands support positional arguments with $1, $2, etc., and $ARGUMENTS for the full argument string: .{your_project}/commands/fix-issue.md:

File References and Shell Output

Commands can include file contents with @ and shell output with !: .{your_project}/commands/commit.md:

Namespacing

Organize commands in subdirectories:

Frontmatter Options