Slash Commands Reference
Complete reference for all available slash commands. These custom Claude Code commands automate common development workflows.
Development Workflow
Section titled “Development Workflow”/pr-create
Section titled “/pr-create”Create a pull request with comprehensive description and automated quality gates.
Usage:
/pr-createWhat It Does:
- Checks if branch needs rebasing onto master
- Checks if PHPStan analysis is required (PHP files changed)
- Fetches issue details from GitHub
- Creates PR with comprehensive description template
- Links PR to related GitHub issue
Quality Gates:
- Rebase validation (ensures branch is up-to-date)
- PHPStan analysis (for PHP file changes)
/rebase-master
Section titled “/rebase-master”Rebase current branch onto latest master and resolve conflicts.
Usage:
/rebase-masterWhat It Does:
- Fetches latest master from origin
- Rebases current branch onto master
- Detects conflicts and guides resolution
- Verifies rebase completed successfully
When to Use:
- Before creating a PR
- After master has advanced significantly
- Before merging your branch
/commit
Section titled “/commit”Create a git commit with proper formatting.
Usage:
/commit [optional-message]
# Examples/commit "Add booking validation"/commitCommit Format:
ISSUE-NUMBER Description of changes
Example:195 Add booking validation serviceCode Quality
Section titled “Code Quality”/fix-phpstan
Section titled “/fix-phpstan”Run PHPStan analysis and automatically fix all detected errors.
Usage:
# Analyze entire application/fix-phpstan
# Analyze specific file/fix-phpstan app/Services/BookingService.php
# Analyze directory/fix-phpstan app/ServicesPhases:
- Phase 1: Runs PHPStan analysis to identify errors
- Phase 2: Automatically fixes all errors
- Phase 3: Verifies all errors are resolved
- Phase 4: Prompts to commit changes
Common Fixes Applied:
- Missing PHPDoc array type annotations
- Using
env()outside config files - Missing return type declarations
- Untyped properties
Issue Management
Section titled “Issue Management”/issue-create
Section titled “/issue-create”Create a GitHub issue with complexity estimation and detailed description.
Usage:
/issue-create [feature-description]
# Example/issue-create Add email notifications for booking confirmationsWhat It Does:
- Analyzes feature requirements
- Estimates complexity (Small/Medium/Large)
- Breaks down into technical tasks
- Creates GitHub issue with comprehensive description
Complexity Levels:
- Small: 1-4 hours, single file changes
- Medium: 4-16 hours, multiple files
- Large: 16+ hours, architectural changes
/issue-work
Section titled “/issue-work”Start working on an existing GitHub issue by setting up a feature branch.
Usage:
/issue-work ISSUE_NUMBER
# Example/issue-work 195What It Does:
- Fetches issue details from GitHub
- Creates feature branch with naming convention
- Checks out the new branch
- Displays issue context and tasks
Branch Naming:
<issue-number>-<slugified-title>
Example:195-integrate-larastan-workflowDocumentation
Section titled “Documentation”/update-docs
Section titled “/update-docs”Update documentation for recently changed backend services.
Usage:
/update-docs
# Or for specific service/update-docs BookingServiceWhat It Does:
- Detects recently modified service files
- Updates corresponding documentation
- Verifies code examples are accurate
- Updates API reference if endpoints changed
Quick Reference
Section titled “Quick Reference”| Command | Category | Purpose | Required Args |
|---|---|---|---|
/pr-create | Workflow | Create PR with quality gates | None |
/rebase-master | Workflow | Rebase onto latest master | None |
/commit | Workflow | Create formatted commit | Optional message |
/fix-phpstan | Quality | Run and fix PHPStan errors | Optional path |
/issue-create | Issues | Create GitHub issue | Feature description |
/issue-work | Issues | Start working on issue | Issue number |
/update-docs | Docs | Update service documentation | Optional service |
Common Workflows
Section titled “Common Workflows”Starting New Feature
Section titled “Starting New Feature”# 1. Create GitHub issue/issue-create Add customer export functionality
# 2. Start working on the issue/issue-work 196
# 3. Implement the feature# ... coding ...
# 4. Fix type safety issues/fix-phpstan app/Services/CustomerService.php
# 5. Commit changes/commit "Implement customer export service"
# 6. Update documentation/update-docs CustomerService
# 7. Create pull request/pr-createFixing a Bug
Section titled “Fixing a Bug”# 1. Create branch for bug fix/issue-work 197
# 2. Fix the bug# ... coding ...
# 3. Run static analysis/fix-phpstan
# 4. Commit the fix/commit "Fix booking validation null pointer"
# 5. Create PR/pr-createTips and Best Practices
Section titled “Tips and Best Practices”Command Execution Order
Section titled “Command Execution Order”Typical sequence:
/issue-work- Set up branch- Code your feature
/fix-phpstan- Fix type safety/commit- Commit changes/update-docs- Update docs/pr-create- Create PR
Error Recovery
Section titled “Error Recovery”If /pr-create stops you:
# Rebase if needed/rebase-master
# Fix PHPStan if needed/fix-phpstan
# Retry PR creation/pr-createEfficiency Tips
Section titled “Efficiency Tips”- Run PHPStan early and often - Don’t wait until PR time
- Commit frequently - Use
/commitfor small, logical changes - Update docs as you code - Don’t save for the end
- Use
/rebase-masterregularly - Stay current with master
Troubleshooting
Section titled “Troubleshooting”Command Not Found
Section titled “Command Not Found”# List available commands/help
# Check command existsls .claude/commands/Quality Gate Blocks PR
Section titled “Quality Gate Blocks PR”This is expected behavior:
- Follow the prompted command (
/fix-phpstan) - Wait for fixes to complete
- Review and commit fixes
- Retry
/pr-create