These slash commands need manual verification in Claude Code before GitHub release.
# Create a test git repository
cd /tmp
mkdir worktree-test-repo
cd worktree-test-repo
git init
echo "# Test" > README.md
git add .
git commit -m "Initial commit"# Copy commands to test repo
mkdir -p .claude/commands
cp /Users/alex/Desktop/dev_apps/worktree-claude-code-commands/worktree-*.md .claude/commands/Expected behavior:
- Claude Code should parse the YAML front matter
- Execute bash commands sequentially
- Generate branch name (in smart mode)
- Create worktree directory
- Create FEATURE.md with AI-generated content
Test cases:
# Smart mode - Rails
/worktree-start rails "Add user authentication system"
# Manual mode - Rails
/worktree-start rails feat/user-auth
# Smart mode - WordPress
/worktree-start wp "Add contact form with validation"
# Manual mode - WordPress
/worktree-start wp feature/contact-formVerification:
- Branch created with correct naming convention
- Worktree directory exists at
../[branch-name] - FEATURE.md generated (smart mode only)
- Current changes stashed if any
- Error handling works (duplicate branch, invalid input)
Expected behavior:
- List all active worktrees
- Show branch and path for each
- Highlight current worktree
Test cases:
/worktree-listVerification:
- Shows all worktrees correctly
- Formatting is clear and readable
- Current worktree is highlighted
Expected behavior:
- Show statistics of changes
- List commits
- Detect potential conflicts
- Show detailed diff
Test cases:
# Switch to a worktree and make some changes
cd ../feat/user-auth
echo "test" >> test.txt
git add .
git commit -m "Test commit"
# Return to main and compare
cd ../main
/worktree-compare feat/user-authVerification:
- Shows file count and line changes
- Lists commits correctly
- Detects conflicts if any
- Displays diff (preferably with Delta)
Expected behavior:
- Run pre-flight checks
- Merge with --no-ff
- Push to remote (if configured)
- Clean up worktree and branches
- Ask for confirmation before destructive operations
Test cases:
/worktree-merge feat/user-authVerification:
- Asks for confirmation before merge
- Creates merge commit
- Attempts push to remote
- Removes worktree directory
- Deletes local branch
- Deletes remote branch (if pushed)
- Returns to main/master branch
Problem: Claude Code might not execute bash directly from markdown Solution: Commands may need to be in executable script format
Problem: Commands with read -p might not work in Claude Code
Solution: May need to use Claude's native prompt mechanism
Problem: Bash variables in heredocs might not expand correctly Solution: May need different quoting or escaping
Problem: Long outputs might be truncated Solution: May need pagination or summary views
Problem: Commands assume execution from repo root
Solution: May need to add cd commands or path validation
After testing, document:
-
What works:
- Command 1: /worktree-start
- Command 2: /worktree-list
- Command 3: /worktree-compare
- Command 4: /worktree-merge
-
What doesn't work:
- List issues here
-
Required fixes:
- Document changes needed
Based on results:
- ✅ If all work: Proceed with GitHub preparation
⚠️ If partial: Fix issues and re-test- ❌ If none work: Refactor command format
Date tested: _______________ Claude Code version: _______________ Tester: _______________