Prompt file imported from Yassinello/claude-plugin-prd-workflow (
.claude/commands/ship.md). Copyright stays with the author.
Quick Ship Command
Ship small features/fixes fast without full PRD overhead, with optional worktree isolation.
Purpose
For small changes that don't need full PRD:
- Bug fixes
- Small UI tweaks
- Dependency updates
- Minor refactors
- Quick experiments
NEW in v0.4.4: Automatic context detection - run from Main OR from worktree directly!
v0.4.3: Support for worktree isolation with --worktree flag.
Context Detection (Auto)
The /ship command automatically detects where you run it from:
From Main Repository
# Working directory: ~/Documents/watchora
$ /ship "Fix auth bug"
โ Behavior: Works on Main (default)
โ Optional: Add --worktree to use hotfix worktree
From Hotfix Worktree
# Working directory: ~/Documents/watchora/worktrees/hotfix
$ /ship "Fix auth bug"
โ Behavior: Automatically uses worktree (no --worktree needed!)
โ Syncs, locks, creates branch, works in current directory
Key Point: If you have a dedicated Cursor window open on worktrees/hotfix/, you can use /ship directly from there!
When to Use
Use Quick Ship for:
- Features < 4 hours
- Single developer work
- Clear scope, no unknowns
- Low risk changes
Use Full PRD for:
- Features > 1 day
- Multiple developers
- Unclear requirements
- High-risk changes
- Customer-facing features
Usage
# From Main: Work on Main (quick, simple)
/ship "Fix login button alignment"
# From Main: With worktree isolation (safer, larger fixes)
/ship "Refactor auth module" --worktree
# From Worktree: Auto-detects worktree context
cd worktrees/hotfix/
/ship "Fix auth bug" # Automatically uses worktree!
# Manage active fix (works from anywhere)
/ship --complete # Finish and merge
/ship --abort # Cancel fix
/ship --status # Show current status
/ship --pause # Pause current fix
/ship --resume # Resume paused fix
# Migrate from Main to worktree
/ship --to-worktree # Move current fix to worktree
Options
| Option | Description |
|---|---|
--worktree |
Use hotfix worktree for isolation |
--to-worktree |
Migrate current fix from Main to worktree |
--complete |
Complete current fix (commit + PR + merge) |
--abort |
Abort current fix without merging |
--status |
Show current fix status |
--pause |
Pause fix and save state |
--resume |
Resume paused fix |
Workflow: Default (Main)
Step 1: Start Fix on Main
$ /ship "Fix dark mode toggle"
โ
Quick fix on Main
๐ Branch: quickship/fix-dark-mode-toggle
๐ก Working on Main - keep it small!
Step 2: Guided Implementation
AI provides inline guidance for the fix:
- File locations
- Code changes
- Testing approach
Step 3: Smart Warnings
As you work, smart detection monitors:
# After 20 minutes, 8 files, 150 lines...
โ ๏ธ LARGE FIX DETECTED
- 8 files changed
- 150 lines modified
- 22 minutes elapsed
๐ก This is getting large. Consider:
1. /ship --complete (finish on Main)
2. /ship --to-worktree (migrate to worktree)
3. Continue on Main (suppress warning)
Choose: _
Thresholds:
- Files: > 5 files
- Lines: > 100 lines
- Time: > 30 minutes
Step 4: Complete Fix
$ /ship --complete
โ
Committed: fix: Dark mode toggle improvements
๐ค PR #234 created
โณ Waiting for checks...
โ
Checks passed, auto-merged
๐ Merged to main
๐งน Cleaned up branch
Workflow: With Worktree (from Main)
Step 1: Start Fix in Worktree
$ /ship "Refactor authentication module" --worktree
๐ Checking worktree hotfix/...
# AUTO-SYNC (Intelligent)
๐ Syncing worktree (3 commits behind)...
Recent changes:
- a3f2c1d fix: OAuth timeout
- 8d4e2a9 feat: Better logging
- 1c8f3b2 refactor: API cleanup
โ
Synced with main
# START FIX
โ
Started in worktrees/hotfix/
๐ Branch: hotfix/refactor-auth-module
๐ Locked worktree (one fix at a time)
๐ป Open in new window: code worktrees/hotfix/
Auto-sync thresholds:
- 0 commits: โ No sync needed
- 1-10 commits: ๐ Silent auto-sync
- 10-50 commits: โ ๏ธ Propose sync with preview
- 50+ commits: โ Force sync (required)
Step 2: Isolated Development
Work in worktrees/hotfix/:
- No size limits
- No time warnings
- Complete isolation
- Can open in separate Cursor window
Step 3: Complete Fix
$ /ship --complete
โ
Committed & pushed
๐ค PR #235 created
โณ Waiting for checks...
โ
Checks passed, auto-merging
๐ Merged to main
# AUTO-CLEANUP
๐ Returning to parking branch...
๐งน Deleted branch hotfix/refactor-auth-module
๐ Syncing with main...
โ
Worktree ready for next fix
๐ Unlocked worktree
โฉ๏ธ Returned to Main
Workflow: From Worktree Directly (NEW in v0.4.4)
Setup: Open Cursor Window on Worktree
# One-time setup: Open dedicated Cursor window
cd ~/Documents/watchora/worktrees/hotfix/
code . # Opens Cursor in worktree directory
Step 1: Start Fix (from Worktree)
# You're already in worktrees/hotfix/
$ pwd
~/Documents/watchora/worktrees/hotfix
# Run /ship directly - no --worktree flag needed!
$ /ship "Fix authentication bug"
๐ Detected: Running from worktree hotfix/
๐ฏ Auto-enabling worktree mode
# AUTO-SYNC (Intelligent)
๐ Checking sync status...
โ
Synced with main (or auto-sync if needed)
# START FIX
โ
Started in current directory
๐ Branch: hotfix/fix-authentication-bug
๐ Locked worktree (one fix at a time)
๐ก Working in worktree - no limits!
Step 2: Development (Same Directory)
You work in the same directory where you launched /ship:
- Already in
worktrees/hotfix/ - All your tools/extensions work normally
- Commit as you go
- No need to switch directories
Step 3: Complete Fix (from Worktree)
# Still in worktrees/hotfix/
$ /ship --complete
โ
Committed & pushed
๐ค PR #236 created
โณ Waiting for checks...
โ
Checks passed, auto-merging
๐ Merged to main
# AUTO-CLEANUP
๐ Returning to parking branch...
๐งน Deleted branch hotfix/fix-authentication-bug
๐ Syncing with main...
โ
Worktree ready for next fix
๐ Unlocked worktree
๐ Still in: worktrees/hotfix/ (ready for next fix)
Advantage: You stay in the same Cursor window the entire time!
Collision Handling
One fix at a time in hotfix worktree:
$ /ship "Fix autre" --worktree
โ Fix already in progress in worktrees/hotfix/
Current fix: hotfix/refactor-auth-module
Started: 25 minutes ago
Files: 7 modified
โ ๏ธ Only ONE fix at a time in hotfix worktree
Options:
1. Finish current fix: /ship --complete
2. Work on Main instead: /ship "Fix autre"
3. Abort current fix: /ship --abort
๐ก For urgent small fixes, use Main:
/ship "Fix autre"
Choose: _
Migration: Main โ Worktree
Started on Main but fix is growing:
# Working on Main...
โ ๏ธ LARGE FIX DETECTED (warning appears)
$ /ship --to-worktree
๐ Migrating to worktree...
# Process:
1. โ
Commit WIP on Main
git add .
git commit -m "WIP: Large fix"
2. โ
Setup worktree hotfix/
Auto-sync if needed
3. โ
Cherry-pick WIP to worktree
cd worktrees/hotfix/
git checkout -b hotfix/large-fix
git cherry-pick <wip-commit>
4. โ
Reset Main
cd main-repo/
git reset --hard HEAD~1
5. โ
Continue in worktree
๐ป Open: code worktrees/hotfix/
Migration complete!
Continue working in worktrees/hotfix/
State Management
Lock File
.claude-lock in worktrees/hotfix/:
{
"status": "in_progress",
"type": "hotfix",
"branch": "hotfix/refactor-auth",
"started_at": "2025-01-13T10:30:00Z",
"started_by": "/ship --worktree",
"description": "Refactor authentication module",
"files_changed": 7,
"lines_changed": 234,
"commits": 3,
"last_commit": "a3f2c1d Improve auth flow"
}
Status Check
$ /ship --status
๐ Current Fix Status
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Location: worktrees/hotfix/
๐ Branch: hotfix/refactor-auth-module
โฑ๏ธ Started: 25 minutes ago
๐ Progress:
- Files: 7 modified
- Lines: +234 -87
- Commits: 3
Recent commits:
- a3f2c1d Improve auth flow
- 8d4e2a9 Add tests
- 1c8f3b2 Refactor middleware
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Actions:
- /ship --complete (finish)
- /ship --pause (save for later)
- /ship --abort (cancel)
Pause & Resume
Pause Fix
$ /ship --pause
๐พ Pausing fix...
โ
Committed WIP state
๐ Updated lock file (status: paused)
๐ Returned to parking branch
Fix paused. Resume with: /ship --resume
Resume Fix
$ /ship --resume
๐ Paused fixes:
1. hotfix/refactor-auth-module
Started: 2 hours ago
Files: 7 modified
Last: Improve auth flow
Resume which fix? (1): 1
๐ Resuming fix...
โ
Checked out branch: hotfix/refactor-auth-module
๐ Fix status loaded
Continue working!
Configuration
Respects .claude/config-worktrees.json:
{
"worktrees": {
"hotfix": {
"path": "worktrees/hotfix",
"branch_parking": "hotfix"
}
},
"warnings": {
"files_threshold": 5,
"lines_threshold": 100,
"time_threshold_minutes": 30
},
"auto_complete": {
"auto_merge_if_checks_pass": true,
"cleanup_after_merge": true
}
}
Examples
Example 1: Simple Fix on Main
$ /ship "Fix typo in error message"
# Small fix, 1 file, 2 lines
# No warnings
# Complete quickly
$ /ship --complete
โ
Done!
Example 2: Fix Grows, Migrate to Worktree
$ /ship "Fix dark mode issues"
# Start on Main
# After 20 min: 8 files, 150 lines
โ ๏ธ LARGE FIX DETECTED
$ /ship --to-worktree
# Migrated to worktree
# Continue safely
Example 3: Direct Worktree Usage (from Main)
$ /ship "Large refactor" --worktree
# Starts in worktree
# No limits
# Complete isolation
Example 4: Direct Worktree Usage (from Worktree) - NEW!
# Cursor window open on worktrees/hotfix/
$ pwd
~/Documents/watchora/worktrees/hotfix
$ /ship "Large refactor"
# Auto-detects worktree context
# No --worktree flag needed
# Works in current directory
Example 5: Urgent Fix During Active Fix
# Fix in progress in worktree
$ /ship "Critical bug" --worktree
โ Worktree busy
# Use Main instead
$ /ship "Critical bug"
# Quick fix on Main
# Worktree unaffected
Best Practices
When to Use Main
โ Typos, small text changes โ 1-2 file modifications โ < 50 lines changed โ < 15 minutes work โ Low risk, obvious fix
When to Use Worktree
โ Refactors โ Multiple files (5+) โ > 100 lines changed โ > 30 minutes work โ Need isolation โ Want separate Cursor window
Tips
- ๐ก Start on Main, migrate if it grows
- ๐ก Use worktree for anything "refactor"
- ๐ก One worktree fix at a time = simple
- ๐ก Urgent fixes on Main = no blocking
Integration
Works seamlessly with:
/worktree- Manage worktrees/context- Shows current fix/cleanup- Cleans up after merge/hotfix- Alias for/ship --worktree
Version: 0.4.4 Plugin: claude-prd-workflow v0.4.4 Changes:
- v0.4.4: Added automatic context detection - run from Main OR worktree directly
- v0.4.3: Added worktree support, intelligent sync, collision handling
