Here are some practical examples of custom slash commands you can use in your projects:
Code Review Command
---description: Perform a comprehensive code reviewargument-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 practices2. **Security**: Look for potential security vulnerabilities3. **Performance**: Identify potential performance issues4. **Testing**: Suggest areas that need test coverage5. **Documentation**: Check if code is properly documented$ARGUMENTS
Bug Fix Template
---description: Generate a structured bug fix approachargument-hint: [bug-description]---Help me fix this bug: $ARGUMENTSPlease provide:1. Root cause analysis2. Step-by-step fix approach3. Testing strategy4. Prevention measures for similar issues
Feature Implementation Guide
---description: Create implementation plan for new featuresargument-hint: [feature-description]---Create a detailed implementation plan for: $ARGUMENTSInclude:- Technical requirements- Architecture considerations- Implementation steps- Testing approach- Documentation needs
Security Review Command
---description: Perform security analysis on codeargument-hint: [file-path]---Perform a security review of: $ARGUMENTSFocus on:1. **Input validation** and sanitization2. **Authentication** and authorization checks3. **Data exposure** and privacy concerns4. **Injection vulnerabilities** (SQL, XSS, etc.)5. **Cryptographic** implementations6. **Dependencies** with known vulnerabilitiesProvide specific recommendations for any issues found.
Performance Optimization
---description: Analyze and optimize code performanceargument-hint: [file-path]---Analyze the performance of: $ARGUMENTSPlease examine:1. **Algorithm complexity** and efficiency2. **Memory usage** patterns3. **Database queries** and optimization opportunities4. **Caching** strategies5. **Network requests** and bundling6. **Rendering performance** (for frontend code)Suggest specific optimizations with expected impact.
Documentation Generator
---description: Generate comprehensive documentationargument-hint: [file-path]---Generate documentation for: $ARGUMENTSInclude:1. **Overview** and purpose2. **API reference** with parameters and return values3. **Usage examples** with code snippets4. **Configuration options** if applicable5. **Error handling** and troubleshooting6. **Dependencies** and requirementsFormat as clear, structured markdown.
Test Generation Command
---description: Generate comprehensive test casesargument-hint: [file-path]---Generate test cases for: $ARGUMENTSCreate tests covering:1. **Happy path** scenarios2. **Edge cases** and boundary conditions3. **Error handling** and exceptions4. **Integration points** with other components5. **Performance** considerations6. **Security** edge casesUse appropriate testing framework conventions and include setup/teardown as needed.
Save each command as a separate .md file in the .augment/commands/ directory. For example:
# Save the code review commandcat > .augment/commands/code-review.md << 'EOF'---description: Perform a comprehensive code reviewargument-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 practices2. **Security**: Look for potential security vulnerabilities3. **Performance**: Identify potential performance issues4. **Testing**: Suggest areas that need test coverage5. **Documentation**: Check if code is properly documented$ARGUMENTSEOF