Example Commands

Here are some practical examples of custom slash commands you can use in your projects:

How to Add Commands to Your Project

To use these custom slash commands in your project, you need to save them in the .augment/commands/ directory:

Step 1: Create the Commands Directory

First, create the .augment/commands/ directory in your project root if it doesn’t exist:
mkdir -p .augment/commands

Step 2: Save Command Files

Save each command as a separate .md file in the .augment/commands/ directory. For example:
# Save the code review command
cat > .augment/commands/code-review.md << 'EOF'
---
description: Perform a comprehensive code review
argument-hint: [file-path]
---

Please perform a comprehensive code review of the specified file or current changes, focusing on:

1. **Code Quality**: Check for readability, maintainability, and adherence to best practices
2. **Security**: Look for potential security vulnerabilities
3. **Performance**: Identify potential performance issues
4. **Testing**: Suggest areas that need test coverage
5. **Documentation**: Check if code is properly documented

$ARGUMENTS
EOF

Step 3: Use Your Commands

Once saved, your custom commands become available as slash commands in Augment:
/code-review src/components/Button.tsx
/bug-fix "Login form validation not working"
/security-review auth/middleware.js

Directory Structure

Your project structure should look like this:
your-project/
├── .augment/
│   └── commands/
│       ├── code-review.md
│       ├── bug-fix.md
│       ├── security-review.md
│       └── performance-optimization.md
├── src/
└── package.json

Usage Tips

  • Save these templates in your .augment/commands/ directory
  • Customize the prompts to match your team’s coding standards and practices
  • Add project-specific context to make the commands more effective
  • Combine commands by referencing outputs from one command in another
  • Use meaningful filenames like code-review.md, bug-fix.md, etc.
  • Version control your commands by committing the .augment/commands/ directory to your repository

Creating Your Own Examples

When creating custom commands, consider these patterns:
  1. Start with a clear description in the frontmatter
  2. Use argument hints to guide users on expected inputs
  3. Structure your prompts with numbered lists or bullet points
  4. Include specific instructions for the type of analysis or output you want
  5. Reference the $ARGUMENTS variable where user input should be inserted

See Also