Slash commands for AI workflows. Define reusable operations with clear execution steps.
Commands are slash-invocable operations defined in markdown files. They provide structured workflows with clear steps, arguments, and error handling.
~/.claude/commands/*.mdGlobal commands
.claude/commands/*.mdProject-specific commands
Commands follow a consistent structure with usage, arguments, execution steps, and error handling.
# /push Command
Push changes to remote with validation.
## Usage
```bash
/push [message]
/push "feat: add user authentication"
```
## Arguments
| Argument | Type | Required | Description |
|----------|------|----------|-------------|
| message | string | No | Commit message (auto-generated if omitted) |
## Execution
### Step 1: Validate
- Run `pnpm build` to check for errors
- Run `pnpm lint` for code quality
### Step 2: Stage
- `git add .` to stage all changes
- Review staged files
### Step 3: Commit
- Generate or use provided message
- Follow conventional commits format
### Step 4: Push
- `git push origin <branch>`
- Report success or failure
## Examples
```bash
# Auto-generate commit message
/push
# Custom message
/push "fix: resolve auth redirect loop"
# With scope
/push "feat(auth): add OAuth2 support"
```
## Error Handling
| Error | Solution |
|-------|----------|
| Build fails | Fix errors before pushing |
| Lint fails | Run `pnpm lint --fix` |
| Push rejected | Pull latest changes first |Simple commands for fast operations without extensive validation.
# /quick Command
Fast commit without build validation.
## Usage
```bash
/quick [message]
```
## When to Use
- Small documentation changes
- Config updates
- When you've already validated
## Execution
1. Stage all changes
2. Commit with message
3. Push immediately
## Examples
```bash
/quick "docs: update README"
/quick "chore: update dependencies"
```Commands for building and validating your project.
# /build Command
Smart build with error reporting.
## Usage
```bash
/build [options]
```
## Options
| Option | Description |
|--------|-------------|
| --fix | Auto-fix lint errors |
| --strict | Fail on warnings |
## Execution
1. Run TypeScript check
2. Run ESLint
3. Run Next.js build
4. Report results
## Examples
```bash
/build
/build --fix
/build --strict
```| Command | Purpose | Time |
|---|---|---|
/push | Full deploy checklist | ~45s |
/quick | Fast commit (skip build) | ~10s |
/build | Smart build | ~45s |
/test | Run tests | varies |
/review | Code review | ~2min |
/fix-all | Auto-fix issues | varies |