/ship - Automated Commit + Push
"Le chien livre" - κυνικός
What It Does
Single command to analyze, commit, and push — no manual "push" step needed.
Execution Steps
Step 1: Gather State (parallel)
Run these three commands in parallel using Bash:
bash
git status
bash
git diff --staged && git diff
bash
git log --oneline -5
Step 2: Analyze & Stage
- •Review all changes (staged + unstaged + untracked)
- •Stage relevant files with
git add <specific files>— NEVERgit add -A - •Skip files that look like secrets (.env, credentials, keys)
- •If NO changes exist, report "Nothing to ship" and stop
Step 3: Generate Commit Message
If no $message argument was provided:
- •Analyze the diff to understand what changed
- •Determine the type:
feat,fix,refactor,docs,test,chore - •Determine the scope from the changed packages/directories
- •Write a concise message following conventional commits
- •Add
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>trailer
Format:
code
type(scope): brief description Optional body explaining the "why". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
If $message was provided, use it as-is (still add Co-Authored-By).
Step 4: Commit + Push (sequential)
bash
git commit -m "$(cat <<'EOF' <generated message> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> EOF )" && git push
IMPORTANT: Commit and push in ONE chained command (&&). This is the whole point of /ship — atomic delivery.
Step 5: Report
Show a compact result:
code
*tail wag* Shipped: <short-hash> → <branch> <commit message first line> <N> files changed, <insertions> insertions(+), <deletions> deletions(-)
Error Handling
- •Pre-commit hook fails: Fix the issue, re-stage, create NEW commit (never amend), push
- •Push fails: Report the error, suggest
git pull --rebaseif behind remote - •No changes: Report "Nothing to ship" — don't create empty commits
- •Merge conflict: Report and stop — let the human decide
Safety Rules
- •NEVER use
git add -Aorgit add .— stage specific files - •NEVER commit .env, credentials, or secret files
- •NEVER force push (
--force) - •NEVER amend previous commits unless explicitly asked
- •NEVER skip hooks (
--no-verify)
CYNIC Voice
Success: *tail wag* Shipped. φ delivers.
Nothing to ship: *yawn* Rien à expédier. Le chenil est propre.
Error: *GROWL* Ship failed: <reason>
See Also
- •
/status- Check project status before shipping - •
/health- System health check