> ## 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 reusable slash commands stored as markdown files to streamline your development workflows.

export const Keyboard = ({shortcut}) => <span className="inline-block border border-gray-200 bg-gray-50 dark:border-white/10 dark:bg-gray-800 rounded-md text-xs text-gray font-bold px-1 py-0.5">
    {shortcut}
  </span>;

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={["vscode", "beta"]} />

## About Custom Commands

Custom commands are user-defined slash commands stored as `.md` files that appear in the `/` autocomplete menu in chat. They let you create reusable prompts for common workflows — code reviews, deployment checklists, bug fix templates, and more.

<Note>
  Custom Commands are available as a Public Beta opt-in from the Settings page in VSCode 0.789.0+. They are also being rolled out server-side for Community (Vanguard) tier users.
</Note>

## Creating a Command

Create a markdown file in one of the supported command directories:

```bash theme={null}
# Workspace command (shared with your team)
mkdir -p .augment/commands
echo "Review this code for security vulnerabilities and suggest fixes." > .augment/commands/security-review.md

# User command (available across all projects)
mkdir -p ~/.augment/commands
echo "Analyze this code for performance issues:" > ~/.augment/commands/optimize.md
```

### Command Locations

Commands are discovered from multiple locations in order of precedence:

| Location               | Scope     | Description                                          |
| :--------------------- | :-------- | :--------------------------------------------------- |
| `~/.augment/commands/` | User      | Available across all workspaces (highest precedence) |
| `.augment/commands/`   | Workspace | Project-specific, can be version controlled          |
| `.claude/commands/`    | Workspace | Compatible with Claude Code                          |
| `~/.claude/commands/`  | User      | Compatible with Claude Code                          |
| `.cursor/commands/`    | Workspace | Compatible with Cursor                               |

When commands with the same name exist in multiple locations, the command from the higher-precedence location is used.

## Using Commands

Type `/` in the chat input to open the autocomplete menu, then select or search for your command. You can also type the command name directly:

```
/security-review
```

Arguments can be passed after the command name:

```
/fix-issue 123
```

## Frontmatter

Command files support optional YAML frontmatter for metadata:

| Field           | Description                                                | Default                  |
| :-------------- | :--------------------------------------------------------- | :----------------------- |
| `description`   | Brief description shown in the autocomplete menu           | First line of the prompt |
| `argument-hint` | Expected arguments format displayed after the command name | None                     |
| `model`         | Model to use for this command (overrides default)          | Default model            |

**Example** — `.augment/commands/deploy-staging.md`:

```markdown theme={null}
---
description: Deploy the application to staging with health checks
argument-hint: [branch-name]
model: gpt-4o
---

Deploy the application to the staging environment:

1. Run all tests to ensure code quality
2. Build the application for production
3. Deploy to staging server
4. Run health checks to verify deployment
5. Send notification to team channel
```

## Template Substitution

Commands support template variables for dynamic content:

| Pattern           | Description                                               |
| :---------------- | :-------------------------------------------------------- |
| `$ARGUMENTS`      | Replaced with any arguments passed after the command name |
| `{placeholder}`   | Prompts the user for a value                              |
| `{{placeholder}}` | Alternative syntax for user prompts                       |

**Example** using `$ARGUMENTS`:

```markdown theme={null}
---
description: Fix a GitHub issue
argument-hint: [issue-number]
---

Fix the GitHub issue described below. Follow our coding standards and include tests.

Issue: $ARGUMENTS
```

## Namespacing

Organize commands in subdirectories using the `namespace:command` syntax:

```
.augment/commands/
  ├── deploy-staging.md          → /deploy-staging
  ├── frontend/
  │   ├── component.md           → /frontend:component
  │   └── test.md                → /frontend:test
  └── backend/
      └── migrate.md             → /backend:migrate
```

## Best Practices

1. **Use kebab-case naming** — e.g., `deploy-staging.md`, `run-tests.md`
2. **Include clear descriptions** in frontmatter for better discoverability
3. **Use workspace commands** for team-shared workflows
4. **Use user commands** for personal preferences across projects
5. **Organize with subdirectories** for related command groups
6. **Break complex workflows** into numbered steps

## See Also

* [Custom Commands in Auggie CLI](/cli/custom-commands) — Using commands with the CLI
* [Custom Commands Examples](/cli/custom-commands-examples) — Ready-to-use command templates
* [Skills](/using-augment/skills) — Extend the agent with domain knowledge
