> ## Documentation Index
> Fetch the complete documentation index at: https://docs.augmentcode.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Commands

> Create user-defined slash commands to automate frequent workflows and prompts.

export const Availability = ({tags = []}) => {
  const tagColor = {
    invite: "purple",
    beta: "gray",
    "private-preview": "purple",
    vscode: "blue",
    jetbrains: "orange",
    vim: "gray",
    neovim: "gray",
    cli: "green"
  };
  return <div className="flex items-center space-x-2 border-b pb-4 border-gray-200 dark:border-white/10">
      <span className="text-sm font-medium">Availability</span>
      {tags.map(tag => <Badge key={tag} size="sm" color={tagColor[tag] || "gray"}>
          {tag}
        </Badge>)}
    </div>;
};

<Availability tags={["jetbrains", "beta"]} />

## About Custom Commands

Custom commands are user-defined slash commands stored as `.md` files. They appear in the **/** autocomplete menu in chat, letting you quickly invoke frequent prompts, templates, or workflows without retyping them.

<Note>
  Custom commands are available in JetBrains **0.428.8+** as a Public Beta opt-in from the Settings page.
</Note>

## Creating a Command

<Steps>
  <Step title="Create the commands directory">
    ```bash theme={null}
    mkdir -p .augment/commands
    ```
  </Step>

  <Step title="Create a command file">
    Create `.augment/commands/review.md`:

    ```markdown theme={null}
    ---
    description: Review code for bugs, security issues, and best practices
    argument-hint: <file or description>
    ---

    Review the following code carefully. Check for:
    1. Bugs and logic errors
    2. Security vulnerabilities
    3. Performance issues
    4. Adherence to project conventions

    $ARGUMENTS
    ```
  </Step>

  <Step title="Use the command">
    Type `/review` in the chat input to invoke your command.
  </Step>
</Steps>

## Command File Format

Each command is a Markdown file (`.md`) with optional YAML frontmatter:

### Frontmatter Fields

| Field           | Description                                                   | Default                  |
| :-------------- | :------------------------------------------------------------ | :----------------------- |
| `description`   | Brief description shown in the autocomplete menu              | First line of the prompt |
| `argument-hint` | Hint for expected arguments, displayed after the command name | None                     |
| `model`         | Override the default model for this command                   | Default model            |

### Template Substitution

Commands support template variables that are replaced when the command is invoked:

| Variable          | Description                                         |
| :---------------- | :-------------------------------------------------- |
| `$ARGUMENTS`      | Replaced with any text typed after the command name |
| `{placeholder}`   | Prompts the user to fill in the value               |
| `{{placeholder}}` | Alternative syntax for placeholders                 |

## Command Locations

Commands can be scoped per-user or per-project:

| Location                         | Scope   | Description                               |
| :------------------------------- | :------ | :---------------------------------------- |
| `<workspace>/.augment/commands/` | Project | Shared with your team via version control |
| `~/.augment/commands/`           | User    | Available across all workspaces           |

### Importing Commands

Augment also discovers commands from other tools for compatibility:

| Location              | Source                  |
| :-------------------- | :---------------------- |
| `.claude/commands/`   | Claude Code (workspace) |
| `~/.claude/commands/` | Claude Code (user)      |
| `.cursor/commands/`   | Cursor                  |

This lets you reuse existing command libraries without migration.

### Namespacing

Organize commands in subdirectories. A file at `.augment/commands/frontend/component.md` creates the command `/frontend:component`.

## CLI Usage

Custom commands are also available in the Auggie CLI:

```bash theme={null}
# Run a command
auggie command review

# List all available commands
auggie command list
```

For more details on CLI usage, see [Custom Commands in the CLI](/cli/custom-commands).

## Best Practices

1. **Use clear names** — choose descriptive kebab-case names like `deploy-staging` or `security-review`
2. **Add descriptions** — include a `description` in frontmatter for better discoverability in the autocomplete menu
3. **Use `$ARGUMENTS`** — make commands flexible by accepting dynamic input
4. **Scope appropriately** — use project commands for team workflows, user commands for personal shortcuts
5. **Organize with directories** — group related commands using subdirectory namespacing

## See Also

* [Custom Commands in the CLI](/cli/custom-commands) — full reference for CLI custom commands
* [Custom Commands Examples](/cli/custom-commands-examples) — ready-to-use command templates
