94 lines
1.4 KiB
Markdown
94 lines
1.4 KiB
Markdown
|
|
# Command Patterns
|
||
|
|
|
||
|
|
Common patterns for creating effective slash commands.
|
||
|
|
|
||
|
|
## Review Pattern
|
||
|
|
|
||
|
|
```markdown
|
||
|
|
---
|
||
|
|
description: Review X for Y
|
||
|
|
---
|
||
|
|
|
||
|
|
Review $ARGUMENTS for [specific criteria]
|
||
|
|
|
||
|
|
Include:
|
||
|
|
- [Aspect 1]
|
||
|
|
- [Aspect 2]
|
||
|
|
```
|
||
|
|
|
||
|
|
**Use for**: Code review, security audits, style checks
|
||
|
|
|
||
|
|
## Generate Pattern
|
||
|
|
|
||
|
|
```markdown
|
||
|
|
---
|
||
|
|
description: Generate X from Y
|
||
|
|
---
|
||
|
|
|
||
|
|
Generate [output type] for: $ARGUMENTS
|
||
|
|
|
||
|
|
Requirements:
|
||
|
|
- [Requirement 1]
|
||
|
|
- [Requirement 2]
|
||
|
|
```
|
||
|
|
|
||
|
|
**Use for**: Test generation, documentation, boilerplate code
|
||
|
|
|
||
|
|
## Compare Pattern
|
||
|
|
|
||
|
|
```markdown
|
||
|
|
---
|
||
|
|
description: Compare X and Y
|
||
|
|
argument-hint: <option1> <option2>
|
||
|
|
---
|
||
|
|
|
||
|
|
Compare "$1" versus "$2"
|
||
|
|
|
||
|
|
Analyze:
|
||
|
|
- [Comparison aspect 1]
|
||
|
|
- [Comparison aspect 2]
|
||
|
|
|
||
|
|
Recommendation: [Which is better and why]
|
||
|
|
```
|
||
|
|
|
||
|
|
**Use for**: Technology comparisons, approach evaluation
|
||
|
|
|
||
|
|
## Workflow Pattern
|
||
|
|
|
||
|
|
```markdown
|
||
|
|
---
|
||
|
|
description: Execute multi-step workflow
|
||
|
|
allowed-tools: Bash(git:*), Read(*), Write(*)
|
||
|
|
---
|
||
|
|
|
||
|
|
!git status
|
||
|
|
!git diff
|
||
|
|
|
||
|
|
1. [Step 1]
|
||
|
|
2. [Step 2]
|
||
|
|
3. [Step 3]
|
||
|
|
|
||
|
|
Ask for confirmation before final step.
|
||
|
|
```
|
||
|
|
|
||
|
|
**Use for**: Git workflows, build processes, deployment
|
||
|
|
|
||
|
|
## Analysis Pattern
|
||
|
|
|
||
|
|
```markdown
|
||
|
|
---
|
||
|
|
description: Analyze X and provide insights
|
||
|
|
---
|
||
|
|
|
||
|
|
Analyze $ARGUMENTS
|
||
|
|
|
||
|
|
Focus on:
|
||
|
|
1. [Key metric 1]
|
||
|
|
2. [Key metric 2]
|
||
|
|
3. [Key metric 3]
|
||
|
|
|
||
|
|
Provide actionable recommendations.
|
||
|
|
```
|
||
|
|
|
||
|
|
**Use for**: Performance analysis, complexity metrics, dependency review
|