ship
/ship - Ship Code Command
Section titled “/ship - Ship Code Command”Purpose
Section titled “Purpose”Complete workflow to commit changes, run reviews, execute tests, and create a pull request ready for merge.
/ship [commit message or 'quick']Arguments
Section titled “Arguments”$ARGUMENTS:- Commit message: Use as commit subject
quick: Auto-generate message, skip review
Ship the current changes with: $ARGUMENTS
Workflow
Section titled “Workflow”Phase 1: Pre-Ship Checks
Section titled “Phase 1: Pre-Ship Checks”-
Check Repository Status
Terminal window git statusgit diff --staged -
Identify Changes
- Files modified
- Files added
- Files deleted
-
Quick Validation
- No secrets in changes
- No debug statements
- No commented-out code
Phase 2: Code Review (unless ‘quick’)
Section titled “Phase 2: Code Review (unless ‘quick’)”-
Run Self-Review
- Check code quality
- Verify style compliance
- Identify security issues
-
Address Critical Issues
- Fix any critical problems
- Note recommendations
Phase 3: Run Tests
Section titled “Phase 3: Run Tests”-
Execute Test Suite
Terminal window # Pythonpytest -v# TypeScriptpnpm test -
Verify All Pass
- No failing tests
- No new warnings
-
Check Coverage
- Coverage not decreased
- New code is tested
Phase 4: Create Commit
Section titled “Phase 4: Create Commit”-
Stage Changes
Terminal window git add -A -
Generate Commit Message
- Follow conventional commit format
- Reference issues if applicable
-
Create Commit
Terminal window git commit -m "$(cat <<'EOF'type(scope): subjectbody🤖 Generated with [Claude Code](https://claude.com/claude-code)Co-Authored-By: Claude <noreply@anthropic.com>EOF)"
Phase 5: Push and Create PR
Section titled “Phase 5: Push and Create PR”-
Push to Remote
Terminal window git push -u origin [branch-name] -
Create Pull Request
Terminal window gh pr create --title "type(scope): description" --body "$(cat <<'EOF'## Summary- Change 1- Change 2## Test Plan- [ ] Tests pass- [ ] Manual testing🤖 Generated with [Claude Code](https://claude.com/claude-code)EOF)"
Output
Section titled “Output”Ship Report
Section titled “Ship Report”## Ship Complete
### Commit**Hash**: `abc1234`**Message**: `feat(auth): add password reset functionality`
### Changes| File | Change ||------|--------|| `src/auth/reset.ts` | Added || `src/auth/routes.ts` | Modified || `tests/auth/reset.test.ts` | Added |
### Checks- [x] Code review passed- [x] Tests passing (42 tests)- [x] Coverage: 85% (+3%)- [x] No security issues
### Pull Request**URL**: https://github.com/org/repo/pull/123**Title**: feat(auth): add password reset functionality**Base**: main**Status**: Ready for review
### Next Steps1. Request review from team2. Address any feedback3. Merge when approvedQuick Ship Mode
Section titled “Quick Ship Mode”When using /ship quick:
- Skip detailed code review
- Auto-generate commit message
- Minimal output
# Quick ship for small changes/ship quickCommit Message Generation
Section titled “Commit Message Generation”Based on changes, generate appropriate message:
Feature
Section titled “Feature”feat(scope): add [feature]
- Added [component/function]- Implemented [functionality]- Added tests for [scenarios]Bug Fix
Section titled “Bug Fix”fix(scope): resolve [issue]
- Fixed [bug description]- Added null check for [case]- Updated testsRefactor
Section titled “Refactor”refactor(scope): improve [area]
- Extracted [logic] to [location]- Renamed [old] to [new]- Simplified [complex code]Pre-Ship Checklist
Section titled “Pre-Ship Checklist”- All changes staged
- No unintended files included
- Tests pass
- No secrets in code
- No debug statements
- Commit message is descriptive
- PR description is complete
Variations
Section titled “Variations”Modify behavior via CLAUDE.md:
- Required checks before ship
- Commit message format
- PR template requirements
- Auto-merge settings
Gap Analysis Rule
Section titled “Gap Analysis Rule”Always identify gaps and suggest next steps to users. In case there is no gaps anymore, then AI should clearly state that there is no gap left.