Skip to content

Slash Commands Reference

Complete reference for all available slash commands. These custom Claude Code commands automate common development workflows.

Create a pull request with comprehensive description and automated quality gates.

Usage:

Terminal window
/pr-create

What It Does:

  1. Checks if branch needs rebasing onto master
  2. Checks if PHPStan analysis is required (PHP files changed)
  3. Fetches issue details from GitHub
  4. Creates PR with comprehensive description template
  5. Links PR to related GitHub issue

Quality Gates:

  • Rebase validation (ensures branch is up-to-date)
  • PHPStan analysis (for PHP file changes)

Rebase current branch onto latest master and resolve conflicts.

Usage:

Terminal window
/rebase-master

What It Does:

  1. Fetches latest master from origin
  2. Rebases current branch onto master
  3. Detects conflicts and guides resolution
  4. Verifies rebase completed successfully

When to Use:

  • Before creating a PR
  • After master has advanced significantly
  • Before merging your branch

Create a git commit with proper formatting.

Usage:

Terminal window
/commit [optional-message]
# Examples
/commit "Add booking validation"
/commit

Commit Format:

ISSUE-NUMBER Description of changes
Example:
195 Add booking validation service

Run PHPStan analysis and automatically fix all detected errors.

Usage:

Terminal window
# Analyze entire application
/fix-phpstan
# Analyze specific file
/fix-phpstan app/Services/BookingService.php
# Analyze directory
/fix-phpstan app/Services

Phases:

  1. Phase 1: Runs PHPStan analysis to identify errors
  2. Phase 2: Automatically fixes all errors
  3. Phase 3: Verifies all errors are resolved
  4. 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

Create a GitHub issue with complexity estimation and detailed description.

Usage:

Terminal window
/issue-create [feature-description]
# Example
/issue-create Add email notifications for booking confirmations

What It Does:

  1. Analyzes feature requirements
  2. Estimates complexity (Small/Medium/Large)
  3. Breaks down into technical tasks
  4. 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

Start working on an existing GitHub issue by setting up a feature branch.

Usage:

Terminal window
/issue-work ISSUE_NUMBER
# Example
/issue-work 195

What It Does:

  1. Fetches issue details from GitHub
  2. Creates feature branch with naming convention
  3. Checks out the new branch
  4. Displays issue context and tasks

Branch Naming:

<issue-number>-<slugified-title>
Example:
195-integrate-larastan-workflow

Update documentation for recently changed backend services.

Usage:

Terminal window
/update-docs
# Or for specific service
/update-docs BookingService

What It Does:

  1. Detects recently modified service files
  2. Updates corresponding documentation
  3. Verifies code examples are accurate
  4. Updates API reference if endpoints changed

CommandCategoryPurposeRequired Args
/pr-createWorkflowCreate PR with quality gatesNone
/rebase-masterWorkflowRebase onto latest masterNone
/commitWorkflowCreate formatted commitOptional message
/fix-phpstanQualityRun and fix PHPStan errorsOptional path
/issue-createIssuesCreate GitHub issueFeature description
/issue-workIssuesStart working on issueIssue number
/update-docsDocsUpdate service documentationOptional service
Terminal window
# 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-create
Terminal window
# 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-create

Typical sequence:

  1. /issue-work - Set up branch
  2. Code your feature
  3. /fix-phpstan - Fix type safety
  4. /commit - Commit changes
  5. /update-docs - Update docs
  6. /pr-create - Create PR

If /pr-create stops you:

Terminal window
# Rebase if needed
/rebase-master
# Fix PHPStan if needed
/fix-phpstan
# Retry PR creation
/pr-create
  1. Run PHPStan early and often - Don’t wait until PR time
  2. Commit frequently - Use /commit for small, logical changes
  3. Update docs as you code - Don’t save for the end
  4. Use /rebase-master regularly - Stay current with master
Terminal window
# List available commands
/help
# Check command exists
ls .claude/commands/

This is expected behavior:

  1. Follow the prompted command (/fix-phpstan)
  2. Wait for fixes to complete
  3. Review and commit fixes
  4. Retry /pr-create